@venulog/phasing-engine-schemas 0.13.4-alpha.0 → 0.13.4-alpha.2

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.
@@ -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>;
@@ -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/package.json CHANGED
@@ -1,107 +1,107 @@
1
- {
2
- "name": "@venulog/phasing-engine-schemas",
3
- "version": "0.13.4-alpha.0",
4
- "description": "Shared schemas and types for Phasing Engine API",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- },
13
- "./auth": {
14
- "types": "./dist/auth.d.ts",
15
- "import": "./dist/auth.js"
16
- },
17
- "./common": {
18
- "types": "./dist/common.d.ts",
19
- "import": "./dist/common.js"
20
- },
21
- "./pagination": {
22
- "types": "./dist/pagination.d.ts",
23
- "import": "./dist/pagination.js"
24
- },
25
- "./parkingBooking": {
26
- "types": "./dist/parkingBooking.d.ts",
27
- "import": "./dist/parkingBooking.js"
28
- },
29
- "./event": {
30
- "types": "./dist/event.d.ts",
31
- "import": "./dist/event.js"
32
- },
33
- "./parkingArea": {
34
- "types": "./dist/parkingArea.d.ts",
35
- "import": "./dist/parkingArea.js"
36
- },
37
- "./parkingAreaLayer": {
38
- "types": "./dist/parkingAreaLayer.d.ts",
39
- "import": "./dist/parkingAreaLayer.js"
40
- },
41
- "./parkingAreaAccess": {
42
- "types": "./dist/parkingAreaAccess.d.ts",
43
- "import": "./dist/parkingAreaAccess.js"
44
- },
45
- "./eventPhase": {
46
- "types": "./dist/eventPhase.d.ts",
47
- "import": "./dist/eventPhase.js"
48
- },
49
- "./enums": {
50
- "types": "./dist/enums/index.d.ts",
51
- "import": "./dist/enums/index.js"
52
- },
53
- "./accessToken": {
54
- "types": "./dist/accessToken.d.ts",
55
- "import": "./dist/accessToken.js"
56
- },
57
- "./vehiclePosition": {
58
- "types": "./dist/vehiclePosition.d.ts",
59
- "import": "./dist/vehiclePosition.js"
60
- },
61
- "./camera": {
62
- "types": "./dist/camera.d.ts",
63
- "import": "./dist/camera.js"
64
- },
65
- "./simulation": {
66
- "types": "./dist/simulation.d.ts",
67
- "import": "./dist/simulation.js"
68
- },
69
- "./exhibitor": {
70
- "types": "./dist/exhibitor.d.ts",
71
- "import": "./dist/exhibitor.js"
72
- },
73
- "./eventSitePlanCalibration": {
74
- "types": "./dist/eventSitePlanCalibration.d.ts",
75
- "import": "./dist/eventSitePlanCalibration.js"
76
- }
77
- },
78
- "files": [
79
- "dist"
80
- ],
81
- "scripts": {
82
- "build": "npm run clean && tsc",
83
- "dev": "tsc --watch",
84
- "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
85
- "prepublishOnly": "npm run build"
86
- },
87
- "keywords": [
88
- "schemas",
89
- "validation",
90
- "types",
91
- "zod",
92
- "phasing-engine"
93
- ],
94
- "license": "MIT",
95
- "dependencies": {
96
- "@asteasolutions/zod-to-openapi": "^8.1.0",
97
- "zod": "^4.1.13"
98
- },
99
- "devDependencies": {
100
- "typescript": "^5.6.3"
101
- },
102
- "repository": {
103
- "type": "git",
104
- "url": "git+https://github.com/manaty/phasing_engine.git",
105
- "directory": "packages/phasing-schemas"
106
- }
107
- }
1
+ {
2
+ "name": "@venulog/phasing-engine-schemas",
3
+ "version": "0.13.4-alpha.2",
4
+ "description": "Shared schemas and types for Phasing Engine API",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./auth": {
14
+ "types": "./dist/auth.d.ts",
15
+ "import": "./dist/auth.js"
16
+ },
17
+ "./common": {
18
+ "types": "./dist/common.d.ts",
19
+ "import": "./dist/common.js"
20
+ },
21
+ "./pagination": {
22
+ "types": "./dist/pagination.d.ts",
23
+ "import": "./dist/pagination.js"
24
+ },
25
+ "./parkingBooking": {
26
+ "types": "./dist/parkingBooking.d.ts",
27
+ "import": "./dist/parkingBooking.js"
28
+ },
29
+ "./event": {
30
+ "types": "./dist/event.d.ts",
31
+ "import": "./dist/event.js"
32
+ },
33
+ "./parkingArea": {
34
+ "types": "./dist/parkingArea.d.ts",
35
+ "import": "./dist/parkingArea.js"
36
+ },
37
+ "./parkingAreaLayer": {
38
+ "types": "./dist/parkingAreaLayer.d.ts",
39
+ "import": "./dist/parkingAreaLayer.js"
40
+ },
41
+ "./parkingAreaAccess": {
42
+ "types": "./dist/parkingAreaAccess.d.ts",
43
+ "import": "./dist/parkingAreaAccess.js"
44
+ },
45
+ "./eventPhase": {
46
+ "types": "./dist/eventPhase.d.ts",
47
+ "import": "./dist/eventPhase.js"
48
+ },
49
+ "./enums": {
50
+ "types": "./dist/enums/index.d.ts",
51
+ "import": "./dist/enums/index.js"
52
+ },
53
+ "./accessToken": {
54
+ "types": "./dist/accessToken.d.ts",
55
+ "import": "./dist/accessToken.js"
56
+ },
57
+ "./vehiclePosition": {
58
+ "types": "./dist/vehiclePosition.d.ts",
59
+ "import": "./dist/vehiclePosition.js"
60
+ },
61
+ "./camera": {
62
+ "types": "./dist/camera.d.ts",
63
+ "import": "./dist/camera.js"
64
+ },
65
+ "./simulation": {
66
+ "types": "./dist/simulation.d.ts",
67
+ "import": "./dist/simulation.js"
68
+ },
69
+ "./exhibitor": {
70
+ "types": "./dist/exhibitor.d.ts",
71
+ "import": "./dist/exhibitor.js"
72
+ },
73
+ "./eventSitePlanCalibration": {
74
+ "types": "./dist/eventSitePlanCalibration.d.ts",
75
+ "import": "./dist/eventSitePlanCalibration.js"
76
+ }
77
+ },
78
+ "files": [
79
+ "dist"
80
+ ],
81
+ "scripts": {
82
+ "build": "npm run clean && tsc",
83
+ "dev": "tsc --watch",
84
+ "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
85
+ "prepublishOnly": "npm run build"
86
+ },
87
+ "keywords": [
88
+ "schemas",
89
+ "validation",
90
+ "types",
91
+ "zod",
92
+ "phasing-engine"
93
+ ],
94
+ "license": "MIT",
95
+ "dependencies": {
96
+ "@asteasolutions/zod-to-openapi": "^8.1.0",
97
+ "zod": "^4.1.13"
98
+ },
99
+ "devDependencies": {
100
+ "typescript": "^5.6.3"
101
+ },
102
+ "repository": {
103
+ "type": "git",
104
+ "url": "git+https://github.com/manaty/phasing_engine.git",
105
+ "directory": "packages/phasing-schemas"
106
+ }
107
+ }