@venulog/phasing-engine-schemas 0.3.0 → 0.3.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.
@@ -1,9 +1,10 @@
1
1
  // packages/phasing-schemas/src/phaseBooking.ts
2
2
  import { paginationSchema } from './pagination.js';
3
3
  import { BookingStatus } from './enums/bookingStatus.js';
4
- import { createSuccessResponseSchema, createMessageDataResponseSchema } from './common.js';
4
+ import { createSuccessResponseSchema, createMessageDataResponseSchema, documentSchema } from './common.js';
5
5
  import { z } from './zod.js';
6
6
  import { PhaseSlotScheduleType } from './enums/phaseSlotScheduleType.js';
7
+ import { ParkingAreaScheduleType } from './enums/parkingAreaScheduleType.js';
7
8
  // PostGIS geometry schema (GeoJSON-like structure)
8
9
  export const geometrySchema = z
9
10
  .object({
@@ -444,6 +445,50 @@ export const refuseBookingDataSchema = z
444
445
  })
445
446
  .openapi('RefuseBookingData');
446
447
  export const refuseBookingResponseSchema = createMessageDataResponseSchema(refuseBookingDataSchema, 'RefuseBookingResponse', 'Phase booking refused successfully', 'Details of the refused booking');
448
+ export const updatePhaseBookingBodySchema = z
449
+ .object({
450
+ company: companyDetailsSchema.optional().openapi({
451
+ description: 'Updated company details'
452
+ }),
453
+ vehicle: vehicleDetailsSchema.optional().openapi({
454
+ description: 'Updated vehicle details'
455
+ }),
456
+ access_token: z.string().min(1, 'Access token is required').openapi({
457
+ description: 'Access pass token for booking verification',
458
+ example: 'ACCESS_1a2b3c4d5e6f7g8h_eyJib29raW5nSWQiOjF9'
459
+ })
460
+ })
461
+ .refine(data => data.company !== undefined || data.vehicle !== undefined, {
462
+ message: 'At least one field (company or vehicle) must be provided for update'
463
+ })
464
+ .openapi('UpdatePhaseBookingBody');
465
+ export const updatePhaseBookingDataSchema = z
466
+ .object({
467
+ booking_id: z.number().openapi({
468
+ description: 'ID of the updated booking',
469
+ example: 1
470
+ }),
471
+ qr_token: z.string().openapi({
472
+ description: 'New regenerated QR token',
473
+ example: 'ACCESS_1a2b3c4d5e6f7g8h_eyJib29raW5nSWQiOjF9'
474
+ }),
475
+ company: companyDetailsSchema.nullable().openapi({
476
+ description: 'Updated company details'
477
+ }),
478
+ vehicle: vehicleDetailsSchema.nullable().openapi({
479
+ description: 'Updated vehicle details'
480
+ }),
481
+ updated_at: z.string().openapi({
482
+ description: 'Timestamp when booking was updated',
483
+ example: '2025-12-23T10:30:00.000Z'
484
+ }),
485
+ updated_by: z.string().nullable().openapi({
486
+ description: 'ID of the user who updated the booking',
487
+ example: 'user-123'
488
+ })
489
+ })
490
+ .openapi('UpdatePhaseBookingData');
491
+ export const updatePhaseBookingResponseSchema = createMessageDataResponseSchema(updatePhaseBookingDataSchema, 'UpdatePhaseBookingResponse', 'Phase booking updated successfully', 'Details of the updated booking');
447
492
  // ------------------------------
448
493
  // Create Phase Slots schemas
449
494
  // ------------------------------
@@ -905,3 +950,400 @@ export const checkSlotAvailabilityDataSchema = z
905
950
  })
906
951
  .openapi('CheckSlotAvailabilityData');
907
952
  export const checkSlotAvailabilityResponseSchema = createSuccessResponseSchema(checkSlotAvailabilityDataSchema, 'CheckSlotAvailabilityResponse', 'Slot availability information with capacity details');
