@venulog/phasing-engine-schemas 0.13.5-alpha.2 → 0.15.0-alpha.0
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/enums/accessEventType.d.ts +3 -1
- package/dist/enums/accessEventType.js +6 -2
- package/dist/eventPhase.d.ts +101 -0
- package/dist/eventPhase.js +117 -0
- package/dist/eventSitePlanCalibration.d.ts +118 -0
- package/dist/eventSitePlanCalibration.js +148 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/parkingArea.d.ts +14 -0
- package/dist/parkingArea.js +24 -0
- package/dist/parkingAreaAccess.d.ts +116 -4
- package/dist/parkingAreaAccess.js +27 -0
- package/dist/parkingAreaLayer.d.ts +41 -0
- package/dist/parkingAreaLayer.js +65 -0
- package/dist/parkingBooking.d.ts +1 -0
- package/dist/parkingBooking.js +4 -1
- package/package.json +10 -2
|
@@ -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";
|
|
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
|
};
|
|
@@ -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';
|
package/dist/parkingArea.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare const parkingAreaItemSchema: z.ZodObject<{
|
|
|
50
50
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
51
51
|
}, z.core.$strip>>;
|
|
52
52
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
53
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
53
54
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
54
55
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
55
56
|
is_active: z.ZodBoolean;
|
|
@@ -70,6 +71,7 @@ export declare const parkingAreaWithSchedulesSchema: z.ZodObject<{
|
|
|
70
71
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
71
72
|
}, z.core.$strip>>;
|
|
72
73
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
74
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
73
75
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
74
76
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
75
77
|
is_active: z.ZodBoolean;
|
|
@@ -116,6 +118,7 @@ export declare const createParkingAreaBodySchema: z.ZodObject<{
|
|
|
116
118
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
117
119
|
}, z.core.$strip>>;
|
|
118
120
|
site_plan_image_url: z.ZodOptional<z.ZodString>;
|
|
121
|
+
fill_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
122
|
surface_area_sqm: z.ZodOptional<z.ZodNumber>;
|
|
120
123
|
scale_pixels_per_meter: z.ZodOptional<z.ZodNumber>;
|
|
121
124
|
}, z.core.$strip>;
|
|
@@ -128,6 +131,7 @@ export declare const createParkingAreaDataSchema: z.ZodObject<{
|
|
|
128
131
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
129
132
|
}, z.core.$strip>>;
|
|
130
133
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
134
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
131
135
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
132
136
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
133
137
|
is_active: z.ZodBoolean;
|
|
@@ -146,6 +150,7 @@ export declare const createParkingAreaResponseSchema: z.ZodObject<{
|
|
|
146
150
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
147
151
|
}, z.core.$strip>>;
|
|
148
152
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
153
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
149
154
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
150
155
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
151
156
|
is_active: z.ZodBoolean;
|
|
@@ -161,6 +166,7 @@ export declare const bulkCreateParkingAreasBodySchema: z.ZodObject<{
|
|
|
161
166
|
type: z.ZodLiteral<"Polygon">;
|
|
162
167
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
163
168
|
}, z.core.$strip>>;
|
|
169
|
+
fill_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
170
|
surface_area_sqm: z.ZodOptional<z.ZodNumber>;
|
|
165
171
|
scale_pixels_per_meter: z.ZodOptional<z.ZodNumber>;
|
|
166
172
|
}, z.core.$strip>>;
|
|
@@ -178,6 +184,7 @@ export declare const bulkCreateParkingAreasDataSchema: z.ZodObject<{
|
|
|
178
184
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
179
185
|
}, z.core.$strip>>;
|
|
180
186
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
187
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
181
188
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
182
189
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
183
190
|
is_active: z.ZodBoolean;
|
|
@@ -205,6 +212,7 @@ export declare const bulkCreateParkingAreasResponseSchema: z.ZodObject<{
|
|
|
205
212
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
206
213
|
}, z.core.$strip>>;
|
|
207
214
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
215
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
208
216
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
209
217
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
210
218
|
is_active: z.ZodBoolean;
|
|
@@ -228,6 +236,7 @@ export declare const updateParkingAreaBodySchema: z.ZodObject<{
|
|
|
228
236
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
229
237
|
}, z.core.$strip>>>;
|
|
230
238
|
site_plan_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
239
|
+
fill_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
240
|
surface_area_sqm: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
232
241
|
scale_pixels_per_meter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
233
242
|
is_active: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -241,6 +250,7 @@ export declare const updateParkingAreaDataSchema: z.ZodObject<{
|
|
|
241
250
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
242
251
|
}, z.core.$strip>>;
|
|
243
252
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
253
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
244
254
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
245
255
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
246
256
|
is_active: z.ZodBoolean;
|
|
@@ -259,6 +269,7 @@ export declare const updateParkingAreaResponseSchema: z.ZodObject<{
|
|
|
259
269
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
260
270
|
}, z.core.$strip>>;
|
|
261
271
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
272
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
262
273
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
263
274
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
264
275
|
is_active: z.ZodBoolean;
|
|
@@ -292,6 +303,7 @@ export declare const getParkingAreasDataSchema: z.ZodObject<{
|
|
|
292
303
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
293
304
|
}, z.core.$strip>>;
|
|
294
305
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
306
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
295
307
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
296
308
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
297
309
|
is_active: z.ZodBoolean;
|
|
@@ -315,6 +327,7 @@ export declare const getParkingAreasResponseSchema: z.ZodObject<{
|
|
|
315
327
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
316
328
|
}, z.core.$strip>>;
|
|
317
329
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
330
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
318
331
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
319
332
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
320
333
|
is_active: z.ZodBoolean;
|
|
@@ -337,6 +350,7 @@ export declare const getParkingAreaDetailResponseSchema: z.ZodObject<{
|
|
|
337
350
|
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
338
351
|
}, z.core.$strip>>;
|
|
339
352
|
site_plan_image_url: z.ZodNullable<z.ZodString>;
|
|
353
|
+
fill_color: z.ZodNullable<z.ZodString>;
|
|
340
354
|
surface_area_sqm: z.ZodNullable<z.ZodNumber>;
|
|
341
355
|
scale_pixels_per_meter: z.ZodNullable<z.ZodNumber>;
|
|
342
356
|
is_active: z.ZodBoolean;
|
package/dist/parkingArea.js
CHANGED
|
@@ -105,6 +105,10 @@ export const parkingAreaItemSchema = z
|
|
|
105
105
|
description: 'URL to the site plan image',
|
|
106
106
|
example: 'https://storage.example.com/site-plans/event-123/floor-1.png'
|
|
107
107
|
}),
|
|
108
|
+
fill_color: z.string().nullable().openapi({
|
|
109
|
+
description: 'Fill color for the parking area (CSS color string)',
|
|
110
|
+
example: 'rgba(59, 130, 246, 0.3)'
|
|
111
|
+
}),
|
|
108
112
|
surface_area_sqm: z.number().nonnegative().nullable().openapi({
|
|
109
113
|
description: 'Surface area in square meters',
|
|
110
114
|
example: 150.5
|
|
@@ -227,6 +231,10 @@ export const createParkingAreaBodySchema = z
|
|
|
227
231
|
description: 'URL to the site plan image',
|
|
228
232
|
example: 'https://storage.example.com/site-plans/event-123/floor-1.png'
|
|
229
233
|
}),
|
|
234
|
+
fill_color: z.string().nullable().optional().openapi({
|
|
235
|
+
description: 'Fill color for the parking area (CSS color string)',
|
|
236
|
+
example: 'rgba(59, 130, 246, 0.3)'
|
|
237
|
+
}),
|
|
230
238
|
surface_area_sqm: z.number().nonnegative().optional().openapi({
|
|
231
239
|
description: 'Surface area in square meters',
|
|
232
240
|
example: 150.5
|
|
@@ -258,6 +266,10 @@ export const createParkingAreaDataSchema = z
|
|
|
258
266
|
description: 'URL to the site plan image',
|
|
259
267
|
example: 'https://storage.example.com/site-plans/event-123/floor-1.png'
|
|
260
268
|
}),
|
|
269
|
+
fill_color: z.string().nullable().openapi({
|
|
270
|
+
description: 'Fill color for the parking area (CSS color string)',
|
|
271
|
+
example: 'rgba(59, 130, 246, 0.3)'
|
|
272
|
+
}),
|
|
261
273
|
surface_area_sqm: z.number().nullable().openapi({
|
|
262
274
|
description: 'Surface area in square meters',
|
|
263
275
|
example: 150.5
|
|
@@ -297,6 +309,10 @@ export const bulkCreateParkingAreasBodySchema = z
|
|
|
297
309
|
example: 'Zone A'
|
|
298
310
|
}),
|
|
299
311
|
geometry: geoJsonPolygonSchema.optional(),
|
|
312
|
+
fill_color: z.string().nullable().optional().openapi({
|
|
313
|
+
description: 'Fill color for the parking area (CSS color string)',
|
|
314
|
+
example: 'rgba(59, 130, 246, 0.3)'
|
|
315
|
+
}),
|
|
300
316
|
surface_area_sqm: z.number().nonnegative().optional(),
|
|
301
317
|
scale_pixels_per_meter: z.number().positive().optional().openapi({
|
|
302
318
|
description: 'Calibrated pixels-per-meter scale for this area',
|
|
@@ -378,6 +394,10 @@ export const updateParkingAreaBodySchema = z
|
|
|
378
394
|
description: 'New site plan image URL',
|
|
379
395
|
example: 'https://storage.example.com/site-plans/event-123/floor-2.png'
|
|
380
396
|
}),
|
|
397
|
+
fill_color: z.string().nullable().optional().openapi({
|
|
398
|
+
description: 'Fill color for the parking area (CSS color string)',
|
|
399
|
+
example: 'rgba(59, 130, 246, 0.3)'
|
|
400
|
+
}),
|
|
381
401
|
surface_area_sqm: z.number().nonnegative().nullable().optional().openapi({
|
|
382
402
|
description: 'New surface area in square meters',
|
|
383
403
|
example: 200.0
|
|
@@ -415,6 +435,10 @@ export const updateParkingAreaDataSchema = z
|
|
|
415
435
|
site_plan_image_url: z.string().nullable().openapi({
|
|
416
436
|
description: 'Updated site plan image URL'
|
|
417
437
|
}),
|
|
438
|
+
fill_color: z.string().nullable().openapi({
|
|
439
|
+
description: 'Fill color for the parking area (CSS color string)',
|
|
440
|
+
example: 'rgba(59, 130, 246, 0.3)'
|
|
441
|
+
}),
|
|
418
442
|
surface_area_sqm: z.number().nullable().openapi({
|
|
419
443
|
description: 'Updated surface area in square meters',
|
|
420
444
|
example: 200.0
|
|
@@ -25,6 +25,14 @@ export declare const parkingAreaAccessItemSchema: z.ZodObject<{
|
|
|
25
25
|
type: z.ZodLiteral<"LineString">;
|
|
26
26
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
27
27
|
}, z.core.$strip>>;
|
|
28
|
+
entry_geometry: z.ZodNullable<z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"Polygon">;
|
|
30
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
exit_geometry: z.ZodNullable<z.ZodObject<{
|
|
33
|
+
type: z.ZodLiteral<"Polygon">;
|
|
34
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
28
36
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
29
37
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
30
38
|
is_active: z.ZodBoolean;
|
|
@@ -44,6 +52,14 @@ export declare const parkingAreaAccessWithLinksSchema: z.ZodObject<{
|
|
|
44
52
|
type: z.ZodLiteral<"LineString">;
|
|
45
53
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
46
54
|
}, z.core.$strip>>;
|
|
55
|
+
entry_geometry: z.ZodNullable<z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"Polygon">;
|
|
57
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
exit_geometry: z.ZodNullable<z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<"Polygon">;
|
|
61
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
47
63
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
48
64
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
49
65
|
is_active: z.ZodBoolean;
|
|
@@ -69,6 +85,14 @@ export declare const createAccessBodySchema: z.ZodObject<{
|
|
|
69
85
|
type: z.ZodLiteral<"LineString">;
|
|
70
86
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
71
87
|
}, z.core.$strip>>;
|
|
88
|
+
entry_geometry: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
type: z.ZodLiteral<"Polygon">;
|
|
90
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
91
|
+
}, z.core.$strip>>;
|
|
92
|
+
exit_geometry: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<"Polygon">;
|
|
94
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
72
96
|
width_meters: z.ZodOptional<z.ZodNumber>;
|
|
73
97
|
height_meters: z.ZodOptional<z.ZodNumber>;
|
|
74
98
|
linked_parking_area_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -81,6 +105,14 @@ export declare const createAccessDataSchema: z.ZodObject<{
|
|
|
81
105
|
type: z.ZodLiteral<"LineString">;
|
|
82
106
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
83
107
|
}, z.core.$strip>>;
|
|
108
|
+
entry_geometry: z.ZodObject<{
|
|
109
|
+
type: z.ZodLiteral<"Polygon">;
|
|
110
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
exit_geometry: z.ZodObject<{
|
|
113
|
+
type: z.ZodLiteral<"Polygon">;
|
|
114
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
84
116
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
85
117
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
86
118
|
linked_parking_areas: z.ZodArray<z.ZodObject<{
|
|
@@ -102,6 +134,14 @@ export declare const createAccessResponseSchema: z.ZodObject<{
|
|
|
102
134
|
type: z.ZodLiteral<"LineString">;
|
|
103
135
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
104
136
|
}, z.core.$strip>>;
|
|
137
|
+
entry_geometry: z.ZodObject<{
|
|
138
|
+
type: z.ZodLiteral<"Polygon">;
|
|
139
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
exit_geometry: z.ZodObject<{
|
|
142
|
+
type: z.ZodLiteral<"Polygon">;
|
|
143
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
105
145
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
106
146
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
107
147
|
linked_parking_areas: z.ZodArray<z.ZodObject<{
|
|
@@ -122,6 +162,14 @@ export declare const updateAccessBodySchema: z.ZodObject<{
|
|
|
122
162
|
type: z.ZodLiteral<"LineString">;
|
|
123
163
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
124
164
|
}, z.core.$strip>>>;
|
|
165
|
+
entry_geometry: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
166
|
+
type: z.ZodLiteral<"Polygon">;
|
|
167
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
168
|
+
}, z.core.$strip>>>;
|
|
169
|
+
exit_geometry: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<"Polygon">;
|
|
171
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
172
|
+
}, z.core.$strip>>>;
|
|
125
173
|
width_meters: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
126
174
|
height_meters: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
127
175
|
is_active: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -132,12 +180,20 @@ export declare const updateAccessDataSchema: z.ZodObject<{
|
|
|
132
180
|
updated_at: z.ZodString;
|
|
133
181
|
event_id: z.ZodNumber;
|
|
134
182
|
is_active: z.ZodBoolean;
|
|
183
|
+
created_by: z.ZodNullable<z.ZodString>;
|
|
184
|
+
updated_by: z.ZodNullable<z.ZodString>;
|
|
135
185
|
geometry: z.ZodNullable<z.ZodObject<{
|
|
136
186
|
type: z.ZodLiteral<"LineString">;
|
|
137
187
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
138
188
|
}, z.core.$strip>>;
|
|
139
|
-
|
|
140
|
-
|
|
189
|
+
entry_geometry: z.ZodObject<{
|
|
190
|
+
type: z.ZodLiteral<"Polygon">;
|
|
191
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
exit_geometry: z.ZodObject<{
|
|
194
|
+
type: z.ZodLiteral<"Polygon">;
|
|
195
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
196
|
+
}, z.core.$strip>;
|
|
141
197
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
142
198
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
143
199
|
linked_parking_areas: z.ZodArray<z.ZodObject<{
|
|
@@ -155,12 +211,20 @@ export declare const updateAccessResponseSchema: z.ZodObject<{
|
|
|
155
211
|
updated_at: z.ZodString;
|
|
156
212
|
event_id: z.ZodNumber;
|
|
157
213
|
is_active: z.ZodBoolean;
|
|
214
|
+
created_by: z.ZodNullable<z.ZodString>;
|
|
215
|
+
updated_by: z.ZodNullable<z.ZodString>;
|
|
158
216
|
geometry: z.ZodNullable<z.ZodObject<{
|
|
159
217
|
type: z.ZodLiteral<"LineString">;
|
|
160
218
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
161
219
|
}, z.core.$strip>>;
|
|
162
|
-
|
|
163
|
-
|
|
220
|
+
entry_geometry: z.ZodObject<{
|
|
221
|
+
type: z.ZodLiteral<"Polygon">;
|
|
222
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
223
|
+
}, z.core.$strip>;
|
|
224
|
+
exit_geometry: z.ZodObject<{
|
|
225
|
+
type: z.ZodLiteral<"Polygon">;
|
|
226
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
227
|
+
}, z.core.$strip>;
|
|
164
228
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
165
229
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
166
230
|
linked_parking_areas: z.ZodArray<z.ZodObject<{
|
|
@@ -239,6 +303,14 @@ export declare const getAccessesDataSchema: z.ZodObject<{
|
|
|
239
303
|
type: z.ZodLiteral<"LineString">;
|
|
240
304
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
241
305
|
}, z.core.$strip>>;
|
|
306
|
+
entry_geometry: z.ZodNullable<z.ZodObject<{
|
|
307
|
+
type: z.ZodLiteral<"Polygon">;
|
|
308
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
exit_geometry: z.ZodNullable<z.ZodObject<{
|
|
311
|
+
type: z.ZodLiteral<"Polygon">;
|
|
312
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
313
|
+
}, z.core.$strip>>;
|
|
242
314
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
243
315
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
244
316
|
is_active: z.ZodBoolean;
|
|
@@ -265,6 +337,14 @@ export declare const getAccessesResponseSchema: z.ZodObject<{
|
|
|
265
337
|
type: z.ZodLiteral<"LineString">;
|
|
266
338
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
267
339
|
}, z.core.$strip>>;
|
|
340
|
+
entry_geometry: z.ZodNullable<z.ZodObject<{
|
|
341
|
+
type: z.ZodLiteral<"Polygon">;
|
|
342
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
343
|
+
}, z.core.$strip>>;
|
|
344
|
+
exit_geometry: z.ZodNullable<z.ZodObject<{
|
|
345
|
+
type: z.ZodLiteral<"Polygon">;
|
|
346
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
347
|
+
}, z.core.$strip>>;
|
|
268
348
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
269
349
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
270
350
|
is_active: z.ZodBoolean;
|
|
@@ -290,6 +370,14 @@ export declare const getAccessDetailResponseSchema: z.ZodObject<{
|
|
|
290
370
|
type: z.ZodLiteral<"LineString">;
|
|
291
371
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
292
372
|
}, z.core.$strip>>;
|
|
373
|
+
entry_geometry: z.ZodNullable<z.ZodObject<{
|
|
374
|
+
type: z.ZodLiteral<"Polygon">;
|
|
375
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
376
|
+
}, z.core.$strip>>;
|
|
377
|
+
exit_geometry: z.ZodNullable<z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"Polygon">;
|
|
379
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
380
|
+
}, z.core.$strip>>;
|
|
293
381
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
294
382
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
295
383
|
is_active: z.ZodBoolean;
|
|
@@ -312,6 +400,14 @@ export declare const bulkUpsertAccessesBodySchema: z.ZodObject<{
|
|
|
312
400
|
type: z.ZodLiteral<"LineString">;
|
|
313
401
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
314
402
|
}, z.core.$strip>>;
|
|
403
|
+
entry_geometry: z.ZodOptional<z.ZodObject<{
|
|
404
|
+
type: z.ZodLiteral<"Polygon">;
|
|
405
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
406
|
+
}, z.core.$strip>>;
|
|
407
|
+
exit_geometry: z.ZodOptional<z.ZodObject<{
|
|
408
|
+
type: z.ZodLiteral<"Polygon">;
|
|
409
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
410
|
+
}, z.core.$strip>>;
|
|
315
411
|
width_meters: z.ZodOptional<z.ZodNumber>;
|
|
316
412
|
height_meters: z.ZodOptional<z.ZodNumber>;
|
|
317
413
|
linked_parking_area_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
@@ -328,6 +424,14 @@ export declare const bulkUpsertAccessesDataSchema: z.ZodObject<{
|
|
|
328
424
|
type: z.ZodLiteral<"LineString">;
|
|
329
425
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
330
426
|
}, z.core.$strip>>;
|
|
427
|
+
entry_geometry: z.ZodNullable<z.ZodObject<{
|
|
428
|
+
type: z.ZodLiteral<"Polygon">;
|
|
429
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
430
|
+
}, z.core.$strip>>;
|
|
431
|
+
exit_geometry: z.ZodNullable<z.ZodObject<{
|
|
432
|
+
type: z.ZodLiteral<"Polygon">;
|
|
433
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
434
|
+
}, z.core.$strip>>;
|
|
331
435
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
332
436
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
333
437
|
is_active: z.ZodBoolean;
|
|
@@ -355,6 +459,14 @@ export declare const bulkUpsertAccessesResponseSchema: z.ZodObject<{
|
|
|
355
459
|
type: z.ZodLiteral<"LineString">;
|
|
356
460
|
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
357
461
|
}, z.core.$strip>>;
|
|
462
|
+
entry_geometry: z.ZodNullable<z.ZodObject<{
|
|
463
|
+
type: z.ZodLiteral<"Polygon">;
|
|
464
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
465
|
+
}, z.core.$strip>>;
|
|
466
|
+
exit_geometry: z.ZodNullable<z.ZodObject<{
|
|
467
|
+
type: z.ZodLiteral<"Polygon">;
|
|
468
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
469
|
+
}, z.core.$strip>>;
|
|
358
470
|
width_meters: z.ZodNullable<z.ZodNumber>;
|
|
359
471
|
height_meters: z.ZodNullable<z.ZodNumber>;
|
|
360
472
|
is_active: z.ZodBoolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// packages/phasing-schemas/src/parkingAreaAccess.ts
|
|
2
2
|
import { z } from './zod.js';
|
|
3
3
|
import { createSuccessResponseSchema, createMessageDataResponseSchema } from './common.js';
|
|
4
|
+
import { geoJsonPolygonSchema } from './index.js';
|
|
4
5
|
// ------------------------------
|
|
5
6
|
// Access Point Geometry Schemas
|
|
6
7
|
// ------------------------------
|
|
@@ -64,6 +65,12 @@ export const parkingAreaAccessItemSchema = z
|
|
|
64
65
|
geometry: geoJsonLineStringSchema.nullable().openapi({
|
|
65
66
|
description: 'GeoJSON LineString geometry for the access point'
|
|
66
67
|
}),
|
|
68
|
+
entry_geometry: geoJsonPolygonSchema.nullable().openapi({
|
|
69
|
+
description: 'GeoJSON Polygon geometry for the entry gate'
|
|
70
|
+
}),
|
|
71
|
+
exit_geometry: geoJsonPolygonSchema.nullable().openapi({
|
|
72
|
+
description: 'GeoJSON Polygon geometry for the exit gate'
|
|
73
|
+
}),
|
|
67
74
|
width_meters: z.number().positive().nullable().openapi({
|
|
68
75
|
description: 'Width of the access point in meters',
|
|
69
76
|
example: 6.5
|
|
@@ -158,6 +165,12 @@ export const createAccessBodySchema = z
|
|
|
158
165
|
geometry: geoJsonLineStringSchema.optional().openapi({
|
|
159
166
|
description: 'GeoJSON LineString geometry for the access point'
|
|
160
167
|
}),
|
|
168
|
+
entry_geometry: geoJsonPolygonSchema.optional().openapi({
|
|
169
|
+
description: 'GeoJSON Polygon geometry for the entry gate'
|
|
170
|
+
}),
|
|
171
|
+
exit_geometry: geoJsonPolygonSchema.optional().openapi({
|
|
172
|
+
description: 'GeoJSON Polygon geometry for the exit gate'
|
|
173
|
+
}),
|
|
161
174
|
width_meters: z.number().positive().optional().openapi({
|
|
162
175
|
description: 'Width of the access point in meters',
|
|
163
176
|
example: 6.5
|
|
@@ -192,6 +205,12 @@ export const createAccessDataSchema = z
|
|
|
192
205
|
geometry: geoJsonLineStringSchema.nullable().openapi({
|
|
193
206
|
description: 'GeoJSON LineString geometry'
|
|
194
207
|
}),
|
|
208
|
+
entry_geometry: geoJsonPolygonSchema.openapi({
|
|
209
|
+
description: 'GeoJSON Polygon geometry for the entry gate'
|
|
210
|
+
}),
|
|
211
|
+
exit_geometry: geoJsonPolygonSchema.openapi({
|
|
212
|
+
description: 'GeoJSON Polygon geometry for the exit gate'
|
|
213
|
+
}),
|
|
195
214
|
width_meters: z.number().nullable().openapi({
|
|
196
215
|
description: 'Width in meters',
|
|
197
216
|
example: 6.5
|
|
@@ -247,6 +266,12 @@ export const updateAccessBodySchema = z
|
|
|
247
266
|
geometry: geoJsonLineStringSchema.nullable().optional().openapi({
|
|
248
267
|
description: 'New geometry'
|
|
249
268
|
}),
|
|
269
|
+
entry_geometry: geoJsonPolygonSchema.nullable().optional().openapi({
|
|
270
|
+
description: 'New entry gate geometry'
|
|
271
|
+
}),
|
|
272
|
+
exit_geometry: geoJsonPolygonSchema.nullable().optional().openapi({
|
|
273
|
+
description: 'New exit gate geometry'
|
|
274
|
+
}),
|
|
250
275
|
width_meters: z.number().positive().nullable().optional().openapi({
|
|
251
276
|
description: 'New width in meters'
|
|
252
277
|
}),
|
|
@@ -438,6 +463,8 @@ export const bulkUpsertAccessesBodySchema = z
|
|
|
438
463
|
description: 'Name of the access point'
|
|
439
464
|
}),
|
|
440
465
|
geometry: geoJsonLineStringSchema.optional(),
|
|
466
|
+
entry_geometry: geoJsonPolygonSchema.optional(),
|
|
467
|
+
exit_geometry: geoJsonPolygonSchema.optional(),
|
|
441
468
|
width_meters: z.number().positive().optional(),
|
|
442
469
|
height_meters: z.number().positive().optional(),
|
|
443
470
|
linked_parking_area_ids: z.array(z.number().int().positive()).optional()
|
|
@@ -18,6 +18,7 @@ export declare const parkingAreaLayerItemSchema: z.ZodObject<{
|
|
|
18
18
|
name: z.ZodString;
|
|
19
19
|
layer_order: z.ZodNumber;
|
|
20
20
|
image_url: z.ZodString;
|
|
21
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
21
22
|
visible: z.ZodBoolean;
|
|
22
23
|
opacity: z.ZodNumber;
|
|
23
24
|
altitude_meters: z.ZodNumber;
|
|
@@ -45,6 +46,7 @@ export declare const createLayerBodySchema: z.ZodObject<{
|
|
|
45
46
|
name: z.ZodString;
|
|
46
47
|
layer_order: z.ZodOptional<z.ZodNumber>;
|
|
47
48
|
image_url: z.ZodString;
|
|
49
|
+
preview_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
50
|
visible: z.ZodDefault<z.ZodBoolean>;
|
|
49
51
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
50
52
|
altitude_meters: z.ZodDefault<z.ZodNumber>;
|
|
@@ -62,6 +64,7 @@ export declare const createLayerDataSchema: z.ZodObject<{
|
|
|
62
64
|
name: z.ZodString;
|
|
63
65
|
layer_order: z.ZodNumber;
|
|
64
66
|
image_url: z.ZodString;
|
|
67
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
65
68
|
visible: z.ZodBoolean;
|
|
66
69
|
opacity: z.ZodNumber;
|
|
67
70
|
altitude_meters: z.ZodNumber;
|
|
@@ -84,6 +87,7 @@ export declare const createLayerResponseSchema: z.ZodObject<{
|
|
|
84
87
|
name: z.ZodString;
|
|
85
88
|
layer_order: z.ZodNumber;
|
|
86
89
|
image_url: z.ZodString;
|
|
90
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
87
91
|
visible: z.ZodBoolean;
|
|
88
92
|
opacity: z.ZodNumber;
|
|
89
93
|
altitude_meters: z.ZodNumber;
|
|
@@ -107,6 +111,7 @@ export declare const updateLayerBodySchema: z.ZodObject<{
|
|
|
107
111
|
visible: z.ZodOptional<z.ZodBoolean>;
|
|
108
112
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
109
113
|
altitude_meters: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
preview_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
115
|
transform: z.ZodOptional<z.ZodObject<{
|
|
111
116
|
left: z.ZodNumber;
|
|
112
117
|
top: z.ZodNumber;
|
|
@@ -132,6 +137,7 @@ export declare const updateLayerDataSchema: z.ZodObject<{
|
|
|
132
137
|
created_by: z.ZodNullable<z.ZodString>;
|
|
133
138
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
134
139
|
layer_order: z.ZodNumber;
|
|
140
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
135
141
|
visible: z.ZodBoolean;
|
|
136
142
|
opacity: z.ZodNumber;
|
|
137
143
|
altitude_meters: z.ZodNumber;
|
|
@@ -156,6 +162,7 @@ export declare const updateLayerResponseSchema: z.ZodObject<{
|
|
|
156
162
|
created_by: z.ZodNullable<z.ZodString>;
|
|
157
163
|
updated_by: z.ZodNullable<z.ZodString>;
|
|
158
164
|
layer_order: z.ZodNumber;
|
|
165
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
159
166
|
visible: z.ZodBoolean;
|
|
160
167
|
opacity: z.ZodNumber;
|
|
161
168
|
altitude_meters: z.ZodNumber;
|
|
@@ -185,6 +192,7 @@ export declare const getLayersDataSchema: z.ZodObject<{
|
|
|
185
192
|
name: z.ZodString;
|
|
186
193
|
layer_order: z.ZodNumber;
|
|
187
194
|
image_url: z.ZodString;
|
|
195
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
188
196
|
visible: z.ZodBoolean;
|
|
189
197
|
opacity: z.ZodNumber;
|
|
190
198
|
altitude_meters: z.ZodNumber;
|
|
@@ -213,6 +221,7 @@ export declare const getLayersResponseSchema: z.ZodObject<{
|
|
|
213
221
|
name: z.ZodString;
|
|
214
222
|
layer_order: z.ZodNumber;
|
|
215
223
|
image_url: z.ZodString;
|
|
224
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
216
225
|
visible: z.ZodBoolean;
|
|
217
226
|
opacity: z.ZodNumber;
|
|
218
227
|
altitude_meters: z.ZodNumber;
|
|
@@ -240,6 +249,7 @@ export declare const getLayerDetailResponseSchema: z.ZodObject<{
|
|
|
240
249
|
name: z.ZodString;
|
|
241
250
|
layer_order: z.ZodNumber;
|
|
242
251
|
image_url: z.ZodString;
|
|
252
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
243
253
|
visible: z.ZodBoolean;
|
|
244
254
|
opacity: z.ZodNumber;
|
|
245
255
|
altitude_meters: z.ZodNumber;
|
|
@@ -264,6 +274,7 @@ export declare const bulkUpsertLayersBodySchema: z.ZodObject<{
|
|
|
264
274
|
name: z.ZodString;
|
|
265
275
|
layer_order: z.ZodNumber;
|
|
266
276
|
image_url: z.ZodString;
|
|
277
|
+
preview_image_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
278
|
visible: z.ZodDefault<z.ZodBoolean>;
|
|
268
279
|
opacity: z.ZodDefault<z.ZodNumber>;
|
|
269
280
|
altitude_meters: z.ZodDefault<z.ZodNumber>;
|
|
@@ -285,6 +296,7 @@ export declare const bulkUpsertLayersDataSchema: z.ZodObject<{
|
|
|
285
296
|
name: z.ZodString;
|
|
286
297
|
layer_order: z.ZodNumber;
|
|
287
298
|
image_url: z.ZodString;
|
|
299
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
288
300
|
visible: z.ZodBoolean;
|
|
289
301
|
opacity: z.ZodNumber;
|
|
290
302
|
altitude_meters: z.ZodNumber;
|
|
@@ -314,6 +326,7 @@ export declare const bulkUpsertLayersResponseSchema: z.ZodObject<{
|
|
|
314
326
|
name: z.ZodString;
|
|
315
327
|
layer_order: z.ZodNumber;
|
|
316
328
|
image_url: z.ZodString;
|
|
329
|
+
preview_image_url: z.ZodNullable<z.ZodString>;
|
|
317
330
|
visible: z.ZodBoolean;
|
|
318
331
|
opacity: z.ZodNumber;
|
|
319
332
|
altitude_meters: z.ZodNumber;
|
|
@@ -332,6 +345,31 @@ export declare const bulkUpsertLayersResponseSchema: z.ZodObject<{
|
|
|
332
345
|
}, z.core.$strip>>;
|
|
333
346
|
}, z.core.$strip>;
|
|
334
347
|
}, z.core.$strip>;
|
|
348
|
+
export declare const uploadLayerImageBodySchema: z.ZodObject<{
|
|
349
|
+
event_id: z.ZodNumber;
|
|
350
|
+
data_url: z.ZodString;
|
|
351
|
+
preview_data_url: z.ZodOptional<z.ZodString>;
|
|
352
|
+
file_name: z.ZodOptional<z.ZodString>;
|
|
353
|
+
preview_file_name: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, z.core.$strip>;
|
|
355
|
+
export declare const uploadLayerImageDataSchema: z.ZodObject<{
|
|
356
|
+
bucket: z.ZodString;
|
|
357
|
+
path: z.ZodString;
|
|
358
|
+
url: z.ZodString;
|
|
359
|
+
preview_path: z.ZodOptional<z.ZodString>;
|
|
360
|
+
preview_url: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, z.core.$strip>;
|
|
362
|
+
export declare const uploadLayerImageResponseSchema: z.ZodObject<{
|
|
363
|
+
success: z.ZodBoolean;
|
|
364
|
+
message: z.ZodString;
|
|
365
|
+
data: z.ZodObject<{
|
|
366
|
+
bucket: z.ZodString;
|
|
367
|
+
path: z.ZodString;
|
|
368
|
+
url: z.ZodString;
|
|
369
|
+
preview_path: z.ZodOptional<z.ZodString>;
|
|
370
|
+
preview_url: z.ZodOptional<z.ZodString>;
|
|
371
|
+
}, z.core.$strip>;
|
|
372
|
+
}, z.core.$strip>;
|
|
335
373
|
export type LayerTransform = z.infer<typeof layerTransformSchema>;
|
|
336
374
|
export type ParkingAreaLayerItem = z.infer<typeof parkingAreaLayerItemSchema>;
|
|
337
375
|
export type GetLayersByEventIdParams = z.infer<typeof getLayersByEventIdParamsSchema>;
|
|
@@ -352,3 +390,6 @@ export type GetLayerDetailResponse = z.infer<typeof getLayerDetailResponseSchema
|
|
|
352
390
|
export type BulkUpsertLayersBody = z.infer<typeof bulkUpsertLayersBodySchema>;
|
|
353
391
|
export type BulkUpsertLayersData = z.infer<typeof bulkUpsertLayersDataSchema>;
|
|
354
392
|
export type BulkUpsertLayersResponse = z.infer<typeof bulkUpsertLayersResponseSchema>;
|
|
393
|
+
export type UploadLayerImageBody = z.infer<typeof uploadLayerImageBodySchema>;
|
|
394
|
+
export type UploadLayerImageData = z.infer<typeof uploadLayerImageDataSchema>;
|
|
395
|
+
export type UploadLayerImageResponse = z.infer<typeof uploadLayerImageResponseSchema>;
|
package/dist/parkingAreaLayer.js
CHANGED
|
@@ -59,6 +59,10 @@ export const parkingAreaLayerItemSchema = z
|
|
|
59
59
|
description: 'URL to the layer image',
|
|
60
60
|
example: 'https://storage.example.com/layers/floor-1.png'
|
|
61
61
|
}),
|
|
62
|
+
preview_image_url: z.string().url().nullable().openapi({
|
|
63
|
+
description: 'URL to the preview layer image (optimized for display)',
|
|
64
|
+
example: 'https://storage.example.com/layers/previews/floor-1.png'
|
|
65
|
+
}),
|
|
62
66
|
visible: z.boolean().openapi({
|
|
63
67
|
description: 'Whether the layer is visible',
|
|
64
68
|
example: true
|
|
@@ -150,6 +154,10 @@ export const createLayerBodySchema = z
|
|
|
150
154
|
description: 'URL to the layer image',
|
|
151
155
|
example: 'https://storage.example.com/layers/floor-1.png'
|
|
152
156
|
}),
|
|
157
|
+
preview_image_url: z.string().url().nullable().optional().openapi({
|
|
158
|
+
description: 'URL to the preview layer image (optimized for display)',
|
|
159
|
+
example: 'https://storage.example.com/layers/previews/floor-1.png'
|
|
160
|
+
}),
|
|
153
161
|
visible: z.boolean().default(true).openapi({
|
|
154
162
|
description: 'Whether the layer is visible',
|
|
155
163
|
example: true
|
|
@@ -190,6 +198,9 @@ export const createLayerDataSchema = z
|
|
|
190
198
|
image_url: z.string().openapi({
|
|
191
199
|
description: 'URL to the layer image'
|
|
192
200
|
}),
|
|
201
|
+
preview_image_url: z.string().nullable().openapi({
|
|
202
|
+
description: 'URL to the preview layer image'
|
|
203
|
+
}),
|
|
193
204
|
visible: z.boolean().openapi({
|
|
194
205
|
description: 'Whether the layer is visible',
|
|
195
206
|
example: true
|
|
@@ -249,6 +260,9 @@ export const updateLayerBodySchema = z
|
|
|
249
260
|
altitude_meters: z.number().min(-100).max(100).optional().openapi({
|
|
250
261
|
description: 'New altitude in meters'
|
|
251
262
|
}),
|
|
263
|
+
preview_image_url: z.string().url().nullable().optional().openapi({
|
|
264
|
+
description: 'New preview image URL for the layer'
|
|
265
|
+
}),
|
|
252
266
|
transform: layerTransformSchema.optional().openapi({
|
|
253
267
|
description: 'New transform data'
|
|
254
268
|
}),
|
|
@@ -350,6 +364,9 @@ export const bulkUpsertLayersBodySchema = z
|
|
|
350
364
|
image_url: z.string().url().openapi({
|
|
351
365
|
description: 'URL to the layer image'
|
|
352
366
|
}),
|
|
367
|
+
preview_image_url: z.string().url().nullable().optional().openapi({
|
|
368
|
+
description: 'URL to the preview layer image'
|
|
369
|
+
}),
|
|
353
370
|
visible: z.boolean().default(true),
|
|
354
371
|
opacity: z.number().min(0).max(1).default(1),
|
|
355
372
|
altitude_meters: z.number().min(-100).max(100).default(0),
|
|
@@ -383,3 +400,51 @@ export const bulkUpsertLayersDataSchema = z
|
|
|
383
400
|
})
|
|
384
401
|
.openapi('BulkUpsertLayersData');
|
|
385
402
|
export const bulkUpsertLayersResponseSchema = createMessageDataResponseSchema(bulkUpsertLayersDataSchema, 'BulkUpsertLayersResponse', 'Layers upserted successfully', 'Details of the upserted layers');
|
|
403
|
+
// ------------------------------
|
|
404
|
+
// Upload Layer Image Schemas
|
|
405
|
+
// ------------------------------
|
|
406
|
+
export const uploadLayerImageBodySchema = z
|
|
407
|
+
.object({
|
|
408
|
+
event_id: z.number().int().positive().openapi({
|
|
409
|
+
description: 'ID of the event',
|
|
410
|
+
example: 1
|
|
411
|
+
}),
|
|
412
|
+
data_url: z.string().min(1).openapi({
|
|
413
|
+
description: 'Base64-encoded data URL for the layer image'
|
|
414
|
+
}),
|
|
415
|
+
preview_data_url: z.string().min(1).optional().openapi({
|
|
416
|
+
description: 'Optional base64 data URL for a preview version of the layer image'
|
|
417
|
+
}),
|
|
418
|
+
file_name: z.string().min(1).max(255).optional().openapi({
|
|
419
|
+
description: 'Optional file name to use for storage',
|
|
420
|
+
example: 'ground-floor.png'
|
|
421
|
+
}),
|
|
422
|
+
preview_file_name: z.string().min(1).max(255).optional().openapi({
|
|
423
|
+
description: 'Optional file name to use for preview storage',
|
|
424
|
+
example: 'ground-floor-preview.png'
|
|
425
|
+
})
|
|
426
|
+
})
|
|
427
|
+
.openapi('UploadLayerImageBody');
|
|
428
|
+
export const uploadLayerImageDataSchema = z
|
|
429
|
+
.object({
|
|
430
|
+
bucket: z.string().openapi({
|
|
431
|
+
description: 'Storage bucket name',
|
|
432
|
+
example: 'site-images'
|
|
433
|
+
}),
|
|
434
|
+
path: z.string().openapi({
|
|
435
|
+
description: 'Storage object path',
|
|
436
|
+
example: 'events/1/layers/ground-floor-abc123.png'
|
|
437
|
+
}),
|
|
438
|
+
url: z.string().url().openapi({
|
|
439
|
+
description: 'Public URL of the uploaded image'
|
|
440
|
+
}),
|
|
441
|
+
preview_path: z.string().optional().openapi({
|
|
442
|
+
description: 'Storage object path for the preview image',
|
|
443
|
+
example: 'events/1/layers/previews/ground-floor-abc123.png'
|
|
444
|
+
}),
|
|
445
|
+
preview_url: z.string().url().optional().openapi({
|
|
446
|
+
description: 'Public URL of the uploaded preview image'
|
|
447
|
+
})
|
|
448
|
+
})
|
|
449
|
+
.openapi('UploadLayerImageData');
|
|
450
|
+
export const uploadLayerImageResponseSchema = createMessageDataResponseSchema(uploadLayerImageDataSchema, 'UploadLayerImageResponse', 'Layer image uploaded successfully', 'Details of the uploaded layer image');
|
package/dist/parkingBooking.d.ts
CHANGED
|
@@ -1023,6 +1023,7 @@ export declare const updateBookingTimeResponseSchema: z.ZodObject<{
|
|
|
1023
1023
|
}, z.core.$strip>;
|
|
1024
1024
|
export declare const createFastTrackBookingBodySchema: z.ZodObject<{
|
|
1025
1025
|
phone_number: z.ZodString;
|
|
1026
|
+
email: z.ZodEmail;
|
|
1026
1027
|
event_id: z.ZodNumber;
|
|
1027
1028
|
license_plate_image_url: z.ZodURL;
|
|
1028
1029
|
applicant_badge_image_url: z.ZodURL;
|
package/dist/parkingBooking.js
CHANGED
|
@@ -808,7 +808,6 @@ export const getParkingBookingDetailsByQrBodySchema = z
|
|
|
808
808
|
})
|
|
809
809
|
})
|
|
810
810
|
.openapi('GetBookingDetailsByQrBody');
|
|
811
|
-
// ------------------------------
|
|
812
811
|
// Export All Parking Bookings
|
|
813
812
|
// ------------------------------
|
|
814
813
|
export const exportBookingDataSchema = z
|
|
@@ -1058,6 +1057,10 @@ export const createFastTrackBookingBodySchema = z
|
|
|
1058
1057
|
description: 'Contact phone number for fast-track booking',
|
|
1059
1058
|
example: '+33123456789'
|
|
1060
1059
|
}),
|
|
1060
|
+
email: z.email('Valid email is required').openapi({
|
|
1061
|
+
description: 'Contact email for fast-track booking',
|
|
1062
|
+
example: 'contact@example.com'
|
|
1063
|
+
}),
|
|
1061
1064
|
event_id: z.number().positive().openapi({
|
|
1062
1065
|
description: 'ID of the event for the fast-track booking',
|
|
1063
1066
|
example: 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venulog/phasing-engine-schemas",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0-alpha.0",
|
|
4
4
|
"description": "Shared schemas and types for Phasing Engine API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"types": "./dist/parkingAreaAccess.d.ts",
|
|
43
43
|
"import": "./dist/parkingAreaAccess.js"
|
|
44
44
|
},
|
|
45
|
+
"./eventPhase": {
|
|
46
|
+
"types": "./dist/eventPhase.d.ts",
|
|
47
|
+
"import": "./dist/eventPhase.js"
|
|
48
|
+
},
|
|
45
49
|
"./enums": {
|
|
46
50
|
"types": "./dist/enums/index.d.ts",
|
|
47
51
|
"import": "./dist/enums/index.js"
|
|
@@ -65,6 +69,10 @@
|
|
|
65
69
|
"./exhibitor": {
|
|
66
70
|
"types": "./dist/exhibitor.d.ts",
|
|
67
71
|
"import": "./dist/exhibitor.js"
|
|
72
|
+
},
|
|
73
|
+
"./eventSitePlanCalibration": {
|
|
74
|
+
"types": "./dist/eventSitePlanCalibration.d.ts",
|
|
75
|
+
"import": "./dist/eventSitePlanCalibration.js"
|
|
68
76
|
}
|
|
69
77
|
},
|
|
70
78
|
"files": [
|
|
@@ -73,7 +81,7 @@
|
|
|
73
81
|
"scripts": {
|
|
74
82
|
"build": "npm run clean && tsc",
|
|
75
83
|
"dev": "tsc --watch",
|
|
76
|
-
"clean": "
|
|
84
|
+
"clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
77
85
|
"prepublishOnly": "npm run build"
|
|
78
86
|
},
|
|
79
87
|
"keywords": [
|