@venulog/phasing-engine-schemas 0.7.5 → 0.7.6

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.
@@ -0,0 +1,385 @@
1
+ // packages/phasing-schemas/src/parkingAreaLayer.ts
2
+ import { z } from './zod.js';
3
+ import { createSuccessResponseSchema, createMessageDataResponseSchema } from './common.js';
4
+ // ------------------------------
5
+ // Layer Transform Schema
6
+ // ------------------------------
7
+ /**
8
+ * Transform data for layer positioning and rotation
9
+ */
10
+ export const layerTransformSchema = z
11
+ .object({
12
+ left: z.number().openapi({
13
+ description: 'Horizontal position offset in pixels',
14
+ example: 100
15
+ }),
16
+ top: z.number().openapi({
17
+ description: 'Vertical position offset in pixels',
18
+ example: 50
19
+ }),
20
+ scaleX: z.number().positive().openapi({
21
+ description: 'Horizontal scale factor',
22
+ example: 1.2
23
+ }),
24
+ scaleY: z.number().positive().openapi({
25
+ description: 'Vertical scale factor',
26
+ example: 1.2
27
+ }),
28
+ angle: z.number().min(-180).max(180).openapi({
29
+ description: 'Rotation angle in degrees',
30
+ example: 15
31
+ })
32
+ })
33
+ .openapi('LayerTransform');
34
+ // ------------------------------
35
+ // Parking Area Layer Schemas
36
+ // ------------------------------
37
+ /**
38
+ * Core parking area layer item schema matching database structure
39
+ */
40
+ export const parkingAreaLayerItemSchema = z
41
+ .object({
42
+ id: z.number().int().positive().openapi({
43
+ description: 'Layer ID',
44
+ example: 1
45
+ }),
46
+ event_id: z.number().int().positive().openapi({
47
+ description: 'Event ID this layer belongs to',
48
+ example: 1
49
+ }),
50
+ name: z.string().openapi({
51
+ description: 'Name of the layer',
52
+ example: 'Ground Floor Plan'
53
+ }),
54
+ layer_order: z.number().int().nonnegative().openapi({
55
+ description: 'Display order (lower numbers appear first)',
56
+ example: 0
57
+ }),
58
+ image_url: z.string().url().openapi({
59
+ description: 'URL to the layer image',
60
+ example: 'https://storage.example.com/layers/floor-1.png'
61
+ }),
62
+ visible: z.boolean().openapi({
63
+ description: 'Whether the layer is visible',
64
+ example: true
65
+ }),
66
+ opacity: z.number().min(0).max(1).openapi({
67
+ description: 'Layer opacity (0.0 to 1.0)',
68
+ example: 0.8
69
+ }),
70
+ altitude_meters: z.number().min(-100).max(100).openapi({
71
+ description: 'Altitude in meters for 3D rendering (-100 to +100)',
72
+ example: 0
73
+ }),
74
+ transform: layerTransformSchema.openapi({
75
+ description: 'Transform data for layer positioning and rotation'
76
+ }),
77
+ is_active: z.boolean().openapi({
78
+ description: 'Whether the layer is active',
79
+ example: true
80
+ }),
81
+ created_at: z.string().openapi({
82
+ description: 'Creation timestamp (ISO 8601)',
83
+ example: '2026-01-06T10:30:00Z'
84
+ }),
85
+ updated_at: z.string().openapi({
86
+ description: 'Last update timestamp (ISO 8601)',
87
+ example: '2026-01-06T10:30:00Z'
88
+ }),
89
+ created_by: z.string().uuid().nullable().openapi({
90
+ description: 'UUID of user who created this layer',
91
+ example: '550e8400-e29b-41d4-a716-446655440000'
92
+ }),
93
+ updated_by: z.string().uuid().nullable().openapi({
94
+ description: 'UUID of user who last updated this layer',
95
+ example: '550e8400-e29b-41d4-a716-446655440000'
96
+ })
97
+ })
98
+ .openapi('ParkingAreaLayerItem');
99
+ // ------------------------------
100
+ // Query Schemas
101
+ // ------------------------------
102
+ export const getLayersByEventIdParamsSchema = z
103
+ .object({
104
+ eventId: z
105
+ .string()
106
+ .min(1)
107
+ .transform(val => parseInt(val, 10))
108
+ .refine(val => !isNaN(val) && val > 0, {
109
+ message: 'Event ID must be a positive number'
110
+ })
111
+ .openapi({
112
+ description: 'The ID of the event',
113
+ example: '1'
114
+ })
115
+ })
116
+ .openapi('GetLayersByEventIdParams');
117
+ export const getLayerByIdParamsSchema = z
118
+ .object({
119
+ layerId: z
120
+ .string()
121
+ .min(1)
122
+ .transform(val => parseInt(val, 10))
123
+ .refine(val => !isNaN(val) && val > 0, {
124
+ message: 'Layer ID must be a positive number'
125
+ })
126
+ .openapi({
127
+ description: 'The ID of the layer',
128
+ example: '1'
129
+ })
130
+ })
131
+ .openapi('GetLayerByIdParams');
132
+ // ------------------------------
133
+ // Create Layer Schemas
134
+ // ------------------------------
135
+ export const createLayerBodySchema = z
136
+ .object({
137
+ event_id: z.number().int().positive().openapi({
138
+ description: 'ID of the event',
139
+ example: 1
140
+ }),
141
+ name: z.string().min(1).max(255).openapi({
142
+ description: 'Name of the layer',
143
+ example: 'Ground Floor Plan'
144
+ }),
145
+ layer_order: z.number().int().nonnegative().optional().openapi({
146
+ description: 'Display order (auto-assigned if not provided)',
147
+ example: 0
148
+ }),
149
+ image_url: z.string().url().openapi({
150
+ description: 'URL to the layer image',
151
+ example: 'https://storage.example.com/layers/floor-1.png'
152
+ }),
153
+ visible: z.boolean().default(true).openapi({
154
+ description: 'Whether the layer is visible',
155
+ example: true
156
+ }),
157
+ opacity: z.number().min(0).max(1).default(1).openapi({
158
+ description: 'Layer opacity (0.0 to 1.0)',
159
+ example: 1
160
+ }),
161
+ altitude_meters: z.number().min(-100).max(100).default(0).openapi({
162
+ description: 'Altitude in meters for 3D rendering',
163
+ example: 0
164
+ }),
165
+ transform: layerTransformSchema
166
+ .default({ left: 0, top: 0, scaleX: 1, scaleY: 1, angle: 0 })
167
+ .openapi({
168
+ description: 'Transform data for layer positioning'
169
+ })
170
+ })
171
+ .openapi('CreateLayerBody');
172
+ export const createLayerDataSchema = z
173
+ .object({
174
+ layer_id: z.number().openapi({
175
+ description: 'ID of the created layer',
176
+ example: 1
177
+ }),
178
+ event_id: z.number().openapi({
179
+ description: 'ID of the event',
180
+ example: 1
181
+ }),
182
+ name: z.string().openapi({
183
+ description: 'Name of the layer',
184
+ example: 'Ground Floor Plan'
185
+ }),
186
+ layer_order: z.number().openapi({
187
+ description: 'Display order',
188
+ example: 0
189
+ }),
190
+ image_url: z.string().openapi({
191
+ description: 'URL to the layer image'
192
+ }),
193
+ visible: z.boolean().openapi({
194
+ description: 'Whether the layer is visible',
195
+ example: true
196
+ }),
197
+ opacity: z.number().openapi({
198
+ description: 'Layer opacity',
199
+ example: 1
200
+ }),
201
+ altitude_meters: z.number().openapi({
202
+ description: 'Altitude in meters',
203
+ example: 0
204
+ }),
205
+ transform: layerTransformSchema.openapi({
206
+ description: 'Transform data'
207
+ }),
208
+ created_at: z.string().openapi({
209
+ description: 'Timestamp when layer was created'
210
+ }),
211
+ created_by: z.string().nullable().openapi({
212
+ description: 'ID of the user who created the layer'
213
+ })
214
+ })
215
+ .openapi('CreateLayerData');
216
+ export const createLayerResponseSchema = createMessageDataResponseSchema(createLayerDataSchema, 'CreateLayerResponse', 'Layer created successfully', 'Details of the created layer');
217
+ // ------------------------------
218
+ // Update Layer Schemas
219
+ // ------------------------------
220
+ export const updateLayerParamsSchema = z
221
+ .object({
222
+ layerId: z
223
+ .string()
224
+ .min(1)
225
+ .transform(val => parseInt(val, 10))
226
+ .refine(val => !isNaN(val) && val > 0, {
227
+ message: 'Layer ID must be a positive number'
228
+ })
229
+ .openapi({
230
+ description: 'The ID of the layer to update',
231
+ example: '1'
232
+ })
233
+ })
234
+ .openapi('UpdateLayerParams');
235
+ export const updateLayerBodySchema = z
236
+ .object({
237
+ name: z.string().min(1).max(255).optional().openapi({
238
+ description: 'New name for the layer'
239
+ }),
240
+ layer_order: z.number().int().nonnegative().optional().openapi({
241
+ description: 'New display order'
242
+ }),
243
+ visible: z.boolean().optional().openapi({
244
+ description: 'Whether the layer is visible'
245
+ }),
246
+ opacity: z.number().min(0).max(1).optional().openapi({
247
+ description: 'New opacity value'
248
+ }),
249
+ altitude_meters: z.number().min(-100).max(100).optional().openapi({
250
+ description: 'New altitude in meters'
251
+ }),
252
+ transform: layerTransformSchema.optional().openapi({
253
+ description: 'New transform data'
254
+ }),
255
+ is_active: z.boolean().optional().openapi({
256
+ description: 'Whether the layer is active'
257
+ })
258
+ })
259
+ .refine(data => Object.keys(data).length > 0, {
260
+ message: 'At least one field must be provided for update'
261
+ })
262
+ .openapi('UpdateLayerBody');
263
+ export const updateLayerDataSchema = createLayerDataSchema
264
+ .extend({
265
+ updated_at: z.string().openapi({
266
+ description: 'Timestamp when layer was updated'
267
+ }),
268
+ updated_by: z.string().nullable().openapi({
269
+ description: 'ID of the user who updated the layer'
270
+ })
271
+ })
272
+ .omit({ layer_id: true })
273
+ .extend({
274
+ layer_id: z.number().openapi({
275
+ description: 'ID of the updated layer'
276
+ })
277
+ })
278
+ .openapi('UpdateLayerData');
279
+ export const updateLayerResponseSchema = createMessageDataResponseSchema(updateLayerDataSchema, 'UpdateLayerResponse', 'Layer updated successfully', 'Details of the updated layer');
280
+ // ------------------------------
281
+ // Delete Layer Schemas
282
+ // ------------------------------
283
+ export const deleteLayerParamsSchema = z
284
+ .object({
285
+ layerId: z
286
+ .string()
287
+ .min(1)
288
+ .transform(val => parseInt(val, 10))
289
+ .refine(val => !isNaN(val) && val > 0, {
290
+ message: 'Layer ID must be a positive number'
291
+ })
292
+ .openapi({
293
+ description: 'The ID of the layer to delete',
294
+ example: '1'
295
+ })
296
+ })
297
+ .openapi('DeleteLayerParams');
298
+ export const deleteLayerDataSchema = z
299
+ .object({
300
+ layer_id: z.number().openapi({
301
+ description: 'ID of the deleted layer',
302
+ example: 1
303
+ }),
304
+ deleted_at: z.string().openapi({
305
+ description: 'Timestamp when layer was deleted'
306
+ })
307
+ })
308
+ .openapi('DeleteLayerData');
309
+ export const deleteLayerResponseSchema = createMessageDataResponseSchema(deleteLayerDataSchema, 'DeleteLayerResponse', 'Layer deleted successfully', 'Details of the deleted layer');
310
+ // ------------------------------
311
+ // Get Layers Response Schemas
312
+ // ------------------------------
313
+ export const getLayersDataSchema = z
314
+ .object({
315
+ event_id: z.number().openapi({
316
+ description: 'ID of the event',
317
+ example: 1
318
+ }),
319
+ layers: z.array(parkingAreaLayerItemSchema).openapi({
320
+ description: 'List of layers for the event, ordered by layer_order'
321
+ }),
322
+ total_count: z.number().openapi({
323
+ description: 'Total number of layers',
324
+ example: 3
325
+ })
326
+ })
327
+ .openapi('GetLayersData');
328
+ export const getLayersResponseSchema = createSuccessResponseSchema(getLayersDataSchema, 'GetLayersResponse', 'Layers for the event');
329
+ export const getLayerDetailResponseSchema = createSuccessResponseSchema(parkingAreaLayerItemSchema, 'GetLayerDetailResponse', 'Layer details');
330
+ // ------------------------------
331
+ // Bulk Upsert Layers Schemas
332
+ // ------------------------------
333
+ export const bulkUpsertLayersBodySchema = z
334
+ .object({
335
+ event_id: z.number().int().positive().openapi({
336
+ description: 'ID of the event',
337
+ example: 1
338
+ }),
339
+ layers: z
340
+ .array(z.object({
341
+ id: z.number().int().positive().optional().openapi({
342
+ description: 'Layer ID (for updates). Omit for new layers.'
343
+ }),
344
+ name: z.string().min(1).max(255).openapi({
345
+ description: 'Name of the layer'
346
+ }),
347
+ layer_order: z.number().int().nonnegative().openapi({
348
+ description: 'Display order'
349
+ }),
350
+ image_url: z.string().url().openapi({
351
+ description: 'URL to the layer image'
352
+ }),
353
+ visible: z.boolean().default(true),
354
+ opacity: z.number().min(0).max(1).default(1),
355
+ altitude_meters: z.number().min(-100).max(100).default(0),
356
+ transform: layerTransformSchema.default({
357
+ left: 0,
358
+ top: 0,
359
+ scaleX: 1,
360
+ scaleY: 1,
361
+ angle: 0
362
+ })
363
+ }))
364
+ .min(1, 'At least one layer must be provided')
365
+ .openapi({
366
+ description: 'Array of layers to create or update'
367
+ })
368
+ })
369
+ .openapi('BulkUpsertLayersBody');
370
+ export const bulkUpsertLayersDataSchema = z
371
+ .object({
372
+ event_id: z.number().openapi({
373
+ description: 'ID of the event',
374
+ example: 1
375
+ }),
376
+ total_upserted: z.number().openapi({
377
+ description: 'Total number of layers successfully upserted',
378
+ example: 3
379
+ }),
380
+ upserted_layers: z.array(parkingAreaLayerItemSchema).openapi({
381
+ description: 'Array of successfully upserted layers'
382
+ })
383
+ })
384
+ .openapi('BulkUpsertLayersData');
385
+ export const bulkUpsertLayersResponseSchema = createMessageDataResponseSchema(bulkUpsertLayersDataSchema, 'BulkUpsertLayersResponse', 'Layers upserted successfully', 'Details of the upserted layers');
@@ -67,9 +67,9 @@ export declare const parkingBookingSchema: z.ZodObject<{
67
67
  }>;
