@venulog/phasing-engine-schemas 0.13.3 → 0.13.4-alpha.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.
@@ -3,6 +3,8 @@ export declare enum AccessEventType {
3
3
  SCAN = "scan",// QR/badge scanned
4
4
  ENTRY = "entry",// Vehicle entered through gate
5
5
  EXIT = "exit",// Vehicle exited through gate
6
- DENIED = "denied"
6
+ DENIED = "denied",// Access denied (invalid badge, wrong time, etc.)
7
+ PARKED = "parked",// Vehicle parked in assigned spot
8
+ DEPARTED = "departed"
7
9
  }
8
10
  export declare const ACCESS_EVENT_TYPE_LABELS: Record<AccessEventType, string>;
@@ -6,12 +6,16 @@ export var AccessEventType;
6
6
  AccessEventType["SCAN"] = "scan";
7
7
  AccessEventType["ENTRY"] = "entry";
8
8
  AccessEventType["EXIT"] = "exit";
9
- AccessEventType["DENIED"] = "denied"; // Access denied (invalid badge, wrong time, etc.)
9
+ AccessEventType["DENIED"] = "denied";
10
+ AccessEventType["PARKED"] = "parked";
11
+ AccessEventType["DEPARTED"] = "departed"; // Vehicle departed from the site
10
12
  })(AccessEventType || (AccessEventType = {}));
11
13
  export const ACCESS_EVENT_TYPE_LABELS = {
12
14
  [AccessEventType.APPROACH]: 'Approach Detected',
13
15
  [AccessEventType.SCAN]: 'Badge Scanned',
14
16
  [AccessEventType.ENTRY]: 'Entry Confirmed',
15
17
  [AccessEventType.EXIT]: 'Exit Confirmed',
16
- [AccessEventType.DENIED]: 'Access Denied'
18
+ [AccessEventType.DENIED]: 'Access Denied',
19
+ [AccessEventType.PARKED]: 'Parked in Spot',
20
+ [AccessEventType.DEPARTED]: 'Departed from the Site'
17
21
  };
@@ -7,3 +7,4 @@ export * from './accessEventType.js';
7
7
  export * from './positionSource.js';
8
8
  export * from './cameraTrigger.js';
9
9
  export * from './simulationMode.js';
10
+ export * from './vehicleAccessAction.js';
@@ -8,3 +8,4 @@ export * from './accessEventType.js';
8
8
  export * from './positionSource.js';
9
9
  export * from './cameraTrigger.js';
10
10
  export * from './simulationMode.js';
