digitaltwin-core 0.13.3 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +101 -106
- package/dist/auth/apisix_parser.d.ts +0 -146
- package/dist/auth/apisix_parser.d.ts.map +0 -1
- package/dist/auth/apisix_parser.js +0 -185
- package/dist/auth/apisix_parser.js.map +0 -1
- package/dist/auth/auth_config.d.ts +0 -126
- package/dist/auth/auth_config.d.ts.map +0 -1
- package/dist/auth/auth_config.js +0 -169
- package/dist/auth/auth_config.js.map +0 -1
- package/dist/auth/index.d.ts +0 -5
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -4
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/types.d.ts +0 -100
- package/dist/auth/types.d.ts.map +0 -1
- package/dist/auth/types.js +0 -2
- package/dist/auth/types.js.map +0 -1
- package/dist/auth/user_service.d.ts +0 -86
- package/dist/auth/user_service.d.ts.map +0 -1
- package/dist/auth/user_service.js +0 -237
- package/dist/auth/user_service.js.map +0 -1
- package/dist/components/assets_manager.d.ts +0 -662
- package/dist/components/assets_manager.d.ts.map +0 -1
- package/dist/components/assets_manager.js +0 -1529
- package/dist/components/assets_manager.js.map +0 -1
- package/dist/components/async_upload.d.ts +0 -20
- package/dist/components/async_upload.d.ts.map +0 -1
- package/dist/components/async_upload.js +0 -10
- package/dist/components/async_upload.js.map +0 -1
- package/dist/components/collector.d.ts +0 -203
- package/dist/components/collector.d.ts.map +0 -1
- package/dist/components/collector.js +0 -202
- package/dist/components/collector.js.map +0 -1
- package/dist/components/custom_table_manager.d.ts +0 -503
- package/dist/components/custom_table_manager.d.ts.map +0 -1
- package/dist/components/custom_table_manager.js +0 -1052
- package/dist/components/custom_table_manager.js.map +0 -1
- package/dist/components/global_assets_handler.d.ts +0 -63
- package/dist/components/global_assets_handler.d.ts.map +0 -1
- package/dist/components/global_assets_handler.js +0 -127
- package/dist/components/global_assets_handler.js.map +0 -1
- package/dist/components/handler.d.ts +0 -104
- package/dist/components/handler.d.ts.map +0 -1
- package/dist/components/handler.js +0 -110
- package/dist/components/handler.js.map +0 -1
- package/dist/components/harvester.d.ts +0 -182
- package/dist/components/harvester.d.ts.map +0 -1
- package/dist/components/harvester.js +0 -393
- package/dist/components/harvester.js.map +0 -1
- package/dist/components/index.d.ts +0 -11
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -9
- package/dist/components/index.js.map +0 -1
- package/dist/components/interfaces.d.ts +0 -126
- package/dist/components/interfaces.d.ts.map +0 -1
- package/dist/components/interfaces.js +0 -8
- package/dist/components/interfaces.js.map +0 -1
- package/dist/components/map_manager.d.ts +0 -61
- package/dist/components/map_manager.d.ts.map +0 -1
- package/dist/components/map_manager.js +0 -242
- package/dist/components/map_manager.js.map +0 -1
- package/dist/components/tileset_manager.d.ts +0 -125
- package/dist/components/tileset_manager.d.ts.map +0 -1
- package/dist/components/tileset_manager.js +0 -618
- package/dist/components/tileset_manager.js.map +0 -1
- package/dist/components/types.d.ts +0 -226
- package/dist/components/types.d.ts.map +0 -1
- package/dist/components/types.js +0 -8
- package/dist/components/types.js.map +0 -1
- package/dist/database/adapters/knex_database_adapter.d.ts +0 -92
- package/dist/database/adapters/knex_database_adapter.d.ts.map +0 -1
- package/dist/database/adapters/knex_database_adapter.js +0 -647
- package/dist/database/adapters/knex_database_adapter.js.map +0 -1
- package/dist/database/database_adapter.d.ts +0 -251
- package/dist/database/database_adapter.d.ts.map +0 -1
- package/dist/database/database_adapter.js +0 -46
- package/dist/database/database_adapter.js.map +0 -1
- package/dist/engine/digital_twin_engine.d.ts +0 -253
- package/dist/engine/digital_twin_engine.d.ts.map +0 -1
- package/dist/engine/digital_twin_engine.js +0 -790
- package/dist/engine/digital_twin_engine.js.map +0 -1
- package/dist/engine/endpoints.d.ts +0 -47
- package/dist/engine/endpoints.d.ts.map +0 -1
- package/dist/engine/endpoints.js +0 -56
- package/dist/engine/endpoints.js.map +0 -1
- package/dist/engine/events.d.ts +0 -93
- package/dist/engine/events.d.ts.map +0 -1
- package/dist/engine/events.js +0 -71
- package/dist/engine/events.js.map +0 -1
- package/dist/engine/initializer.d.ts +0 -62
- package/dist/engine/initializer.d.ts.map +0 -1
- package/dist/engine/initializer.js +0 -108
- package/dist/engine/initializer.js.map +0 -1
- package/dist/engine/queue_manager.d.ts +0 -87
- package/dist/engine/queue_manager.d.ts.map +0 -1
- package/dist/engine/queue_manager.js +0 -196
- package/dist/engine/queue_manager.js.map +0 -1
- package/dist/engine/scheduler.d.ts +0 -30
- package/dist/engine/scheduler.d.ts.map +0 -1
- package/dist/engine/scheduler.js +0 -370
- package/dist/engine/scheduler.js.map +0 -1
- package/dist/engine/upload_processor.d.ts +0 -36
- package/dist/engine/upload_processor.d.ts.map +0 -1
- package/dist/engine/upload_processor.js +0 -101
- package/dist/engine/upload_processor.js.map +0 -1
- package/dist/env/env.d.ts +0 -134
- package/dist/env/env.d.ts.map +0 -1
- package/dist/env/env.js +0 -177
- package/dist/env/env.js.map +0 -1
- package/dist/index.d.ts +0 -49
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -57
- package/dist/index.js.map +0 -1
- package/dist/openapi/generator.d.ts +0 -93
- package/dist/openapi/generator.d.ts.map +0 -1
- package/dist/openapi/generator.js +0 -293
- package/dist/openapi/generator.js.map +0 -1
- package/dist/openapi/index.d.ts +0 -9
- package/dist/openapi/index.d.ts.map +0 -1
- package/dist/openapi/index.js +0 -9
- package/dist/openapi/index.js.map +0 -1
- package/dist/openapi/types.d.ts +0 -182
- package/dist/openapi/types.d.ts.map +0 -1
- package/dist/openapi/types.js +0 -16
- package/dist/openapi/types.js.map +0 -1
- package/dist/storage/adapters/local_storage_service.d.ts +0 -51
- package/dist/storage/adapters/local_storage_service.d.ts.map +0 -1
- package/dist/storage/adapters/local_storage_service.js +0 -110
- package/dist/storage/adapters/local_storage_service.js.map +0 -1
- package/dist/storage/adapters/ovh_storage_service.d.ts +0 -61
- package/dist/storage/adapters/ovh_storage_service.d.ts.map +0 -1
- package/dist/storage/adapters/ovh_storage_service.js +0 -172
- package/dist/storage/adapters/ovh_storage_service.js.map +0 -1
- package/dist/storage/storage_factory.d.ts +0 -14
- package/dist/storage/storage_factory.d.ts.map +0 -1
- package/dist/storage/storage_factory.js +0 -36
- package/dist/storage/storage_factory.js.map +0 -1
- package/dist/storage/storage_service.d.ts +0 -163
- package/dist/storage/storage_service.d.ts.map +0 -1
- package/dist/storage/storage_service.js +0 -54
- package/dist/storage/storage_service.js.map +0 -1
- package/dist/types/data_record.d.ts +0 -123
- package/dist/types/data_record.d.ts.map +0 -1
- package/dist/types/data_record.js +0 -8
- package/dist/types/data_record.js.map +0 -1
- package/dist/utils/http_responses.d.ts +0 -155
- package/dist/utils/http_responses.d.ts.map +0 -1
- package/dist/utils/http_responses.js +0 -190
- package/dist/utils/http_responses.js.map +0 -1
- package/dist/utils/index.d.ts +0 -8
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -6
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -74
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -92
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/map_to_data_record.d.ts +0 -10
- package/dist/utils/map_to_data_record.d.ts.map +0 -1
- package/dist/utils/map_to_data_record.js +0 -36
- package/dist/utils/map_to_data_record.js.map +0 -1
- package/dist/utils/servable_endpoint.d.ts +0 -63
- package/dist/utils/servable_endpoint.d.ts.map +0 -1
- package/dist/utils/servable_endpoint.js +0 -67
- package/dist/utils/servable_endpoint.js.map +0 -1
- package/dist/utils/zip_utils.d.ts +0 -66
- package/dist/utils/zip_utils.d.ts.map +0 -1
- package/dist/utils/zip_utils.js +0 -169
- package/dist/utils/zip_utils.js.map +0 -1
|
@@ -1,618 +0,0 @@
|
|
|
1
|
-
import { AssetsManager } from './assets_manager.js';
|
|
2
|
-
import { extractAndStoreArchive } from '../utils/zip_utils.js';
|
|
3
|
-
import { ApisixAuthParser } from '../auth/apisix_parser.js';
|
|
4
|
-
import { AuthConfig } from '../auth/auth_config.js';
|
|
5
|
-
import fs from 'fs/promises';
|
|
6
|
-
import { successResponse, errorResponse, badRequestResponse, unauthorizedResponse, notFoundResponse, forbiddenResponse } from '../utils/http_responses.js';
|
|
7
|
-
/** Threshold for async upload (50MB) */
|
|
8
|
-
const ASYNC_UPLOAD_THRESHOLD = 50 * 1024 * 1024;
|
|
9
|
-
/**
|
|
10
|
-
* Specialized Assets Manager for handling 3D Tiles tilesets.
|
|
11
|
-
*
|
|
12
|
-
* This manager extracts uploaded ZIP files and stores each file in cloud storage (OVH S3),
|
|
13
|
-
* allowing Cesium and other 3D viewers to load tilesets directly via public URLs.
|
|
14
|
-
*
|
|
15
|
-
* ## How it works
|
|
16
|
-
*
|
|
17
|
-
* 1. User uploads a ZIP containing a 3D Tiles tileset
|
|
18
|
-
* 2. ZIP is extracted and all files are stored in OVH with public-read ACL
|
|
19
|
-
* 3. Database stores only the tileset.json URL and base path
|
|
20
|
-
* 4. Cesium loads tileset.json directly from OVH
|
|
21
|
-
* 5. Cesium fetches tiles using relative paths in tileset.json (directly from OVH)
|
|
22
|
-
*
|
|
23
|
-
* ## Endpoints
|
|
24
|
-
*
|
|
25
|
-
* - GET /{endpoint} - List all tilesets with their public URLs
|
|
26
|
-
* - POST /{endpoint} - Upload tileset ZIP (sync < 50MB, async >= 50MB)
|
|
27
|
-
* - GET /{endpoint}/:id/status - Poll async upload status
|
|
28
|
-
* - PUT /{endpoint}/:id - Update tileset metadata
|
|
29
|
-
* - DELETE /{endpoint}/:id - Delete tileset and all files from storage
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```typescript
|
|
33
|
-
* class MyTilesetManager extends TilesetManager {
|
|
34
|
-
* getConfiguration() {
|
|
35
|
-
* return {
|
|
36
|
-
* name: 'tilesets',
|
|
37
|
-
* description: 'Manage 3D Tiles tilesets',
|
|
38
|
-
* contentType: 'application/json',
|
|
39
|
-
* endpoint: 'api/tilesets',
|
|
40
|
-
* extension: '.zip'
|
|
41
|
-
* }
|
|
42
|
-
* }
|
|
43
|
-
* }
|
|
44
|
-
*
|
|
45
|
-
* // After upload, response contains:
|
|
46
|
-
* // { tileset_url: 'https://bucket.s3.../tilesets/123/tileset.json' }
|
|
47
|
-
* //
|
|
48
|
-
* // Cesium loads directly:
|
|
49
|
-
* // Cesium.Cesium3DTileset.fromUrl(tileset_url)
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
export class TilesetManager extends AssetsManager {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments);
|
|
55
|
-
/** Upload queue for async processing (injected by engine) */
|
|
56
|
-
this.uploadQueue = null;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Set the upload queue for async job processing.
|
|
60
|
-
* Called by DigitalTwinEngine during initialization.
|
|
61
|
-
*/
|
|
62
|
-
setUploadQueue(queue) {
|
|
63
|
-
this.uploadQueue = queue;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Handle tileset upload.
|
|
67
|
-
*
|
|
68
|
-
* - Files < 50MB: Synchronous extraction and upload
|
|
69
|
-
* - Files >= 50MB: Queued for async processing (returns 202)
|
|
70
|
-
*/
|
|
71
|
-
async handleUpload(req) {
|
|
72
|
-
try {
|
|
73
|
-
if (!req?.body) {
|
|
74
|
-
return badRequestResponse('Invalid request: missing request body');
|
|
75
|
-
}
|
|
76
|
-
// Authenticate user
|
|
77
|
-
const userId = await this.authenticateUser(req);
|
|
78
|
-
if (typeof userId !== 'number') {
|
|
79
|
-
return userId; // Returns error response
|
|
80
|
-
}
|
|
81
|
-
// Validate request
|
|
82
|
-
const { description } = req.body;
|
|
83
|
-
const filePath = req.file?.path;
|
|
84
|
-
const fileBuffer = req.file?.buffer;
|
|
85
|
-
const filename = req.file?.originalname || req.body.filename;
|
|
86
|
-
const fileSize = req.file?.size || fileBuffer?.length || 0;
|
|
87
|
-
if (!filePath && !fileBuffer) {
|
|
88
|
-
return badRequestResponse('Missing required field: ZIP file');
|
|
89
|
-
}
|
|
90
|
-
if (!description) {
|
|
91
|
-
if (filePath)
|
|
92
|
-
await fs.unlink(filePath).catch(() => { });
|
|
93
|
-
return badRequestResponse('Missing required field: description');
|
|
94
|
-
}
|
|
95
|
-
if (!filename) {
|
|
96
|
-
if (filePath)
|
|
97
|
-
await fs.unlink(filePath).catch(() => { });
|
|
98
|
-
return badRequestResponse('Filename could not be determined from uploaded file');
|
|
99
|
-
}
|
|
100
|
-
if (!filename.toLowerCase().endsWith('.zip')) {
|
|
101
|
-
if (filePath)
|
|
102
|
-
await fs.unlink(filePath).catch(() => { });
|
|
103
|
-
return badRequestResponse('Invalid file extension. Expected: .zip');
|
|
104
|
-
}
|
|
105
|
-
const config = this.getConfiguration();
|
|
106
|
-
const isPublic = req.body.is_public !== undefined ? Boolean(req.body.is_public) : true;
|
|
107
|
-
// Route to async or sync based on file size and queue availability
|
|
108
|
-
if (this.uploadQueue && filePath && fileSize >= ASYNC_UPLOAD_THRESHOLD) {
|
|
109
|
-
return this.handleAsyncUpload(userId, filePath, filename, description, isPublic, config);
|
|
110
|
-
}
|
|
111
|
-
return this.handleSyncUpload(userId, filePath, fileBuffer, filename, description, isPublic, config);
|
|
112
|
-
}
|
|
113
|
-
catch (error) {
|
|
114
|
-
if (req.file?.path)
|
|
115
|
-
await fs.unlink(req.file.path).catch(() => { });
|
|
116
|
-
return errorResponse(error);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Authenticate user from request headers.
|
|
121
|
-
* Returns user ID on success, or error response on failure.
|
|
122
|
-
*/
|
|
123
|
-
async authenticateUser(req) {
|
|
124
|
-
if (AuthConfig.isAuthDisabled()) {
|
|
125
|
-
const userRecord = await this.userService.findOrCreateUser({
|
|
126
|
-
id: AuthConfig.getAnonymousUserId(),
|
|
127
|
-
roles: []
|
|
128
|
-
});
|
|
129
|
-
return userRecord.id;
|
|
130
|
-
}
|
|
131
|
-
if (!ApisixAuthParser.hasValidAuth(req.headers || {})) {
|
|
132
|
-
return unauthorizedResponse();
|
|
133
|
-
}
|
|
134
|
-
const authUser = ApisixAuthParser.parseAuthHeaders(req.headers || {});
|
|
135
|
-
if (!authUser) {
|
|
136
|
-
return unauthorizedResponse('Invalid authentication headers');
|
|
137
|
-
}
|
|
138
|
-
const userRecord = await this.userService.findOrCreateUser(authUser);
|
|
139
|
-
if (!userRecord.id) {
|
|
140
|
-
return errorResponse('Failed to retrieve user information');
|
|
141
|
-
}
|
|
142
|
-
return userRecord.id;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Queue upload for background processing. Returns HTTP 202 immediately.
|
|
146
|
-
*/
|
|
147
|
-
async handleAsyncUpload(userId, filePath, filename, description, isPublic, config) {
|
|
148
|
-
let recordId = null;
|
|
149
|
-
try {
|
|
150
|
-
// Create pending record (url will be updated after extraction)
|
|
151
|
-
const metadata = {
|
|
152
|
-
name: config.name,
|
|
153
|
-
type: 'application/json',
|
|
154
|
-
url: '',
|
|
155
|
-
tileset_url: '',
|
|
156
|
-
date: new Date(),
|
|
157
|
-
description,
|
|
158
|
-
filename,
|
|
159
|
-
owner_id: userId,
|
|
160
|
-
is_public: isPublic,
|
|
161
|
-
upload_status: 'pending'
|
|
162
|
-
};
|
|
163
|
-
const savedRecord = await this.db.save(metadata);
|
|
164
|
-
recordId = savedRecord.id;
|
|
165
|
-
const jobData = {
|
|
166
|
-
type: 'tileset',
|
|
167
|
-
recordId,
|
|
168
|
-
tempFilePath: filePath,
|
|
169
|
-
componentName: config.name,
|
|
170
|
-
userId,
|
|
171
|
-
filename,
|
|
172
|
-
description
|
|
173
|
-
};
|
|
174
|
-
const job = await this.uploadQueue?.add(`tileset-${recordId}`, jobData, {
|
|
175
|
-
jobId: `tileset-upload-${recordId}`
|
|
176
|
-
});
|
|
177
|
-
if (!job)
|
|
178
|
-
throw new Error('Failed to queue upload job');
|
|
179
|
-
await this.db.updateById(config.name, recordId, { upload_job_id: job.id });
|
|
180
|
-
return {
|
|
181
|
-
status: 202,
|
|
182
|
-
content: JSON.stringify({
|
|
183
|
-
message: 'Tileset upload accepted, processing in background',
|
|
184
|
-
id: recordId,
|
|
185
|
-
job_id: job.id,
|
|
186
|
-
status: 'pending',
|
|
187
|
-
status_url: `/${config.endpoint}/${recordId}/status`
|
|
188
|
-
}),
|
|
189
|
-
headers: { 'Content-Type': 'application/json' }
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
catch (error) {
|
|
193
|
-
if (recordId !== null)
|
|
194
|
-
await this.db.delete(String(recordId), config.name).catch(() => { });
|
|
195
|
-
await fs.unlink(filePath).catch(() => { });
|
|
196
|
-
throw error;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Process upload synchronously.
|
|
201
|
-
*/
|
|
202
|
-
async handleSyncUpload(userId, filePath, fileBuffer, filename, description, isPublic, config) {
|
|
203
|
-
let zipBuffer;
|
|
204
|
-
try {
|
|
205
|
-
const readBuffer = fileBuffer || (filePath ? await fs.readFile(filePath) : null);
|
|
206
|
-
if (!readBuffer)
|
|
207
|
-
throw new Error('No file data available');
|
|
208
|
-
zipBuffer = readBuffer;
|
|
209
|
-
}
|
|
210
|
-
catch (error) {
|
|
211
|
-
return errorResponse(`Failed to read uploaded file: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
212
|
-
}
|
|
213
|
-
try {
|
|
214
|
-
// Generate unique base path using timestamp
|
|
215
|
-
const basePath = `${config.name}/${Date.now()}`;
|
|
216
|
-
// Extract ZIP and upload all files to storage
|
|
217
|
-
const extractResult = await extractAndStoreArchive(zipBuffer, this.storage, basePath);
|
|
218
|
-
if (!extractResult.root_file) {
|
|
219
|
-
// Clean up uploaded files
|
|
220
|
-
await this.storage.deleteByPrefix(basePath).catch(() => { });
|
|
221
|
-
return badRequestResponse('Invalid tileset: no tileset.json found in the ZIP archive');
|
|
222
|
-
}
|
|
223
|
-
// Build the public URL for tileset.json
|
|
224
|
-
const tilesetPath = `${basePath}/${extractResult.root_file}`;
|
|
225
|
-
const tilesetUrl = this.storage.getPublicUrl(tilesetPath);
|
|
226
|
-
// Save metadata to database (url = basePath for deletion)
|
|
227
|
-
const metadata = {
|
|
228
|
-
name: config.name,
|
|
229
|
-
type: 'application/json',
|
|
230
|
-
url: basePath,
|
|
231
|
-
tileset_url: tilesetUrl,
|
|
232
|
-
date: new Date(),
|
|
233
|
-
description,
|
|
234
|
-
filename,
|
|
235
|
-
owner_id: userId,
|
|
236
|
-
is_public: isPublic,
|
|
237
|
-
upload_status: 'completed'
|
|
238
|
-
};
|
|
239
|
-
const savedRecord = await this.db.save(metadata);
|
|
240
|
-
// Clean up temp file
|
|
241
|
-
if (filePath)
|
|
242
|
-
await fs.unlink(filePath).catch(() => { });
|
|
243
|
-
return successResponse({
|
|
244
|
-
message: 'Tileset uploaded successfully',
|
|
245
|
-
id: savedRecord.id,
|
|
246
|
-
tileset_url: tilesetUrl,
|
|
247
|
-
file_count: extractResult.file_count
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
catch (error) {
|
|
251
|
-
if (filePath)
|
|
252
|
-
await fs.unlink(filePath).catch(() => { });
|
|
253
|
-
throw error;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Get upload status for async uploads.
|
|
258
|
-
*/
|
|
259
|
-
async handleGetStatus(req) {
|
|
260
|
-
try {
|
|
261
|
-
const { id } = req.params || {};
|
|
262
|
-
if (!id) {
|
|
263
|
-
return badRequestResponse('Asset ID is required');
|
|
264
|
-
}
|
|
265
|
-
const asset = await this.getAssetById(id);
|
|
266
|
-
if (!asset) {
|
|
267
|
-
return notFoundResponse('Tileset not found');
|
|
268
|
-
}
|
|
269
|
-
const record = asset;
|
|
270
|
-
if (record.upload_status === 'completed') {
|
|
271
|
-
return successResponse({
|
|
272
|
-
id: record.id,
|
|
273
|
-
status: 'completed',
|
|
274
|
-
tileset_url: record.tileset_url
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
if (record.upload_status === 'failed') {
|
|
278
|
-
return successResponse({
|
|
279
|
-
id: record.id,
|
|
280
|
-
status: 'failed',
|
|
281
|
-
error: record.upload_error || 'Upload failed'
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
return successResponse({
|
|
285
|
-
id: record.id,
|
|
286
|
-
status: record.upload_status || 'unknown',
|
|
287
|
-
job_id: record.upload_job_id
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
catch (error) {
|
|
291
|
-
return errorResponse(error);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* List all tilesets with their public URLs.
|
|
296
|
-
*/
|
|
297
|
-
async retrieve(req) {
|
|
298
|
-
try {
|
|
299
|
-
const assets = await this.getAllAssets();
|
|
300
|
-
const isAdmin = req && ApisixAuthParser.isAdmin(req.headers || {});
|
|
301
|
-
// Get authenticated user ID if available
|
|
302
|
-
let authenticatedUserId = null;
|
|
303
|
-
if (req && ApisixAuthParser.hasValidAuth(req.headers || {})) {
|
|
304
|
-
const authUser = ApisixAuthParser.parseAuthHeaders(req.headers || {});
|
|
305
|
-
if (authUser) {
|
|
306
|
-
const userRecord = await this.userService.findOrCreateUser(authUser);
|
|
307
|
-
authenticatedUserId = userRecord.id || null;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
// Filter to visible assets only (unless admin)
|
|
311
|
-
const visibleAssets = isAdmin
|
|
312
|
-
? assets
|
|
313
|
-
: assets.filter(asset => asset.is_public || (authenticatedUserId !== null && asset.owner_id === authenticatedUserId));
|
|
314
|
-
// Transform to response format
|
|
315
|
-
const response = visibleAssets.map(asset => ({
|
|
316
|
-
id: asset.id,
|
|
317
|
-
description: asset.description || '',
|
|
318
|
-
filename: asset.filename || '',
|
|
319
|
-
date: asset.date,
|
|
320
|
-
owner_id: asset.owner_id || null,
|
|
321
|
-
is_public: asset.is_public ?? true,
|
|
322
|
-
tileset_url: asset.tileset_url || '',
|
|
323
|
-
upload_status: asset.upload_status || 'completed'
|
|
324
|
-
}));
|
|
325
|
-
return successResponse(response);
|
|
326
|
-
}
|
|
327
|
-
catch (error) {
|
|
328
|
-
return errorResponse(error);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Delete tileset and all files from storage.
|
|
333
|
-
*/
|
|
334
|
-
async handleDelete(req) {
|
|
335
|
-
try {
|
|
336
|
-
// Authenticate user
|
|
337
|
-
const userId = await this.authenticateUser(req);
|
|
338
|
-
if (typeof userId !== 'number') {
|
|
339
|
-
return userId;
|
|
340
|
-
}
|
|
341
|
-
const { id } = req.params || {};
|
|
342
|
-
if (!id) {
|
|
343
|
-
return badRequestResponse('Asset ID is required');
|
|
344
|
-
}
|
|
345
|
-
const asset = await this.getAssetById(id);
|
|
346
|
-
if (!asset) {
|
|
347
|
-
return notFoundResponse('Tileset not found');
|
|
348
|
-
}
|
|
349
|
-
// Check ownership (admins can delete any)
|
|
350
|
-
const isAdmin = ApisixAuthParser.isAdmin(req.headers || {});
|
|
351
|
-
if (!isAdmin && asset.owner_id !== null && asset.owner_id !== userId) {
|
|
352
|
-
return forbiddenResponse('You can only delete your own assets');
|
|
353
|
-
}
|
|
354
|
-
// Block deletion while upload in progress
|
|
355
|
-
if (asset.upload_status === 'pending' || asset.upload_status === 'processing') {
|
|
356
|
-
return {
|
|
357
|
-
status: 409,
|
|
358
|
-
content: JSON.stringify({ error: 'Cannot delete tileset while upload is in progress' }),
|
|
359
|
-
headers: { 'Content-Type': 'application/json' }
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
// Delete all files from storage
|
|
363
|
-
// Support both new format (url = basePath) and legacy format (file_index.files)
|
|
364
|
-
const legacyFileIndex = asset.file_index;
|
|
365
|
-
if (legacyFileIndex?.files && legacyFileIndex.files.length > 0) {
|
|
366
|
-
// Legacy format: delete individual files from file_index
|
|
367
|
-
console.log(`[TilesetManager] Deleting ${legacyFileIndex.files.length} files (legacy format)`);
|
|
368
|
-
for (const file of legacyFileIndex.files) {
|
|
369
|
-
await this.storage.delete(file.path).catch(() => {
|
|
370
|
-
// Ignore individual file deletion errors
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
else if (asset.url) {
|
|
375
|
-
// New format: url contains basePath, use deleteByPrefix
|
|
376
|
-
const deletedCount = await this.storage.deleteByPrefix(asset.url);
|
|
377
|
-
console.log(`[TilesetManager] Deleted ${deletedCount} files from ${asset.url}`);
|
|
378
|
-
}
|
|
379
|
-
// Delete database record
|
|
380
|
-
await this.deleteAssetById(id);
|
|
381
|
-
return successResponse({ message: 'Tileset deleted successfully' });
|
|
382
|
-
}
|
|
383
|
-
catch (error) {
|
|
384
|
-
return errorResponse(error);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* Get HTTP endpoints for this manager.
|
|
389
|
-
*/
|
|
390
|
-
getEndpoints() {
|
|
391
|
-
const config = this.getConfiguration();
|
|
392
|
-
return [
|
|
393
|
-
// Status endpoint (for async upload polling)
|
|
394
|
-
{
|
|
395
|
-
method: 'get',
|
|
396
|
-
path: `/${config.endpoint}/:id/status`,
|
|
397
|
-
handler: this.handleGetStatus.bind(this),
|
|
398
|
-
responseType: 'application/json'
|
|
399
|
-
},
|
|
400
|
-
// List tilesets
|
|
401
|
-
{
|
|
402
|
-
method: 'get',
|
|
403
|
-
path: `/${config.endpoint}`,
|
|
404
|
-
handler: this.retrieve.bind(this),
|
|
405
|
-
responseType: 'application/json'
|
|
406
|
-
},
|
|
407
|
-
// Upload tileset
|
|
408
|
-
{
|
|
409
|
-
method: 'post',
|
|
410
|
-
path: `/${config.endpoint}`,
|
|
411
|
-
handler: this.handleUpload.bind(this),
|
|
412
|
-
responseType: 'application/json'
|
|
413
|
-
},
|
|
414
|
-
// Update metadata
|
|
415
|
-
{
|
|
416
|
-
method: 'put',
|
|
417
|
-
path: `/${config.endpoint}/:id`,
|
|
418
|
-
handler: this.handleUpdate.bind(this),
|
|
419
|
-
responseType: 'application/json'
|
|
420
|
-
},
|
|
421
|
-
// Delete tileset
|
|
422
|
-
{
|
|
423
|
-
method: 'delete',
|
|
424
|
-
path: `/${config.endpoint}/:id`,
|
|
425
|
-
handler: this.handleDelete.bind(this),
|
|
426
|
-
responseType: 'application/json'
|
|
427
|
-
}
|
|
428
|
-
];
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Generate OpenAPI specification.
|
|
432
|
-
*/
|
|
433
|
-
getOpenAPISpec() {
|
|
434
|
-
const config = this.getConfiguration();
|
|
435
|
-
const basePath = `/${config.endpoint}`;
|
|
436
|
-
const tagName = config.tags?.[0] || config.name;
|
|
437
|
-
return {
|
|
438
|
-
paths: {
|
|
439
|
-
[basePath]: {
|
|
440
|
-
get: {
|
|
441
|
-
summary: 'List all tilesets',
|
|
442
|
-
description: 'Returns all tilesets with their public URLs for Cesium loading',
|
|
443
|
-
tags: [tagName],
|
|
444
|
-
responses: {
|
|
445
|
-
'200': {
|
|
446
|
-
description: 'List of tilesets',
|
|
447
|
-
content: {
|
|
448
|
-
'application/json': {
|
|
449
|
-
schema: {
|
|
450
|
-
type: 'array',
|
|
451
|
-
items: { $ref: '#/components/schemas/TilesetResponse' }
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
},
|
|
458
|
-
post: {
|
|
459
|
-
summary: 'Upload a tileset',
|
|
460
|
-
description: 'Upload a ZIP file containing a 3D Tiles tileset. Files < 50MB are processed synchronously, larger files are queued.',
|
|
461
|
-
tags: [tagName],
|
|
462
|
-
security: [{ ApiKeyAuth: [] }],
|
|
463
|
-
requestBody: {
|
|
464
|
-
required: true,
|
|
465
|
-
content: {
|
|
466
|
-
'multipart/form-data': {
|
|
467
|
-
schema: {
|
|
468
|
-
type: 'object',
|
|
469
|
-
required: ['file', 'description'],
|
|
470
|
-
properties: {
|
|
471
|
-
file: {
|
|
472
|
-
type: 'string',
|
|
473
|
-
format: 'binary',
|
|
474
|
-
description: 'ZIP file containing tileset'
|
|
475
|
-
},
|
|
476
|
-
description: { type: 'string', description: 'Tileset description' },
|
|
477
|
-
is_public: {
|
|
478
|
-
type: 'boolean',
|
|
479
|
-
description: 'Whether tileset is public (default: true)'
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
},
|
|
486
|
-
responses: {
|
|
487
|
-
'200': {
|
|
488
|
-
description: 'Tileset uploaded successfully (sync)',
|
|
489
|
-
content: {
|
|
490
|
-
'application/json': {
|
|
491
|
-
schema: {
|
|
492
|
-
type: 'object',
|
|
493
|
-
properties: {
|
|
494
|
-
message: { type: 'string' },
|
|
495
|
-
id: { type: 'integer' },
|
|
496
|
-
tileset_url: {
|
|
497
|
-
type: 'string',
|
|
498
|
-
description: 'Public URL to load in Cesium'
|
|
499
|
-
},
|
|
500
|
-
file_count: { type: 'integer' }
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
'202': {
|
|
507
|
-
description: 'Upload accepted for async processing',
|
|
508
|
-
content: {
|
|
509
|
-
'application/json': {
|
|
510
|
-
schema: {
|
|
511
|
-
type: 'object',
|
|
512
|
-
properties: {
|
|
513
|
-
message: { type: 'string' },
|
|
514
|
-
id: { type: 'integer' },
|
|
515
|
-
status: { type: 'string' },
|
|
516
|
-
status_url: { type: 'string' }
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
'400': { description: 'Bad request - missing fields or invalid file' },
|
|
523
|
-
'401': { description: 'Unauthorized' }
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
[`${basePath}/{id}/status`]: {
|
|
528
|
-
get: {
|
|
529
|
-
summary: 'Get upload status',
|
|
530
|
-
description: 'Poll the status of an async upload',
|
|
531
|
-
tags: [tagName],
|
|
532
|
-
parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }],
|
|
533
|
-
responses: {
|
|
534
|
-
'200': {
|
|
535
|
-
description: 'Upload status',
|
|
536
|
-
content: {
|
|
537
|
-
'application/json': {
|
|
538
|
-
schema: {
|
|
539
|
-
type: 'object',
|
|
540
|
-
properties: {
|
|
541
|
-
id: { type: 'integer' },
|
|
542
|
-
status: {
|
|
543
|
-
type: 'string',
|
|
544
|
-
enum: ['pending', 'processing', 'completed', 'failed']
|
|
545
|
-
},
|
|
546
|
-
tileset_url: { type: 'string' },
|
|
547
|
-
error: { type: 'string' }
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
},
|
|
553
|
-
'404': { description: 'Tileset not found' }
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
[`${basePath}/{id}`]: {
|
|
558
|
-
put: {
|
|
559
|
-
summary: 'Update tileset metadata',
|
|
560
|
-
tags: [tagName],
|
|
561
|
-
security: [{ ApiKeyAuth: [] }],
|
|
562
|
-
parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }],
|
|
563
|
-
requestBody: {
|
|
564
|
-
content: {
|
|
565
|
-
'application/json': {
|
|
566
|
-
schema: {
|
|
567
|
-
type: 'object',
|
|
568
|
-
properties: {
|
|
569
|
-
description: { type: 'string' },
|
|
570
|
-
is_public: { type: 'boolean' }
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
},
|
|
576
|
-
responses: {
|
|
577
|
-
'200': { description: 'Updated successfully' },
|
|
578
|
-
'401': { description: 'Unauthorized' },
|
|
579
|
-
'403': { description: 'Forbidden' },
|
|
580
|
-
'404': { description: 'Not found' }
|
|
581
|
-
}
|
|
582
|
-
},
|
|
583
|
-
delete: {
|
|
584
|
-
summary: 'Delete tileset',
|
|
585
|
-
description: 'Delete tileset and all files from storage',
|
|
586
|
-
tags: [tagName],
|
|
587
|
-
security: [{ ApiKeyAuth: [] }],
|
|
588
|
-
parameters: [{ name: 'id', in: 'path', required: true, schema: { type: 'string' } }],
|
|
589
|
-
responses: {
|
|
590
|
-
'200': { description: 'Deleted successfully' },
|
|
591
|
-
'401': { description: 'Unauthorized' },
|
|
592
|
-
'403': { description: 'Forbidden' },
|
|
593
|
-
'404': { description: 'Not found' },
|
|
594
|
-
'409': { description: 'Upload in progress' }
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
tags: [{ name: tagName, description: config.description }],
|
|
600
|
-
schemas: {
|
|
601
|
-
TilesetResponse: {
|
|
602
|
-
type: 'object',
|
|
603
|
-
properties: {
|
|
604
|
-
id: { type: 'integer' },
|
|
605
|
-
description: { type: 'string' },
|
|
606
|
-
filename: { type: 'string' },
|
|
607
|
-
date: { type: 'string', format: 'date-time' },
|
|
608
|
-
owner_id: { type: 'integer', nullable: true },
|
|
609
|
-
is_public: { type: 'boolean' },
|
|
610
|
-
tileset_url: { type: 'string', description: 'Public URL to load in Cesium' },
|
|
611
|
-
upload_status: { type: 'string', enum: ['pending', 'processing', 'completed', 'failed'] }
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
//# sourceMappingURL=tileset_manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tileset_manager.js","sourceRoot":"","sources":["../../src/components/tileset_manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAInD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO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