68
68
  company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
69
69
  vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
70
- PL: import("./enums/vehicleType.js").VehicleType.PL;
71
- VUL: import("./enums/vehicleType.js").VehicleType.VUL;
72
- VL: import("./enums/vehicleType.js").VehicleType.VL;
70
+ PL: import("./index.js").VehicleType.PL;
71
+ VUL: import("./index.js").VehicleType.VUL;
72
+ VL: import("./index.js").VehicleType.VL;
73
73
  }>>>;
74
74
  created_at: z.ZodString;
75
75
  updated_at: z.ZodString;
@@ -91,7 +91,7 @@ export declare const companyDetailsSchema: z.ZodObject<{
91
91
  transport_company: z.ZodString;
92
92
  }, z.core.$strip>;
93
93
  export declare const vehicleDetailsSchema: z.ZodObject<{
94
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
94
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
95
95
  unloading_method: z.ZodEnum<typeof UnloadingType>;
96
96
  license_plate: z.ZodString;
97
97
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -130,9 +130,9 @@ export declare const eventBookingsDataSchema: z.ZodObject<{
130
130
  }>;
131
131
  company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
132
132
  vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
133
- PL: import("./enums/vehicleType.js").VehicleType.PL;
134
- VUL: import("./enums/vehicleType.js").VehicleType.VUL;
135
- VL: import("./enums/vehicleType.js").VehicleType.VL;
133
+ PL: import("./index.js").VehicleType.PL;
134
+ VUL: import("./index.js").VehicleType.VUL;
135
+ VL: import("./index.js").VehicleType.VL;
136
136
  }>>>;