953
+ // ------------------------------
954
+ // QR Code Generation schemas
955
+ // ------------------------------
956
+ export const getBookingDetailsParamsSchema = z
957
+ .object({
958
+ bookingId: z.coerce.number().int().positive({
959
+ message: 'Booking ID must be a positive integer'
960
+ })
961
+ })
962
+ .openapi('GetBookingDetailsParams');
963
+ export const bookingDetailsDataSchema = z
964
+ .object({
965
+ qr_token: z.string().nullable().openapi({
966
+ description: 'QR token for verification',
967
+ example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
968
+ }),
969
+ booking_id: z.number().openapi({
970
+ description: 'ID of the booking',
971
+ example: 123
972
+ }),
973
+ status: z.string().openapi({
974
+ description: 'Booking status',
975
+ example: 'confirmed'
976
+ }),
977
+ booking_date: z.string().openapi({
978
+ description: 'Date of the booking',
979
+ example: '2025-12-15'
980
+ }),
981
+ start_time: z.string().openapi({
982
+ description: 'Start time of the booking',
983
+ example: '08:00'
984
+ }),
985
+ end_time: z.string().openapi({
986
+ description: 'End time of the booking',
987
+ example: '08:30'
988
+ }),
989
+ company_role: z.string().nullable().openapi({
990
+ description: 'Company role for the booking',
991
+ example: 'exhibitor'
992
+ }),
993
+ company: companyDetailsSchema.openapi({
994
+ description: 'Company details'
995
+ }),
996
+ vehicle: vehicleDetailsSchema.openapi({
997
+ description: 'Vehicle details'
998
+ }),
999
+ event_id: z.number().openapi({
1000
+ description: 'ID of the event',
1001
+ example: 1
1002
+ }),
1003
+ event_name: z.string().openapi({
1004
+ description: 'Name of the event',
1005
+ example: 'Paris Fashion Week 2025'
1006
+ }),
1007
+ event_code: z.string().openapi({
1008
+ description: 'Code of the event',
1009
+ example: 'PFW2025'
1010
+ }),
1011
+ venue_id: z.number().nullable().openapi({
1012
+ description: 'ID of the venue',
1013
+ example: 1
1014
+ }),
1015
+ venue_name: z.string().nullable().openapi({
1016
+ description: 'Name of the venue',
1017
+ example: 'Paris Expo Porte de Versailles'
1018
+ }),
1019
+ request_type: z.string().openapi({
1020
+ description: 'Type of phase slot schedule (assembly/dismantling)',
1021
+ example: 'assembly'
1022
+ }),
1023
+ duration: z.number().openapi({
1024
+ description: 'Duration of the booking in minutes',
1025
+ example: 30
1026
+ }),
1027
+ phase_slot_schedule_id: z.number().openapi({
1028
+ description: 'ID of the phase slot schedule',
1029
+ example: 456
1030
+ }),
1031
+ banner: documentSchema.nullable().openapi({
1032
+ description: 'Event banner document',
1033
+ example: {
1034
+ url: 'https://example.com/event-banner.jpg',
1035
+ name: 'event-banner.jpg',
1036
+ type: 'image/jpeg'
1037
+ }
1038
+ }),
1039
+ created_at: z.string().openapi({
1040
+ description: 'Timestamp when booking was created',
1041
+ example: '2025-12-05T10:30:00.000Z'
1042
+ }),
1043
+ updated_at: z.string().openapi({
1044
+ description: 'Timestamp when booking was last updated',
1045
+ example: '2025-12-05T10:30:00.000Z'
1046
+ })
1047
+ })
1048
+ .openapi('BookingDetailsData');
1049
+ export const getBookingDetailsResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetBookingDetailsResponse', 'Booking details with access pass information');
1050
+ // ------------------------------
1051
+ // Get booking details by token schemas
1052
+ // ------------------------------
1053
+ export const getBookingDetailsByTokenBodySchema = z
1054
+ .object({
1055
+ access_token: z.string().min(1, 'Access token is required').openapi({
1056
+ description: 'Access pass token from confirmed booking',
1057
+ example: 'ACCESS_1a2b3c4d5e6f7g8h_eyJib29raW5nSWQiOjEyM30%3D'
1058
+ })
1059
+ })
1060
+ .openapi('GetBookingDetailsByTokenBody');
1061
+ export const getBookingDetailsByTokenResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetBookingDetailsByTokenResponse', 'Booking details retrieved by access token');
1062
+ // ------------------------------
1063
+ // Get booking details by QR schemas
1064
+ // ------------------------------
1065
+ export const getBookingDetailsByQrBodySchema = z
1066
+ .object({
1067
+ qr_token: z.string().min(1, 'QR token is required').openapi({
1068
+ description: 'QR token from confirmed booking',
1069
+ example: 'ACCESS_1a2b3c4d5e6f7g8h_eyJib29raW5nSWQiOjEyM30%3D'
1070
+ })
1071
+ })
1072
+ .openapi('GetBookingDetailsByQrBody');
1073
+ export const getBookingDetailsByQrResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetBookingDetailsByQrResponse', 'Booking details retrieved by QR token');
1074
+ // ------------------------------
1075
+ // Booking with nested relations schema for QR generation
1076
+ // ------------------------------
1077
+ export const bookingWithRelationsSchema = z
1078
+ .object({
1079
+ id: z.number(),
1080
+ status: z.string(),
1081
+ qr_token: z.string().nullable(),
1082
+ booking_date: z.string(),
1083
+ start_time: z.string(),
1084
+ end_time: z.string(),
1085
+ company_role: z.string().nullable(),
1086
+ company: z.record(z.string(), z.unknown()).nullable(),
1087
+ vehicle: z.record(z.string(), z.unknown()).nullable(),
1088
+ is_active: z.boolean(),
1089
+ created_at: z.string(),
1090
+ updated_at: z.string(),
1091
+ phase_slot_schedules: z.object({
1092
+ id: z.number(),
1093
+ phase_slot_schedule_type: z.string(),
1094
+ phase_slots: z.object({
1095
+ id: z.number(),
1096
+ events: z.object({
1097
+ id: z.number(),
1098
+ name: z.string(),
1099
+ code: z.string(),
1100
+ venue_id: z.number().nullable(),
1101
+ banner: z.record(z.string(), z.unknown()).nullable(),
1102
+ venues: z
1103
+ .object({
1104
+ id: z.number(),
1105
+ name: z.string()
1106
+ })
1107
+ .nullable()
1108
+ })
1109
+ })
1110
+ })
1111
+ })
1112
+ .openapi('BookingWithRelations');
1113
+ // ======================================================================
1114
+ // PARKING BOOKING SCHEMAS (New naming convention)
1115
+ // These schemas use the new parking_area naming to match the database
1116
+ // ======================================================================
1117
+ // ------------------------------
1118
+ // Parking Booking Schema (matches parking_bookings table)
1119
+ // ------------------------------
1120
+ /**
1121
+ * Parking area schedule schema (from database response)
1122
+ * Uses new column names: parking_area_id, parking_area_schedule_type
1123
+ */
1124
+ export const parkingAreaScheduleSchemaForBooking = z
1125
+ .object({
1126
+ id: z.number().int().positive().openapi({
1127
+ description: 'Unique identifier for the schedule',
1128
+ example: 1
1129
+ }),
1130
+ date: z.string().openapi({
1131
+ description: 'Date of the schedule (YYYY-MM-DD format)',
1132
+ example: '2025-12-15'
1133
+ }),
1134
+ start_time: z.string().openapi({
1135
+ description: 'Start time (HH:MM format)',
1136
+ example: '06:00'
1137
+ }),
1138
+ end_time: z.string().openapi({
1139
+ description: 'End time (HH:MM format)',
1140
+ example: '09:00'
1141
+ }),
1142
+ duration: z.number().openapi({
1143
+ description: 'Duration in minutes',
1144
+ example: 180
1145
+ }),
1146
+ parking_area_id: z.number().int().positive().openapi({
1147
+ description: 'ID of the associated parking area',
1148
+ example: 101
1149
+ }),
1150
+ parking_area_schedule_type: z
1151
+ .enum([ParkingAreaScheduleType.ASSEMBLY, ParkingAreaScheduleType.DISMANTLING])
1152
+ .openapi({
1153
+ description: 'Type of schedule',
1154
+ example: ParkingAreaScheduleType.ASSEMBLY
1155
+ }),
1156
+ company_role: z.string().nullable().openapi({
1157
+ description: 'Company role allowed for this schedule',
1158
+ example: 'exhibitor'
1159
+ }),
1160
+ created_at: z.string().openapi({
1161
+ description: 'Timestamp when schedule was created',
1162
+ example: '2025-12-09T10:00:00.000Z'
1163
+ }),
1164
+ updated_at: z.string().openapi({
1165
+ description: 'Timestamp when schedule was updated',
1166
+ example: '2025-12-09T10:30:00.000Z'
1167
+ }),
1168
+ created_by: z.string().uuid().nullable().openapi({
1169
+ description: 'UUID of user who created the schedule',
1170
+ example: '550e8400-e29b-41d4-a716-446655440000'
1171
+ }),
1172
+ updated_by: z.string().uuid().nullable().openapi({
1173
+ description: 'UUID of user who last updated the schedule',
1174
+ example: '550e8400-e29b-41d4-a716-446655440000'
1175
+ })
1176
+ })
1177
+ .openapi('ParkingAreaScheduleForBooking');
1178
+ /**
1179
+ * Parking booking schema (matches parking_bookings table)
1180
+ * Uses new column name: parking_area_schedule_id
1181
+ */
1182
+ export const parkingBookingSchema = z
1183
+ .object({
1184
+ id: z.number().openapi({
1185
+ description: 'Booking ID',
1186
+ example: 1
1187
+ }),
1188
+ parking_area_schedule_id: z.number().openapi({
1189
+ description: 'ID of the parking area schedule',
1190
+ example: 456
1191
+ }),
1192
+ status: z.enum(BookingStatus).openapi({
1193
+ description: 'Booking status',
1194
+ example: BookingStatus.BOOKED
1195
+ }),
1196
+ is_active: z.boolean().openapi({
1197
+ description: 'Whether the booking is active',
1198
+ example: true
1199
+ }),
1200
+ created_at: z.string().openapi({
1201
+ description: 'Creation timestamp',
1202
+ example: '2025-12-20T10:30:00Z'
1203
+ }),
1204
+ updated_at: z.string().openapi({
1205
+ description: 'Last update timestamp',
1206
+ example: '2025-12-20T10:30:00Z'
1207
+ }),
1208
+ created_by: z.string().nullable().openapi({
1209
+ description: 'User ID who created the booking',
1210
+ example: 'user-uuid-123'
1211
+ }),
1212
+ updated_by: z.string().nullable().openapi({
1213
+ description: 'User ID who last updated the booking',
1214
+ example: 'user-uuid-123'
1215
+ }),
1216
+ booking_date: z.string().nullable().openapi({
1217
+ description: 'Date of the booking',
1218
+ example: '2025-12-15'
1219
+ }),
1220
+ start_time: z.string().nullable().openapi({
1221
+ description: 'Start time of the booking',
1222
+ example: '08:00'
1223
+ }),
1224
+ end_time: z.string().nullable().openapi({
1225
+ description: 'End time of the booking',
1226
+ example: '08:30'
1227
+ }),
1228
+ company: z.record(z.string(), z.unknown()).nullable().optional().openapi({
1229
+ description: 'Company details (JSONB)'
1230
+ }),
1231
+ vehicle: z.record(z.string(), z.unknown()).nullable().optional().openapi({
1232
+ description: 'Vehicle details (JSONB)'
1233
+ }),
1234
+ // Include the schedule details when joined
1235
+ parking_area_schedule: parkingAreaScheduleSchemaForBooking.optional().openapi({
1236
+ description: 'Associated parking area schedule details'
1237
+ })
1238
+ })
1239
+ .openapi('ParkingBooking');
1240
+ // ------------------------------
1241
+ // Create Parking Booking Schemas
1242
+ // ------------------------------
1243
+ export const createParkingBookingBodySchema = z
1244
+ .object({
1245
+ event_id: z.number().int().positive().openapi({
1246
+ description: 'ID of the event to create the booking for',
1247
+ example: 1
1248
+ }),
1249
+ parking_area_id: z.number().int().positive().openapi({
1250
+ description: 'ID of the parking area',
1251
+ example: 101
1252
+ }),
1253
+ request_type: z
1254
+ .enum([ParkingAreaScheduleType.ASSEMBLY, ParkingAreaScheduleType.DISMANTLING])
1255
+ .default(ParkingAreaScheduleType.ASSEMBLY)
1256
+ .openapi({
1257
+ description: 'Type of request (assembly or dismantling)',
1258
+ example: ParkingAreaScheduleType.ASSEMBLY
1259
+ }),
1260
+ selected_date: z.string().min(1, 'Date is required').openapi({
1261
+ description: 'Selected date (YYYY-MM-DD)',
1262
+ example: '2025-12-15'
1263
+ }),
1264
+ selected_time: z.string().min(1, 'Time is required').openapi({
1265
+ description: 'Selected time slot (HH:MM)',
1266
+ example: '08:00'
1267
+ }),
1268
+ company: companyDetailsSchema.openapi({
1269
+ description: 'Company details including stand, contact, and driver info'
1270
+ }),
1271
+ vehicle: vehicleDetailsSchema.openapi({
1272
+ description: 'Vehicle details'
1273
+ })
1274
+ })
1275
+ .openapi('CreateParkingBookingBody');
1276
+ export const createParkingBookingDataSchema = z
1277
+ .object({
1278
+ booking_id: z.number().openapi({
1279
+ description: 'ID of the created booking',
1280
+ example: 789
1281
+ }),
1282
+ parking_area_schedule_id: z.number().openapi({
1283
+ description: 'ID of the parking area schedule',
1284
+ example: 456
1285
+ }),
1286
+ parking_area_id: z.number().openapi({
1287
+ description: 'ID of the parking area',
1288
+ example: 101
1289
+ }),
1290
+ status: z.enum(BookingStatus).openapi({
1291
+ description: 'Booking status',
1292
+ example: BookingStatus.BOOKED
1293
+ }),
1294
+ booking_date: z.string().openapi({
1295
+ description: 'Booking date',
1296
+ example: '2025-12-15'
1297
+ }),
1298
+ start_time: z.string().openapi({
1299
+ description: 'Start time',
1300
+ example: '08:00'
1301
+ }),
1302
+ end_time: z.string().openapi({
1303
+ description: 'End time',
1304
+ example: '08:30'
1305
+ }),
1306
+ company: companyDetailsSchema.openapi({
1307
+ description: 'Company details'
1308
+ }),
1309
+ vehicle: vehicleDetailsSchema.openapi({
1310
+ description: 'Vehicle details'
1311
+ }),
1312
+ created_at: z.string().openapi({
1313
+ description: 'Timestamp when booking was created',
1314
+ example: '2025-12-20T10:30:00.000Z'
1315
+ }),
1316
+ created_by: z.string().nullable().openapi({
1317
+ description: 'ID of the user who created the booking',
1318
+ example: 'user-123'
1319
+ })
1320
+ })
1321
+ .openapi('CreateParkingBookingData');
1322
+ export const createParkingBookingResponseSchema = createMessageDataResponseSchema(createParkingBookingDataSchema, 'CreateParkingBookingResponse', 'Parking booking created successfully', 'Details of the created parking booking');
1323
+ // ------------------------------
1324
+ // Parking Bookings List Response
1325
+ // ------------------------------
1326
+ export const parkingBookingsDataSchema = z
1327
+ .object({
1328
+ event_id: z.number().openapi({
1329
+ description: 'Event ID',
1330
+ example: 1
1331
+ }),
1332
+ event_code: z.string().openapi({
1333
+ description: 'Event code',
1334
+ example: 'COEC2025'
1335
+ }),
1336
+ event_name: z.string().openapi({
1337
+ description: 'Event name',
1338
+ example: 'COEC 2025'
1339
+ }),
1340
+ bookings: z.array(parkingBookingSchema).openapi({
1341
+ description: 'List of parking bookings'
1342
+ }),
1343
+ total_count: z.number().openapi({
1344
+ description: 'Total number of bookings',
1345
+ example: 25
1346
+ })
1347
+ })
1348
+ .openapi('ParkingBookingsData');
1349
+ export const parkingBookingsResponseSchema = createSuccessResponseSchema(parkingBookingsDataSchema, 'ParkingBookingsResponse', 'Parking bookings data with parking area details');
@@ -135,3 +135,5 @@ export type PhaseSlotItem = z.infer<typeof phaseSlotItemSchema>;
135
135
  export type GetPhaseSlotsResponse = z.infer<typeof getPhaseSlotsResponseSchema>;
