@venulog/phasing-engine-schemas 0.4.0-alpha.3 → 0.4.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,4 +1,4 @@
1
- import { z } from './zod.js';
1
+ import { z } from './zod';
2
2
  export declare const getAccessTokenParamsSchema: z.ZodObject<{
3
3
  bookingId: z.ZodCoercedNumber<unknown>;
4
4
  }, z.core.$strip>;
@@ -1,5 +1,5 @@
1
- import { z } from './zod.js';
2
- import { createMessageDataResponseSchema } from './common.js';
1
+ import { z } from './zod';
2
+ import { createMessageDataResponseSchema } from './common';
3
3
  export const getAccessTokenParamsSchema = z
4
4
  .object({
5
5
  bookingId: z.coerce
@@ -63,11 +63,17 @@ export const geoJsonPolygonSchema = z
63
63
  description: 'GeoJSON geometry type',
64
64
  example: 'Polygon'
65
65
  }),
66
- coordinates: z
67
- .array(z.array(z.tuple([z.number(), z.number()])))
68
- .openapi({
66
+ coordinates: z.array(z.array(z.tuple([z.number(), z.number()]))).openapi({
69
67
  description: 'GeoJSON polygon coordinates (array of rings, first ring is outer boundary)',
70
- example: [[[0, 0], [100, 0], [100, 100], [0, 100], [0, 0]]]
68
+ example: [
69
+ [
70
+ [0, 0],
71
+ [100, 0],
72
+ [100, 100],
73
+ [0, 100],
74
+ [0, 0]
75
+ ]
76
+ ]
71
77
  })
72
78
  })
73
79
  .openapi('GeoJsonPolygon');
@@ -562,16 +568,10 @@ export const deleteParkingAreaScheduleItemSchema = z
562
568
  .openapi('DeleteParkingAreaScheduleItem');
563
569
  export const upsertParkingAreaSchedulesBodySchema = z
564
570
  .object({
565
- upsert: z
566
- .array(upsertParkingAreaScheduleItemSchema)
567
- .optional()
568
- .openapi({
571
+ upsert: z.array(upsertParkingAreaScheduleItemSchema).optional().openapi({
569
572
  description: 'Array of schedules to create or update'
570
573
  }),
571
- delete: z
572
- .array(deleteParkingAreaScheduleItemSchema)
573
- .optional()
574
- .openapi({
574
+ delete: z.array(deleteParkingAreaScheduleItemSchema).optional().openapi({
575
575
  description: 'Array of schedule IDs to delete'
576
576
  })
577
577
  })
@@ -1003,6 +1003,60 @@ export declare const getBookingDetailsByTokenResponseSchema: z.ZodObject<{
1003
1003
  }, z.core.$strip>;
1004
1004
  export type GetBookingDetailsByTokenBody = z.infer<typeof getBookingDetailsByTokenBodySchema>;
1005
1005
  export type GetBookingDetailsByTokenResponse = z.infer<typeof getBookingDetailsByTokenResponseSchema>;
1006
+ export declare const getBookingDetailsByQrBodySchema: z.ZodObject<{
1007
+ qr_token: z.ZodString;
1008
+ }, z.core.$strip>;
1009
+ export declare const getBookingDetailsByQrResponseSchema: z.ZodObject<{
1010
+ success: z.ZodBoolean;
1011
+ data: z.ZodObject<{
1012
+ qr_token: z.ZodNullable<z.ZodString>;
1013
+ booking_id: z.ZodNumber;
1014
+ status: z.ZodString;
1015
+ booking_date: z.ZodString;
1016
+ start_time: z.ZodString;
1017
+ end_time: z.ZodString;
1018
+ company_role: z.ZodNullable<z.ZodString>;
1019
+ company: z.ZodObject<{
1020
+ hall: z.ZodString;
1021
+ stand_number: z.ZodString;
1022
+ company_name: z.ZodString;
1023
+ business: z.ZodString;
1024
+ departure_city: z.ZodString;
1025
+ contact_name: z.ZodString;
1026
+ email: z.ZodEmail;
1027
+ phone: z.ZodString;
1028
+ driver_name: z.ZodString;
1029
+ driver_phone: z.ZodString;
1030
+ transport_company: z.ZodString;
1031
+ }, z.core.$strip>;
1032
+ vehicle: z.ZodObject<{
1033
+ vehicle_type: z.ZodString;
1034
+ unloading_method: z.ZodString;
1035
+ license_plate: z.ZodString;
1036
+ trailer_registration: z.ZodOptional<z.ZodString>;
1037
+ }, z.core.$strip>;
1038
+ event_id: z.ZodNumber;
1039
+ event_name: z.ZodString;
1040
+ event_code: z.ZodString;
1041
+ venue_id: z.ZodNullable<z.ZodNumber>;
1042
+ venue_name: z.ZodNullable<z.ZodString>;
1043
+ request_type: z.ZodString;
1044
+ duration: z.ZodNumber;
1045
+ phase_slot_schedule_id: z.ZodNumber;
1046
+ banner: z.ZodNullable<z.ZodObject<{
1047
+ url: z.ZodURL;
1048
+ name: z.ZodOptional<z.ZodString>;
1049
+ size: z.ZodOptional<z.ZodNumber>;
1050
+ bucket: z.ZodOptional<z.ZodString>;
1051
+ type: z.ZodOptional<z.ZodString>;
1052
+ path: z.ZodOptional<z.ZodString>;
1053
+ }, z.core.$strip>>;
1054
+ created_at: z.ZodString;
1055
+ updated_at: z.ZodString;
1056
+ }, z.core.$strip>;
1057
+ }, z.core.$strip>;
1058
+ export type GetBookingDetailsByQrBody = z.infer<typeof getBookingDetailsByQrBodySchema>;
1059
+ export type GetBookingDetailsByQrResponse = z.infer<typeof getBookingDetailsByQrResponseSchema>;
1006
1060
  export type UpdatePhaseBookingBody = z.infer<typeof updatePhaseBookingBodySchema>;
1007
1061
  export type UpdatePhaseBookingData = z.infer<typeof updatePhaseBookingDataSchema>;
1008
1062
  export type UpdatePhaseBookingResponse = z.infer<typeof updatePhaseBookingResponseSchema>;
@@ -1060,6 +1060,18 @@ export const getBookingDetailsByTokenBodySchema = z
1060
1060
  .openapi('GetBookingDetailsByTokenBody');
1061
1061
  export const getBookingDetailsByTokenResponseSchema = createSuccessResponseSchema(bookingDetailsDataSchema, 'GetBookingDetailsByTokenResponse', 'Booking details retrieved by access token');
1062
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
+ // ------------------------------
1063
1075
  // Booking with nested relations schema for QR generation
1064
1076
  // ------------------------------
1065
1077
  export const bookingWithRelationsSchema = z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.4.0-alpha.3",
3
+ "version": "0.4.1",
4
4
  "description": "Shared schemas and types for Phasing Engine API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -41,10 +41,6 @@
41
41
  "./enums": {
42
42
  "types": "./dist/enums/index.d.ts",
43
43
  "import": "./dist/enums/index.js"
44
- },
45
- "./accessToken": {
46
- "types": "./dist/accessToken.d.ts",
47
- "import": "./dist/accessToken.js"
48
44
  }
49
45
  },
50
46
  "files": [