137
137
  created_at: z.ZodString;
138
138
  updated_at: z.ZodString;
@@ -178,9 +178,9 @@ export declare const eventBookingsResponseSchema: z.ZodObject<{
178
178
  }>;
179
179
  company_roles: z.ZodNullable<z.ZodArray<z.ZodString>>;
180
180
  vehicle_types: z.ZodNullable<z.ZodArray<z.ZodEnum<{
181
- PL: import("./enums/vehicleType.js").VehicleType.PL;
182
- VUL: import("./enums/vehicleType.js").VehicleType.VUL;
183
- VL: import("./enums/vehicleType.js").VehicleType.VL;
181
+ PL: import("./index.js").VehicleType.PL;
182
+ VUL: import("./index.js").VehicleType.VUL;
183
+ VL: import("./index.js").VehicleType.VL;
184
184
  }>>>;
185
185
  created_at: z.ZodString;
186
186
  updated_at: z.ZodString;
@@ -213,7 +213,8 @@ export declare const closeEventResponseSchema: z.ZodObject<{
213
213
  reason: z.ZodNullable<z.ZodString>;
214
214
  }, z.core.$strip>;
215
215
  }, z.core.$strip>;
216
- export declare const confirmExitBodySchema: z.ZodObject<{
216
+ export declare const confirmAccessBodySchema: z.ZodObject<{
217
+ event_id: z.ZodNumber;
217
218
  plate_number: z.ZodOptional<z.ZodObject<{
218
219
  url: z.ZodString;
219
220
  name: z.ZodString;
@@ -286,7 +287,7 @@ export declare const bookingDetailsDataSchema: z.ZodObject<{
286
287
  transport_company: z.ZodString;
287
288
  }, z.core.$strip>;
288
289
  vehicle: z.ZodObject<{
289
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
290
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
290
291
  unloading_method: z.ZodEnum<typeof UnloadingType>;
291
292
  license_plate: z.ZodString;
292
293
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -327,7 +328,7 @@ export declare const createParkingBookingBodySchema: z.ZodObject<{
327
328
  }, z.core.$strip>;
328
329
  company_role: z.ZodString;
329
330
  vehicle: z.ZodObject<{
330
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
331
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
331
332
  unloading_method: z.ZodEnum<typeof UnloadingType>;
332
333
  license_plate: z.ZodString;
333
334
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -354,7 +355,7 @@ export declare const createParkingBookingDataSchema: z.ZodObject<{
354
355
  transport_company: z.ZodString;
355
356
  }, z.core.$strip>;
356
357
  vehicle: z.ZodObject<{
357
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
358
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
358
359
  unloading_method: z.ZodEnum<typeof UnloadingType>;
359
360
  license_plate: z.ZodString;
360
361
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -387,7 +388,7 @@ export declare const createParkingBookingResponseSchema: z.ZodObject<{
387
388
  transport_company: z.ZodString;
388
389
  }, z.core.$strip>;
389
390
  vehicle: z.ZodObject<{
390
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
391
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
391
392
  unloading_method: z.ZodEnum<typeof UnloadingType>;
392
393
  license_plate: z.ZodString;
393
394
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -414,7 +415,7 @@ export declare const updateParkingBookingBodySchema: z.ZodObject<{
414
415
  transport_company: z.ZodString;
415
416
  }, z.core.$strip>>;
416
417
  vehicle: z.ZodOptional<z.ZodObject<{
417
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
418
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
418
419
  unloading_method: z.ZodEnum<typeof UnloadingType>;
419
420
  license_plate: z.ZodString;
420
421
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -438,7 +439,7 @@ export declare const updateParkingBookingDataSchema: z.ZodObject<{
438
439
  transport_company: z.ZodString;
439
440
  }, z.core.$strip>>;
440
441
  vehicle: z.ZodNullable<z.ZodObject<{
441
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
442
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
442
443
  unloading_method: z.ZodEnum<typeof UnloadingType>;
443
444
  license_plate: z.ZodString;
444
445
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -466,7 +467,7 @@ export declare const updateParkingBookingResponseSchema: z.ZodObject<{
466
467
  transport_company: z.ZodString;
467
468
  }, z.core.$strip>>;
468
469
  vehicle: z.ZodNullable<z.ZodObject<{
469
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
470
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
470
471
  unloading_method: z.ZodEnum<typeof UnloadingType>;
471
472
  license_plate: z.ZodString;
472
473
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -576,7 +577,7 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
576
577
  transport_company: z.ZodString;
577
578
  }, z.core.$strip>;
578
579
  vehicle: z.ZodObject<{
579
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
580
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
580
581
  unloading_method: z.ZodEnum<typeof UnloadingType>;
581
582
  license_plate: z.ZodString;
582
583
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -631,7 +632,7 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
631
632
  transport_company: z.ZodString;
632
633
  }, z.core.$strip>;
633
634
  vehicle: z.ZodObject<{
634
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
635
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
635
636
  unloading_method: z.ZodEnum<typeof UnloadingType>;
636
637
  license_plate: z.ZodString;
637
638
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -690,7 +691,7 @@ export declare const getParkingBookingDetailsByTokenResponseSchema: z.ZodObject<
690
691
  transport_company: z.ZodString;
691
692
  }, z.core.$strip>;
692
693
  vehicle: z.ZodObject<{
693
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
694
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
694
695
  unloading_method: z.ZodEnum<typeof UnloadingType>;
695
696
  license_plate: z.ZodString;
696
697
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -743,7 +744,7 @@ export declare const getParkingBookingDetailsByQrResponseSchema: z.ZodObject<{
743
744
  transport_company: z.ZodString;
744
745
  }, z.core.$strip>;
745
746
  vehicle: z.ZodObject<{
746
- vehicle_type: z.ZodEnum<typeof import("./enums/vehicleType.js").VehicleType>;
747
+ vehicle_type: z.ZodEnum<typeof import("./index.js").VehicleType>;
747
748
  unloading_method: z.ZodEnum<typeof UnloadingType>;
748
749
  license_plate: z.ZodString;
749
750
  trailer_registration: z.ZodOptional<z.ZodString>;
@@ -816,6 +817,36 @@ export declare const exportBookingsResponseSchema: z.ZodObject<{
816
817
  filters_applied: z.ZodRecord<z.ZodString, z.ZodUnknown>;
817
818
  }, z.core.$strip>;
818
819
  }, z.core.$strip>;
820
+ export declare const updateBookingTimeParamsSchema: z.ZodObject<{
821
+ bookingId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
822
+ }, z.core.$strip>;
823
+ export declare const updateBookingTimeBodySchema: z.ZodObject<{
824
+ booking_date: z.ZodString;
825
+ start_time: z.ZodString;
826
+ parking_area_schedule_id: z.ZodNumber;
827
+ }, z.core.$strip>;
828
+ export declare const updateBookingTimeDataSchema: z.ZodObject<{
829
+ booking_id: z.ZodNumber;
830
+ parking_area_schedule_id: z.ZodNumber;
831
+ booking_date: z.ZodString;
832
+ start_time: z.ZodString;
833
+ end_time: z.ZodString;
834
+ updated_at: z.ZodString;
835
+ updated_by: z.ZodNullable<z.ZodString>;
836
+ }, z.core.$strip>;
837
+ export declare const updateBookingTimeResponseSchema: z.ZodObject<{
838
+ success: z.ZodBoolean;
839
+ message: z.ZodString;
840
+ data: z.ZodObject<{
841
+ booking_id: z.ZodNumber;
842
+ parking_area_schedule_id: z.ZodNumber;
843
+ booking_date: z.ZodString;
844
+ start_time: z.ZodString;
845
+ end_time: z.ZodString;
846
+ updated_at: z.ZodString;
847
+ updated_by: z.ZodNullable<z.ZodString>;
848
+ }, z.core.$strip>;
849
+ }, z.core.$strip>;
819
850
  export type Geometry = z.infer<typeof geometrySchema>;
820
851
  export type ParkingBooking = z.infer<typeof parkingBookingSchema>;
821
852
  export type CompanyDetails = z.infer<typeof companyDetailsSchema>;
@@ -833,7 +864,7 @@ export type CloseEventBody = z.infer<typeof closeEventBodySchema>;
833
864
  export type CloseEventData = z.infer<typeof closeEventDataSchema>;
834
865
  export type CloseEventResponse = z.infer<typeof closeEventResponseSchema>;
835
866
  export type EventBookingsResponse = z.infer<typeof eventBookingsResponseSchema>;
836
- export type ConfirmExitData = z.infer<typeof confirmExitBodySchema>;
867
+ export type ConfirmVehicleAccessData = z.infer<typeof confirmAccessBodySchema>;
837
868
  export type ConfirmBookingParams = z.infer<typeof confirmBookingParamsSchema>;
838
869
  export type ConfirmBookingResponse = z.infer<typeof confirmBookingResponseSchema>;
839
870
  export type CreateBookingBody = z.infer<typeof createParkingBookingBodySchema>;
@@ -857,3 +888,7 @@ export type ExportBookingData = z.infer<typeof exportBookingDataSchema>;
857
888
  export type ExportBookingsQuery = z.infer<typeof exportBookingsQuerySchema>;
858
889
  export type ExportBookingsData = z.infer<typeof exportBookingsDataSchema>;
859
890
  export type ExportBookingsResponse = z.infer<typeof exportBookingsResponseSchema>;
891
+ export type UpdateBookingTimeParams = z.infer<typeof updateBookingTimeParamsSchema>;
892
+ export type UpdateBookingTimeBody = z.infer<typeof updateBookingTimeBodySchema>;
893
+ export type UpdateBookingTimeData = z.infer<typeof updateBookingTimeDataSchema>;
894
+ export type UpdateBookingTimeResponse = z.infer<typeof updateBookingTimeResponseSchema>;
@@ -212,7 +212,11 @@ export const closeEventDataSchema = z
212
212
  })
213
213
  .openapi('CloseEventData');
214
214
  export const closeEventResponseSchema = createMessageDataResponseSchema(closeEventDataSchema, 'CloseEventResponse', 'Event phase closed successfully', 'Details of the closed event phase');
215
- export const confirmExitBodySchema = z.object({
215
+ export const confirmAccessBodySchema = z.object({
216
+ event_id: z.number().openapi({
217
+ description: 'ID of the event',
218
+ example: 1
219
+ }),
216
220
  plate_number: z
217
221
  .object({
218
222
  url: z.string().openapi({
@@ -830,3 +834,72 @@ export const exportBookingsDataSchema = z
830
834
  })
831
835
  .openapi('ExportBookingsData');
832
836
  export const exportBookingsResponseSchema = createSuccessResponseSchema(exportBookingsDataSchema, 'ExportBookingsResponse', 'Exported parking bookings data');
837
+ export const updateBookingTimeParamsSchema = z
838
+ .object({
839
+ bookingId: z
840
+ .string()
841
+ .transform(val => parseInt(val, 10))
842
+ .refine(val => !isNaN(val) && val > 0, {
843
+ message: 'Booking ID must be a positive number'
844
+ })
845
+ .openapi({
846
+ description: 'Parking booking ID',
847
+ example: '1'
848
+ })
849
+ })
850
+ .openapi('UpdateBookingTimeParams');
851
+ export const updateBookingTimeBodySchema = z
852
+ .object({
853
+ booking_date: z
854
+ .string()
855
+ .regex(/^\d{4}-\d{2}-\d{2}$/, 'Date must be in YYYY-MM-DD format')
856
+ .openapi({
857
+ description: 'New booking date (YYYY-MM-DD)',
858
+ example: '2025-12-25'
859
+ }),
860
+ start_time: z
861
+ .string()
862
+ .regex(/^\d{2}:\d{2}$/, 'Time must be in HH:MM format')
863
+ .openapi({
864
+ description: 'New start time (HH:MM)',
865
+ example: '10:00'
866
+ }),
867
+ parking_area_schedule_id: z.number().int().positive().openapi({
868
+ description: 'New parking area schedule ID',
869
+ example: 5
870
+ })
871
+ })
872
+ .openapi('UpdateBookingTimeBody');
873
+ export const updateBookingTimeDataSchema = z
874
+ .object({
875
+ booking_id: z.number().openapi({
876
+ description: 'ID of the updated booking',
877
+ example: 1
878
+ }),
879
+ parking_area_schedule_id: z.number().openapi({
880
+ description: 'New parking area schedule ID',
881
+ example: 5
882
+ }),
883
+ booking_date: z.string().openapi({
884
+ description: 'New booking date',
885
+ example: '2025-12-25'
886
+ }),
887
+ start_time: z.string().openapi({
888
+ description: 'New start time',
889
+ example: '10:00'
890
+ }),
891
+ end_time: z.string().openapi({
892
+ description: 'Calculated end time based on schedule duration',
893
+ example: '13:00'
894
+ }),
895
+ updated_at: z.string().openapi({
896
+ description: 'Timestamp when booking was updated',
897
+ example: '2025-12-24T10:30:00Z'
898
+ }),
899
+ updated_by: z.string().nullable().openapi({
900
+ description: 'ID of the user who updated the booking',
901
+ example: 'user-123'
902
+ })
903
+ })
904
+ .openapi('UpdateBookingTimeData');
905
+ export const updateBookingTimeResponseSchema = createMessageDataResponseSchema(updateBookingTimeDataSchema, 'UpdateBookingTimeResponse', 'Booking time updated successfully', 'Details of the updated booking time');