136
136
  export type GetCompanyRolesByEventIdParams = z.infer<typeof getCompanyRolesByEventIdParamsSchema>;
137
137
  export type GetCompanyRolesByEventIdResponse = z.infer<typeof getCompanyRolesByEventIdResponseSchema>;
138
+ export { pointSchema, polygonCoordinatesSchema, rectangleGeometrySchema, geoJsonPolygonSchema, parkingAreaItemSchema, parkingAreaWithSchedulesSchema, getParkingAreasByEventIdParamsSchema, getParkingAreaByIdParamsSchema, createParkingAreaBodySchema, createParkingAreaDataSchema, createParkingAreaResponseSchema, bulkCreateParkingAreasBodySchema, bulkCreateParkingAreasDataSchema, bulkCreateParkingAreasResponseSchema, updateParkingAreaParamsSchema, updateParkingAreaBodySchema, updateParkingAreaDataSchema, updateParkingAreaResponseSchema, deleteParkingAreaParamsSchema, deleteParkingAreaDataSchema, deleteParkingAreaResponseSchema, getParkingAreasDataSchema, getParkingAreasResponseSchema, getParkingAreaDetailResponseSchema, parkingAreaScheduleSchema, upsertParkingAreaScheduleItemSchema, deleteParkingAreaScheduleItemSchema, upsertParkingAreaSchedulesBodySchema, upsertParkingAreaSchedulesDataSchema, upsertParkingAreaSchedulesResponseSchema, uploadSitePlanImageParamsSchema, uploadSitePlanImageDataSchema, uploadSitePlanImageResponseSchema, getAvailableParkingAreaSlotsQuerySchema, availableParkingAreaTimeSlotSchema, availableParkingAreaSlotsResponseSchema } from './parkingArea.js';
139
+ export type { Point, PolygonCoordinates, RectangleGeometry, GeoJsonPolygon, ParkingAreaItem, ParkingAreaWithSchedules, GetParkingAreasByEventIdParams, GetParkingAreaByIdParams, CreateParkingAreaBody, CreateParkingAreaData, CreateParkingAreaResponse, BulkCreateParkingAreasBody, BulkCreateParkingAreasData, BulkCreateParkingAreasResponse, UpdateParkingAreaParams, UpdateParkingAreaBody, UpdateParkingAreaData, UpdateParkingAreaResponse, DeleteParkingAreaParams, DeleteParkingAreaData, DeleteParkingAreaResponse, GetParkingAreasData, GetParkingAreasResponse, GetParkingAreaDetailResponse, ParkingAreaSchedule, UpsertParkingAreaScheduleItem, DeleteParkingAreaScheduleItem, UpsertParkingAreaSchedulesBody, UpsertParkingAreaSchedulesData, UpsertParkingAreaSchedulesResponse, UploadSitePlanImageParams, UploadSitePlanImageData, UploadSitePlanImageResponse, GetAvailableParkingAreaSlotsQuery, AvailableParkingAreaTimeSlot, AvailableParkingAreaSlotsResponse } from './parkingArea.js';
package/dist/phaseSlot.js CHANGED
@@ -259,3 +259,18 @@ export const getCompanyRolesByEventIdResponseSchema = z
259
259
  })