11
+ export * from './vehicleAccessAction.js';
@@ -0,0 +1,7 @@
1
+ export declare enum VehicleAccessAction {
2
+ ENTERING_BUFFER = "entering_buffer",// PL vehicle enters Buffer Parking
3
+ EXIT_BUFFER = "exit_buffer",// PL vehicle exits Buffer Parking
4
+ ENTERING_EVENT_SITE = "entering_event_site",// PL vehicle enters the Event Site
5
+ EXIT_EVENT_SITE = "exit_event_site"
6
+ }
7
+ export declare const VEHICLE_ACCESS_ACTION_LABELS: Record<VehicleAccessAction, string>;
@@ -0,0 +1,15 @@
1
+ // Vehicle access action enumeration for PL vehicle tracking
2
+ // Defines the different checkpoint actions for heavy vehicles (PL) during event logistics
3
+ export var VehicleAccessAction;
4
+ (function (VehicleAccessAction) {
5
+ VehicleAccessAction["ENTERING_BUFFER"] = "entering_buffer";
6
+ VehicleAccessAction["EXIT_BUFFER"] = "exit_buffer";
7
+ VehicleAccessAction["ENTERING_EVENT_SITE"] = "entering_event_site";
8
+ VehicleAccessAction["EXIT_EVENT_SITE"] = "exit_event_site"; // PL vehicle exits the Event Site
9
+ })(VehicleAccessAction || (VehicleAccessAction = {}));
10
+ export const VEHICLE_ACCESS_ACTION_LABELS = {
11
+ [VehicleAccessAction.ENTERING_BUFFER]: 'Entering Buffer Parking',
12
+ [VehicleAccessAction.EXIT_BUFFER]: 'Exit Buffer Parking',
13
+ [VehicleAccessAction.ENTERING_EVENT_SITE]: 'Entering Event Site',
14
+ [VehicleAccessAction.EXIT_EVENT_SITE]: 'Exit Event Site'
15
+ };
@@ -0,0 +1,101 @@
1
+ import { z } from './zod.js';
2
+ /**
3
+ * Core event phase item schema matching database structure
4
+ */
5
+ export declare const eventPhaseItemSchema: z.ZodObject<{
6
+ id: z.ZodNumber;
7
+ event_id: z.ZodNumber;
8
+ layer_id: z.ZodNumber;
9
+ parking_area_id: z.ZodNumber;
10
+ name: z.ZodNullable<z.ZodString>;
11
+ is_active: z.ZodBoolean;
12
+ created_at: z.ZodString;
13
+ updated_at: z.ZodString;
14
+ created_by: z.ZodNullable<z.ZodString>;
15
+ updated_by: z.ZodNullable<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export declare const getEventPhasesDataSchema: z.ZodObject<{
18
+ event_id: z.ZodNumber;
19
+ phases: z.ZodArray<z.ZodObject<{
20
+ id: z.ZodNumber;
21
+ event_id: z.ZodNumber;
22
+ layer_id: z.ZodNumber;
23
+ parking_area_id: z.ZodNumber;
24
+ name: z.ZodNullable<z.ZodString>;
25
+ is_active: z.ZodBoolean;
26
+ created_at: z.ZodString;
27
+ updated_at: z.ZodString;
28
+ created_by: z.ZodNullable<z.ZodString>;
29
+ updated_by: z.ZodNullable<z.ZodString>;
30
+ }, z.core.$strip>>;
31
+ total_count: z.ZodNumber;
32
+ }, z.core.$strip>;
33
+ export declare const getEventPhasesResponseSchema: z.ZodObject<{
34
+ success: z.ZodBoolean;
35
+ data: z.ZodObject<{
36
+ event_id: z.ZodNumber;
37
+ phases: z.ZodArray<z.ZodObject<{
38
+ id: z.ZodNumber;
39
+ event_id: z.ZodNumber;
40
+ layer_id: z.ZodNumber;
41
+ parking_area_id: z.ZodNumber;
42
+ name: z.ZodNullable<z.ZodString>;
43
+ is_active: z.ZodBoolean;
44
+ created_at: z.ZodString;
45
+ updated_at: z.ZodString;
46
+ created_by: z.ZodNullable<z.ZodString>;
47
+ updated_by: z.ZodNullable<z.ZodString>;
48
+ }, z.core.$strip>>;
49
+ total_count: z.ZodNumber;
50
+ }, z.core.$strip>;
51
+ }, z.core.$strip>;
52
+ export declare const bulkUpsertEventPhasesBodySchema: z.ZodObject<{
53
+ event_id: z.ZodNumber;
54
+ phases: z.ZodArray<z.ZodObject<{
55
+ layer_id: z.ZodNumber;
56
+ parking_area_id: z.ZodNumber;
57
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
+ }, z.core.$strip>>;
59
+ }, z.core.$strip>;
60
+ export declare const bulkUpsertEventPhasesDataSchema: z.ZodObject<{
61
+ event_id: z.ZodNumber;
62
+ total_upserted: z.ZodNumber;
63
+ upserted_phases: z.ZodArray<z.ZodObject<{
64
+ id: z.ZodNumber;
65
+ event_id: z.ZodNumber;
66
+ layer_id: z.ZodNumber;
67
+ parking_area_id: z.ZodNumber;
68
+ name: z.ZodNullable<z.ZodString>;
69
+ is_active: z.ZodBoolean;
70
+ created_at: z.ZodString;
71
+ updated_at: z.ZodString;
72
+ created_by: z.ZodNullable<z.ZodString>;
73
+ updated_by: z.ZodNullable<z.ZodString>;
74
+ }, z.core.$strip>>;
75
+ }, z.core.$strip>;
76
+ export declare const bulkUpsertEventPhasesResponseSchema: z.ZodObject<{
77
+ success: z.ZodBoolean;
78
+ message: z.ZodString;
79
+ data: z.ZodObject<{
80
+ event_id: z.ZodNumber;
81
+ total_upserted: z.ZodNumber;
82
+ upserted_phases: z.ZodArray<z.ZodObject<{
83
+ id: z.ZodNumber;
84
+ event_id: z.ZodNumber;
85
+ layer_id: z.ZodNumber;
86
+ parking_area_id: z.ZodNumber;
87
+ name: z.ZodNullable<z.ZodString>;
88
+ is_active: z.ZodBoolean;
89
+ created_at: z.ZodString;
90
+ updated_at: z.ZodString;
91
+ created_by: z.ZodNullable<z.ZodString>;
92
+ updated_by: z.ZodNullable<z.ZodString>;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>;
95
+ }, z.core.$strip>;
96
+ export type EventPhaseItem = z.infer<typeof eventPhaseItemSchema>;
97
+ export type GetEventPhasesData = z.infer<typeof getEventPhasesDataSchema>;
98
+ export type GetEventPhasesResponse = z.infer<typeof getEventPhasesResponseSchema>;
99
+ export type BulkUpsertEventPhasesBody = z.infer<typeof bulkUpsertEventPhasesBodySchema>;
100
+ export type BulkUpsertEventPhasesData = z.infer<typeof bulkUpsertEventPhasesDataSchema>;
101
+ export type BulkUpsertEventPhasesResponse = z.infer<typeof bulkUpsertEventPhasesResponseSchema>;
@@ -0,0 +1,117 @@
1
+ // packages/phasing-schemas/src/eventPhase.ts
2
+ import { z } from './zod.js';
3
+ import { createSuccessResponseSchema, createMessageDataResponseSchema } from './common.js';
4
+ // ------------------------------
5
+ // Event Phase Schemas
6
+ // ------------------------------
7
+ /**
8
+ * Core event phase item schema matching database structure
9
+ */
10
+ export const eventPhaseItemSchema = z
11
+ .object({
12
+ id: z.number().int().positive().openapi({
13
+ description: 'Event phase ID',
14
+ example: 1
15
+ }),
16
+ event_id: z.number().int().positive().openapi({
17
+ description: 'Event ID this phase belongs to',
18
+ example: 1
19
+ }),
20
+ layer_id: z.number().int().positive().openapi({
21
+ description: 'Parking area layer ID linked to this phase',
22
+ example: 2
23
+ }),
24
+ parking_area_id: z.number().int().positive().openapi({
25
+ description: 'Parking area ID linked to this phase',
26
+ example: 12
27
+ }),
28
+ name: z.string().nullable().openapi({
29
+ description: 'Optional label for this phase link',
30
+ example: 'Arrival Wave'
31
+ }),
32
+ is_active: z.boolean().openapi({
33
+ description: 'Whether the phase link is active',
34
+ example: true
35
+ }),
36
+ created_at: z.string().openapi({
37
+ description: 'Creation timestamp (ISO 8601)',
38
+ example: '2026-01-06T10:30:00Z'
39
+ }),
40
+ updated_at: z.string().openapi({
41
+ description: 'Last update timestamp (ISO 8601)',
42
+ example: '2026-01-06T10:30:00Z'
43
+ }),
44
+ created_by: z.string().uuid().nullable().openapi({
45
+ description: 'UUID of user who created this phase link',
46
+ example: '550e8400-e29b-41d4-a716-446655440000'
47
+ }),
48
+ updated_by: z.string().uuid().nullable().openapi({
49
+ description: 'UUID of user who last updated this phase link',
50
+ example: '550e8400-e29b-41d4-a716-446655440000'
51
+ })
52
+ })
53
+ .openapi('EventPhaseItem');
54
+ // ------------------------------
55
+ // Get Event Phases Response Schemas
56
+ // ------------------------------
57
+ export const getEventPhasesDataSchema = z
58
+ .object({
59
+ event_id: z.number().openapi({
60
+ description: 'ID of the event',
61
+ example: 1
62
+ }),
63
+ phases: z.array(eventPhaseItemSchema).openapi({
64
+ description: 'List of phase links for the event'
65
+ }),
66
+ total_count: z.number().openapi({
67
+ description: 'Total number of phase links',
68
+ example: 3
69
+ })
70
+ })
71
+ .openapi('GetEventPhasesData');
72
+ export const getEventPhasesResponseSchema = createSuccessResponseSchema(getEventPhasesDataSchema, 'GetEventPhasesResponse', 'Event phases for the event');
73
+ // ------------------------------
74
+ // Bulk Upsert Event Phases Schemas
75
+ // ------------------------------
76
+ export const bulkUpsertEventPhasesBodySchema = z
77
+ .object({
78
+ event_id: z.number().int().positive().openapi({
79
+ description: 'ID of the event',
80
+ example: 1
81
+ }),
82
+ phases: z
83
+ .array(z.object({
84
+ layer_id: z.number().int().positive().openapi({
85
+ description: 'Parking area layer ID',
86
+ example: 2
87
+ }),
88
+ parking_area_id: z.number().int().positive().openapi({
89
+ description: 'Parking area ID',
90
+ example: 12
91
+ }),
92
+ name: z.string().max(255).nullable().optional().openapi({
93
+ description: 'Optional label for this phase link',
94
+ example: 'Arrival Wave'
95
+ })
96
+ }))
97
+ .openapi({
98
+ description: 'Array of event phase links to create'
99
+ })
100
+ })
101
+ .openapi('BulkUpsertEventPhasesBody');
102
+ export const bulkUpsertEventPhasesDataSchema = z
103
+ .object({
104
+ event_id: z.number().openapi({
105
+ description: 'ID of the event',
106
+ example: 1
107
+ }),
108
+ total_upserted: z.number().openapi({
109
+ description: 'Total number of phase links successfully upserted',
110
+ example: 3
111
+ }),
112
+ upserted_phases: z.array(eventPhaseItemSchema).openapi({
113
+ description: 'Array of successfully upserted phase links'
114
+ })
115
+ })
116
+ .openapi('BulkUpsertEventPhasesData');
117
+ export const bulkUpsertEventPhasesResponseSchema = createMessageDataResponseSchema(bulkUpsertEventPhasesDataSchema, 'BulkUpsertEventPhasesResponse', 'Event phases upserted successfully', 'Details of the upserted phase links');
@@ -0,0 +1,118 @@
1
+ import { z } from './zod.js';
2
+ export declare const eventSitePlanCalibrationAnchorSchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ event_id: z.ZodNumber;
5
+ name: z.ZodString;
6
+ latitude: z.ZodNumber;
7
+ longitude: z.ZodNumber;
8
+ site_plan_x: z.ZodNumber;
9
+ site_plan_y: z.ZodNumber;
10
+ is_active: z.ZodBoolean;
11
+ created_at: z.ZodString;
12
+ updated_at: z.ZodString;
13
+ created_by: z.ZodNullable<z.ZodString>;
14
+ updated_by: z.ZodNullable<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ export declare const getEventSitePlanCalibrationsQuerySchema: z.ZodObject<{
17
+ eventId: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
18
+ }, z.core.$strip>;
19
+ export declare const getEventSitePlanCalibrationsDataSchema: z.ZodObject<{
20
+ event_id: z.ZodNumber;
21
+ anchors: z.ZodArray<z.ZodObject<{
22
+ id: z.ZodNumber;
23
+ event_id: z.ZodNumber;
24
+ name: z.ZodString;
25
+ latitude: z.ZodNumber;
26
+ longitude: z.ZodNumber;
27
+ site_plan_x: z.ZodNumber;
28
+ site_plan_y: z.ZodNumber;
29
+ is_active: z.ZodBoolean;
30
+ created_at: z.ZodString;
31
+ updated_at: z.ZodString;
32
+ created_by: z.ZodNullable<z.ZodString>;
33
+ updated_by: z.ZodNullable<z.ZodString>;
34
+ }, z.core.$strip>>;
35
+ total_count: z.ZodNumber;
36
+ }, z.core.$strip>;
37
+ export declare const getEventSitePlanCalibrationsResponseSchema: z.ZodObject<{
38
+ success: z.ZodBoolean;
39
+ data: z.ZodObject<{
40
+ event_id: z.ZodNumber;
41
+ anchors: z.ZodArray<z.ZodObject<{
42
+ id: z.ZodNumber;
43
+ event_id: z.ZodNumber;
44
+ name: z.ZodString;
45
+ latitude: z.ZodNumber;
46
+ longitude: z.ZodNumber;
47
+ site_plan_x: z.ZodNumber;
48
+ site_plan_y: z.ZodNumber;
49
+ is_active: z.ZodBoolean;
50
+ created_at: z.ZodString;
51
+ updated_at: z.ZodString;
52
+ created_by: z.ZodNullable<z.ZodString>;
53
+ updated_by: z.ZodNullable<z.ZodString>;
54
+ }, z.core.$strip>>;
55
+ total_count: z.ZodNumber;
56
+ }, z.core.$strip>;
57
+ }, z.core.$strip>;
58
+ export declare const bulkUpsertEventSitePlanCalibrationsBodySchema: z.ZodObject<{
59
+ event_id: z.ZodNumber;
60
+ anchors: z.ZodArray<z.ZodObject<{
61
+ id: z.ZodOptional<z.ZodNumber>;
62
+ name: z.ZodString;
63
+ latitude: z.ZodNumber;
64
+ longitude: z.ZodNumber;
65
+ site_plan_x: z.ZodNumber;
66
+ site_plan_y: z.ZodNumber;
67
+ }, z.core.$strip>>;
68
+ deleted_anchor_ids: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodNumber>>>;
69
+ }, z.core.$strip>;
70
+ export declare const bulkUpsertEventSitePlanCalibrationsDataSchema: z.ZodObject<{
71
+ event_id: z.ZodNumber;
72
+ total_upserted: z.ZodNumber;
73
+ total_deactivated: z.ZodNumber;
74
+ upserted_anchors: z.ZodArray<z.ZodObject<{
75
+ id: z.ZodNumber;
76
+ event_id: z.ZodNumber;
77
+ name: z.ZodString;
78
+ latitude: z.ZodNumber;
79
+ longitude: z.ZodNumber;
80
+ site_plan_x: z.ZodNumber;
81
+ site_plan_y: z.ZodNumber;
82
+ is_active: z.ZodBoolean;
83
+ created_at: z.ZodString;
84
+ updated_at: z.ZodString;
85
+ created_by: z.ZodNullable<z.ZodString>;
86
+ updated_by: z.ZodNullable<z.ZodString>;
87
+ }, z.core.$strip>>;
88
+ }, z.core.$strip>;
89
+ export declare const bulkUpsertEventSitePlanCalibrationsResponseSchema: z.ZodObject<{
90
+ success: z.ZodBoolean;
91
+ message: z.ZodString;
92
+ data: z.ZodObject<{
93
+ event_id: z.ZodNumber;
94
+ total_upserted: z.ZodNumber;
95
+ total_deactivated: z.ZodNumber;
96
+ upserted_anchors: z.ZodArray<z.ZodObject<{
97
+ id: z.ZodNumber;
98
+ event_id: z.ZodNumber;
99
+ name: z.ZodString;
100
+ latitude: z.ZodNumber;
101
+ longitude: z.ZodNumber;
102
+ site_plan_x: z.ZodNumber;
103
+ site_plan_y: z.ZodNumber;
104
+ is_active: z.ZodBoolean;
105
+ created_at: z.ZodString;
106
+ updated_at: z.ZodString;
107
+ created_by: z.ZodNullable<z.ZodString>;
108
+ updated_by: z.ZodNullable<z.ZodString>;
109
+ }, z.core.$strip>>;
110
+ }, z.core.$strip>;
111
+ }, z.core.$strip>;
112
+ export type EventSitePlanCalibrationAnchor = z.infer<typeof eventSitePlanCalibrationAnchorSchema>;
113
+ export type GetEventSitePlanCalibrationsQuery = z.infer<typeof getEventSitePlanCalibrationsQuerySchema>;
114
+ export type GetEventSitePlanCalibrationsData = z.infer<typeof getEventSitePlanCalibrationsDataSchema>;
115
+ export type GetEventSitePlanCalibrationsResponse = z.infer<typeof getEventSitePlanCalibrationsResponseSchema>;
116
+ export type BulkUpsertEventSitePlanCalibrationsBody = z.infer<typeof bulkUpsertEventSitePlanCalibrationsBodySchema>;
117
+ export type BulkUpsertEventSitePlanCalibrationsData = z.infer<typeof bulkUpsertEventSitePlanCalibrationsDataSchema>;
118
+ export type BulkUpsertEventSitePlanCalibrationsResponse = z.infer<typeof bulkUpsertEventSitePlanCalibrationsResponseSchema>;
@@ -0,0 +1,148 @@
1
+ // packages/phasing-schemas/src/eventSitePlanCalibration.ts
2
+ import { z } from './zod.js';
3
+ import { createSuccessResponseSchema, createMessageDataResponseSchema } from './common.js';
4
+ export const eventSitePlanCalibrationAnchorSchema = z
5
+ .object({
6
+ id: z.number().int().positive().openapi({
7
+ description: 'Calibration anchor ID',
8
+ example: 12
9
+ }),
10
+ event_id: z.number().int().positive().openapi({
11
+ description: 'Event ID this anchor belongs to',
12
+ example: 77
13
+ }),
14
+ name: z.string().min(1).openapi({
15
+ description: 'Readable anchor name (e.g., Gate A)',
16
+ example: 'Gate A'
17
+ }),
18
+ latitude: z.number().min(-90).max(90).openapi({
19
+ description: 'Latitude in decimal degrees',
20
+ example: 48.86245
21
+ }),
22
+ longitude: z.number().min(-180).max(180).openapi({
23
+ description: 'Longitude in decimal degrees',
24
+ example: 2.28791
25
+ }),
26
+ site_plan_x: z.number().min(0).max(100).openapi({
27
+ description: 'Horizontal position on the site plan (0-100%)',
28
+ example: 6.25
29
+ }),
30
+ site_plan_y: z.number().min(0).max(100).openapi({
31
+ description: 'Vertical position on the site plan (0-100%)',
32
+ example: 52.1
33
+ }),
34
+ is_active: z.boolean().openapi({
35
+ description: 'Whether this anchor is active',
36
+ example: true
37
+ }),
38
+ created_at: z.string().openapi({
39
+ description: 'Creation timestamp (ISO 8601)'
40
+ }),
41
+ updated_at: z.string().openapi({
42
+ description: 'Last update timestamp (ISO 8601)'
43
+ }),
44
+ created_by: z.string().uuid().nullable().openapi({
45
+ description: 'User who created the anchor',
46
+ example: '550e8400-e29b-41d4-a716-446655440000'
47
+ }),
48
+ updated_by: z.string().uuid().nullable().openapi({
49
+ description: 'User who last updated the anchor',
50
+ example: '550e8400-e29b-41d4-a716-446655440000'
51
+ })
52
+ })
53
+ .openapi('EventSitePlanCalibrationAnchor');
54
+ export const getEventSitePlanCalibrationsQuerySchema = z
55
+ .object({
56
+ eventId: z
57
+ .string()
58
+ .min(1)
59
+ .transform(val => parseInt(val, 10))
60
+ .refine(val => !isNaN(val) && val > 0, {
61
+ message: 'Event ID must be a positive number'
62
+ })
63
+ .openapi({
64
+ description: 'Event ID',
65
+ example: '77'
66
+ })
67
+ })
68
+ .openapi('GetEventSitePlanCalibrationsQuery');
69
+ export const getEventSitePlanCalibrationsDataSchema = z
70
+ .object({
71
+ event_id: z.number().int().positive().openapi({
72
+ description: 'ID of the event',
73
+ example: 77
74
+ }),
75
+ anchors: z.array(eventSitePlanCalibrationAnchorSchema).openapi({
76
+ description: 'List of calibration anchors for the event'
77
+ }),
78
+ total_count: z.number().int().nonnegative().openapi({
79
+ description: 'Total anchors returned',
80
+ example: 3
81
+ })
82
+ })
83
+ .openapi('GetEventSitePlanCalibrationsData');
84
+ export const getEventSitePlanCalibrationsResponseSchema = createSuccessResponseSchema(getEventSitePlanCalibrationsDataSchema, 'GetEventSitePlanCalibrationsResponse', 'Event site plan calibration anchors');
85
+ const calibrationAnchorInputSchema = z.object({
86
+ id: z.number().int().positive().optional().openapi({
87
+ description: 'Existing anchor ID (omit for new anchors)'
88
+ }),
89
+ name: z.string().min(1, 'Name is required').max(255).openapi({
90
+ description: 'Anchor name',
91
+ example: 'Gate A'
92
+ }),
93
+ latitude: z.number().min(-90).max(90).openapi({
94
+ description: 'Latitude in decimal degrees',
95
+ example: 48.86245
96
+ }),
97
+ longitude: z.number().min(-180).max(180).openapi({
98
+ description: 'Longitude in decimal degrees',
99
+ example: 2.28791
100
+ }),
101
+ site_plan_x: z.number().min(0).max(100).openapi({
102
+ description: 'Horizontal percentage on the site plan',
103
+ example: 6.2
104
+ }),
105
+ site_plan_y: z.number().min(0).max(100).openapi({
106
+ description: 'Vertical percentage on the site plan',
107
+ example: 52.0
108
+ })
109
+ });
110
+ export const bulkUpsertEventSitePlanCalibrationsBodySchema = z
111
+ .object({
112
+ event_id: z.number().int().positive().openapi({
113
+ description: 'ID of the event',
114
+ example: 77
115
+ }),
116
+ anchors: z.array(calibrationAnchorInputSchema).min(0).openapi({
117
+ description: 'Anchors to create or update'
118
+ }),
119
+ deleted_anchor_ids: z
120
+ .array(z.number().int().positive())
121
+ .optional()
122
+ .default([])
123
+ .openapi({
124
+ description: 'IDs of anchors to deactivate',
125
+ example: [3, 5]
126
+ })
127
+ })
128
+ .openapi('BulkUpsertEventSitePlanCalibrationsBody');
129
+ export const bulkUpsertEventSitePlanCalibrationsDataSchema = z
130
+ .object({
131
+ event_id: z.number().int().positive().openapi({
132
+ description: 'Event ID',
133
+ example: 77
134
+ }),
135
+ total_upserted: z.number().int().nonnegative().openapi({
136
+ description: 'Anchors created or updated',
137
+ example: 2
138
+ }),
139
+ total_deactivated: z.number().int().nonnegative().openapi({
140
+ description: 'Anchors deactivated',
141
+ example: 1
142
+ }),
143
+ upserted_anchors: z.array(eventSitePlanCalibrationAnchorSchema).openapi({
144
+ description: 'Details of anchors returned from Supabase'
145
+ })
146
+ })
147
+ .openapi('BulkUpsertEventSitePlanCalibrationsData');
148
+ export const bulkUpsertEventSitePlanCalibrationsResponseSchema = createMessageDataResponseSchema(bulkUpsertEventSitePlanCalibrationsDataSchema, 'BulkUpsertEventSitePlanCalibrationsResponse', 'Calibration anchors upserted successfully', 'Details about the upserted calibration anchors');
package/dist/index.d.ts CHANGED
@@ -5,6 +5,8 @@ export * from './parkingBooking.js';
5
5
  export * from './parkingArea.js';
6
6
  export * from './parkingAreaLayer.js';
7
7
  export * from './parkingAreaAccess.js';
8
+ export * from './eventSitePlanCalibration.js';
9
+ export * from './eventPhase.js';
8
10
  export * from './event.js';
9
11
  export * from './accessToken.js';
10
12
  export * from './vehiclePosition.js';
package/dist/index.js CHANGED
@@ -6,6 +6,8 @@ export * from './parkingBooking.js';
6
6
  export * from './parkingArea.js';
7
7
  export * from './parkingAreaLayer.js';
8
8
  export * from './parkingAreaAccess.js';
9
+ export * from './eventSitePlanCalibration.js';
10
+ export * from './eventPhase.js';
9
11
  export * from './event.js';
10
12
  export * from './accessToken.js';
11
13
  export * from './vehiclePosition.js';