@venulog/phasing-engine-schemas 0.7.0-alpha.5 → 0.7.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.
- package/dist/parkingBooking.d.ts +17 -10
- package/dist/parkingBooking.js +31 -11
- package/package.json +2 -2
package/dist/parkingBooking.d.ts
CHANGED
|
@@ -52,6 +52,8 @@ export declare const parkingBookingSchema: z.ZodObject<{
|
|
|
52
52
|
company_role: z.ZodNullable<z.ZodString>;
|
|
53
53
|
company: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
54
54
|
vehicle: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
55
|
+
entry_scanned_at: z.ZodNullable<z.ZodString>;
|
|
56
|
+
exit_scanned_at: z.ZodNullable<z.ZodString>;
|
|
55
57
|
parking_area_schedule: z.ZodOptional<z.ZodObject<{
|
|
56
58
|
id: z.ZodNumber;
|
|
57
59
|
date: z.ZodString;
|
|
@@ -74,8 +76,6 @@ export declare const parkingBookingSchema: z.ZodObject<{
|
|
|
74
76
|
created_by: z.ZodNullable<z.ZodString>;
|
|
75
77
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
76
78
|
}, z.core.$strip>>;
|
|
77
|
-
entry_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
78
|
-
exit_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
79
|
}, z.core.$strip>;
|
|
80
80
|
export declare const companyDetailsSchema: z.ZodObject<{
|
|
81
81
|
hall: z.ZodString;
|
|
@@ -115,6 +115,8 @@ export declare const eventBookingsDataSchema: z.ZodObject<{
|
|
|
115
115
|
company_role: z.ZodNullable<z.ZodString>;
|
|
116
116
|
company: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
117
117
|
vehicle: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
118
|
+
entry_scanned_at: z.ZodNullable<z.ZodString>;
|
|
119
|
+
exit_scanned_at: z.ZodNullable<z.ZodString>;
|
|
118
120
|
parking_area_schedule: z.ZodOptional<z.ZodObject<{
|
|
119
121
|
id: z.ZodNumber;
|
|
120
122
|
date: z.ZodString;
|
|
@@ -137,8 +139,6 @@ export declare const eventBookingsDataSchema: z.ZodObject<{
|
|
|
137
139
|
created_by: z.ZodNullable<z.ZodString>;
|
|
138
140
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
139
141
|
}, z.core.$strip>>;
|
|
140
|
-
entry_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
-
exit_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
142
|
}, z.core.$strip>>;
|
|
143
143
|
total_count: z.ZodNumber;
|
|
144
144
|
}, z.core.$strip>;
|
|
@@ -163,6 +163,8 @@ export declare const eventBookingsResponseSchema: z.ZodObject<{
|
|
|
163
163
|
company_role: z.ZodNullable<z.ZodString>;
|
|
164
164
|
company: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
165
165
|
vehicle: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
166
|
+
entry_scanned_at: z.ZodNullable<z.ZodString>;
|
|
167
|
+
exit_scanned_at: z.ZodNullable<z.ZodString>;
|
|
166
168
|
parking_area_schedule: z.ZodOptional<z.ZodObject<{
|
|
167
169
|
id: z.ZodNumber;
|
|
168
170
|
date: z.ZodString;
|
|
@@ -185,8 +187,6 @@ export declare const eventBookingsResponseSchema: z.ZodObject<{
|
|
|
185
187
|
created_by: z.ZodNullable<z.ZodString>;
|
|
186
188
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
187
189
|
}, z.core.$strip>>;
|
|
188
|
-
entry_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
189
|
-
exit_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
190
190
|
}, z.core.$strip>>;
|
|
191
191
|
total_count: z.ZodNumber;
|
|
192
192
|
}, z.core.$strip>;
|
|
@@ -213,6 +213,16 @@ 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<{
|
|
217
|
+
plate_number: z.ZodObject<{
|
|
218
|
+
url: z.ZodString;
|
|
219
|
+
name: z.ZodString;
|
|
220
|
+
path: z.ZodString;
|
|
221
|
+
size: z.ZodNumber;
|
|
222
|
+
type: z.ZodString;
|
|
223
|
+
bucket: z.ZodString;
|
|
224
|
+
}, z.core.$strip>;
|
|
225
|
+
}, z.core.$strip>;
|
|
216
226
|
export declare const confirmAccessDataSchema: z.ZodObject<{
|
|
217
227
|
bookingId: z.ZodCoercedNumber<unknown>;
|
|
218
228
|
}, z.core.$strip>;
|
|
@@ -593,8 +603,6 @@ export declare const parkingBookingDetailsDataSchema: z.ZodObject<{
|
|
|
593
603
|
}, z.core.$strip>>;
|
|
594
604
|
created_at: z.ZodString;
|
|
595
605
|
updated_at: z.ZodString;
|
|
596
|
-
entry_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
597
|
-
exit_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
598
606
|
}, z.core.$strip>;
|
|
599
607
|
export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
600
608
|
success: z.ZodBoolean;
|
|
@@ -648,8 +656,6 @@ export declare const getParkingBookingDetailsResponseSchema: z.ZodObject<{
|
|
|
648
656
|
}, z.core.$strip>>;
|
|
649
657
|
created_at: z.ZodString;
|
|
650
658
|
updated_at: z.ZodString;
|
|
651
|
-
entry_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
652
|
-
exit_scanned_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
653
659
|
}, z.core.$strip>;
|
|
654
660
|
}, z.core.$strip>;
|
|
655
661
|
export declare const getParkingBookingDetailsByTokenBodySchema: z.ZodObject<{
|
|
@@ -823,6 +829,7 @@ export type CloseEventBody = z.infer<typeof closeEventBodySchema>;
|
|
|
823
829
|
export type CloseEventData = z.infer<typeof closeEventDataSchema>;
|
|
824
830
|
export type CloseEventResponse = z.infer<typeof closeEventResponseSchema>;
|
|
825
831
|
export type EventBookingsResponse = z.infer<typeof eventBookingsResponseSchema>;
|
|
832
|
+
export type ConfirmExitData = z.infer<typeof confirmExitBodySchema>;
|
|
826
833
|
export type ConfirmBookingParams = z.infer<typeof confirmBookingParamsSchema>;
|
|
827
834
|
export type ConfirmBookingResponse = z.infer<typeof confirmBookingResponseSchema>;
|
|
828
835
|
export type CreateBookingBody = z.infer<typeof createParkingBookingBodySchema>;
|
package/dist/parkingBooking.js
CHANGED
|
@@ -99,10 +99,10 @@ export const parkingBookingSchema = z.object({
|
|
|
99
99
|
company_role: z.string().nullable(),
|
|
100
100
|
company: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
101
101
|
vehicle: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
102
|
+
entry_scanned_at: z.string().nullable(),
|
|
103
|
+
exit_scanned_at: z.string().nullable(),
|
|
102
104
|
// Include the schedule details
|
|
103
|
-
parking_area_schedule: parkingAreaScheduleSchema.optional()
|
|
104
|
-
entry_scanned_at: z.string().nullable().optional(),
|
|
105
|
-
exit_scanned_at: z.string().nullable().optional()
|
|
105
|
+
parking_area_schedule: parkingAreaScheduleSchema.optional()
|
|
106
106
|
});
|
|
107
107
|
export const companyDetailsSchema = z
|
|
108
108
|
.object({
|
|
@@ -212,6 +212,34 @@ 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({
|
|
216
|
+
plate_number: z.object({
|
|
217
|
+
url: z.string().openapi({
|
|
218
|
+
description: 'Public URL of the plate number',
|
|
219
|
+
example: 'https://example.net/xxxx.jpeg'
|
|
220
|
+
}),
|
|
221
|
+
name: z.string().openapi({
|
|
222
|
+
description: 'Name of the plate number file',
|
|
223
|
+
example: ''
|
|
224
|
+
}),
|
|
225
|
+
path: z.string().openapi({
|
|
226
|
+
description: 'Path of the plate number',
|
|
227
|
+
example: ''
|
|
228
|
+
}),
|
|
229
|
+
size: z.number().openapi({
|
|
230
|
+
description: 'File size of the plate number',
|
|
231
|
+
example: ''
|
|
232
|
+
}),
|
|
233
|
+
type: z.string().openapi({
|
|
234
|
+
description: 'File type of the plate number',
|
|
235
|
+
example: ''
|
|
236
|
+
}),
|
|
237
|
+
bucket: z.string().openapi({
|
|
238
|
+
description: 'Storage bucket name',
|
|
239
|
+
example: 'XXXXX'
|
|
240
|
+
})
|
|
241
|
+
})
|
|
242
|
+
});
|
|
215
243
|
export const confirmAccessDataSchema = z.object({
|
|
216
244
|
bookingId: z.coerce.number().int().positive({
|
|
217
245
|
message: 'Booking ID must be a positive integer'
|
|
@@ -695,14 +723,6 @@ export const parkingBookingDetailsDataSchema = z
|
|
|
695
723
|
updated_at: z.string().openapi({
|
|
696
724
|
description: 'Timestamp when booking was last updated',
|
|
697
725
|
example: '2025-12-05T10:30:00.000Z'
|
|
698
|
-
}),
|
|
699
|
-
entry_scanned_at: z.string().nullable().optional().openapi({
|
|
700
|
-
description: 'Timestamp when entry was scanned',
|
|
701
|
-
example: '2025-12-15T08:05:00.000Z'
|
|
702
|
-
}),
|
|
703
|
-
exit_scanned_at: z.string().nullable().optional().openapi({
|
|
704
|
-
description: 'Timestamp when exit was scanned',
|
|
705
|
-
example: '2025-12-15T08:25:00.000Z'
|
|
706
726
|
})
|
|
707
727
|
})
|
|
708
728
|
.openapi('ParkingBookingDetailsData');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venulog/phasing-engine-schemas",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Shared schemas and types for Phasing Engine API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "npm run clean && tsc",
|
|
51
51
|
"dev": "tsc --watch",
|
|
52
|
-
"clean": "
|
|
52
|
+
"clean": "rm -rf dist",
|
|
53
53
|
"prepublishOnly": "npm run build"
|
|
54
54
|
},
|
|
55
55
|
"keywords": [
|