260
260
  })
261
261
  .openapi('GetCompanyRolesByEventIdResponse');
262
+ // ======================================================================
263
+ // RE-EXPORTS FROM parkingArea.ts
264
+ // These provide convenient access to parking area schemas from this module
265
+ // ======================================================================
266
+ export {
267
+ // Geometry schemas
268
+ pointSchema, polygonCoordinatesSchema, rectangleGeometrySchema, geoJsonPolygonSchema,
269
+ // Parking area schemas
270
+ parkingAreaItemSchema, parkingAreaWithSchedulesSchema, getParkingAreasByEventIdParamsSchema, getParkingAreaByIdParamsSchema, createParkingAreaBodySchema, createParkingAreaDataSchema, createParkingAreaResponseSchema, bulkCreateParkingAreasBodySchema, bulkCreateParkingAreasDataSchema, bulkCreateParkingAreasResponseSchema, updateParkingAreaParamsSchema, updateParkingAreaBodySchema, updateParkingAreaDataSchema, updateParkingAreaResponseSchema, deleteParkingAreaParamsSchema, deleteParkingAreaDataSchema, deleteParkingAreaResponseSchema, getParkingAreasDataSchema, getParkingAreasResponseSchema, getParkingAreaDetailResponseSchema,
271
+ // Parking area schedule schemas
272
+ parkingAreaScheduleSchema, upsertParkingAreaScheduleItemSchema, deleteParkingAreaScheduleItemSchema, upsertParkingAreaSchedulesBodySchema, upsertParkingAreaSchedulesDataSchema, upsertParkingAreaSchedulesResponseSchema,
273
+ // Site plan image upload
274
+ uploadSitePlanImageParamsSchema, uploadSitePlanImageDataSchema, uploadSitePlanImageResponseSchema,
275
+ // Available slots (parking area version)
276
+ getAvailableParkingAreaSlotsQuerySchema, availableParkingAreaTimeSlotSchema, availableParkingAreaSlotsResponseSchema } from './parkingArea.js';
package/package.json CHANGED
@@ -1,67 +1,75 @@
1
- {
2
- "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.3.0",
4
- "description": "Shared schemas and types for Phasing Engine API",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- },
13
- "./auth": {
14
- "types": "./dist/auth.d.ts",
15
- "import": "./dist/auth.js"
16
- },
17
- "./common": {
18
- "types": "./dist/common.d.ts",
19
- "import": "./dist/common.js"
20
- },
21
- "./pagination": {
22
- "types": "./dist/pagination.d.ts",
23
- "import": "./dist/pagination.js"
24
- },
25
- "./phaseBooking": {
26
- "types": "./dist/phaseBooking.d.ts",
27
- "import": "./dist/phaseBooking.js"
28
- },
29
- "./phaseSlot": {
30
- "types": "./dist/phaseSlot.d.ts",
31
- "import": "./dist/phaseSlot.js"
32
- },
33
- "./event": {
34
- "types": "./dist/event.d.ts",
35
- "import": "./dist/event.js"
36
- }
37
- },
38
- "files": [
39
- "dist"
40
- ],
41
- "scripts": {
42
- "build": "npm run clean && tsc",
43
- "dev": "tsc --watch",
44
- "clean": "rm -rf dist",
45
- "prepublishOnly": "npm run build"
46
- },
47
- "keywords": [
48
- "schemas",
49
- "validation",
50
- "types",
51
- "zod",
52
- "phasing-engine"
53
- ],
54
- "license": "MIT",
55
- "dependencies": {
56
- "@asteasolutions/zod-to-openapi": "^8.1.0",
57
- "zod": "^4.1.13"
58
- },
59
- "devDependencies": {
60
- "typescript": "^5.6.3"
61
- },
62
- "repository": {
63
- "type": "git",
64
- "url": "git+https://github.com/manaty/phasing_engine.git",
65
- "directory": "packages/phasing-schemas"
66
- }
67
- }
1
+ {
2
+ "name": "@venulog/phasing-engine-schemas",
3
+ "version": "0.3.1",
4
+ "description": "Shared schemas and types for Phasing Engine API",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./auth": {
14
+ "types": "./dist/auth.d.ts",
15
+ "import": "./dist/auth.js"
16
+ },
17
+ "./common": {
18
+ "types": "./dist/common.d.ts",
19
+ "import": "./dist/common.js"
20
+ },
21
+ "./pagination": {
22
+ "types": "./dist/pagination.d.ts",
23
+ "import": "./dist/pagination.js"
24
+ },
25
+ "./phaseBooking": {
26
+ "types": "./dist/phaseBooking.d.ts",
27
+ "import": "./dist/phaseBooking.js"
28
+ },
29
+ "./phaseSlot": {
30
+ "types": "./dist/phaseSlot.d.ts",
31
+ "import": "./dist/phaseSlot.js"
32
+ },
33
+ "./event": {
34
+ "types": "./dist/event.d.ts",
35
+ "import": "./dist/event.js"
36
+ },
37
+ "./parkingArea": {
38
+ "types": "./dist/parkingArea.d.ts",
39
+ "import": "./dist/parkingArea.js"
40
+ },
41
+ "./enums": {
42
+ "types": "./dist/enums/index.d.ts",
43
+ "import": "./dist/enums/index.js"
44
+ }
45
+ },
46
+ "files": [
47
+ "dist"
48
+ ],
49
+ "scripts": {
50
+ "build": "npm run clean && tsc",
51
+ "dev": "tsc --watch",
52
+ "clean": "rm -rf dist",
53
+ "prepublishOnly": "npm run build"
54
+ },
55
+ "keywords": [
56
+ "schemas",
57
+ "validation",
58
+ "types",
59
+ "zod",
60
+ "phasing-engine"
61
+ ],
62
+ "license": "MIT",
63
+ "dependencies": {
64
+ "@asteasolutions/zod-to-openapi": "^8.1.0",
65
+ "zod": "^4.1.13"
66
+ },
67
+ "devDependencies": {
68
+ "typescript": "^5.6.3"
69
+ },
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "git+https://github.com/manaty/phasing_engine.git",
73
+ "directory": "packages/phasing-schemas"
74
+ }
75
+ }