@mesh-sync/worker-backend-client 1.0.6 → 4.0.0-pr.51.20260312131431

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/README.md CHANGED
@@ -100,6 +100,89 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
100
100
  ## Available Message Types
101
101
 
102
102
 
103
+ ### analytics-collection-request
104
+
105
+ **Description:** Request to trigger a manual market data collection job.
106
+ Used for ad-hoc scraping of specific queries on marketplaces.
107
+
108
+
109
+ **Method:** `client.analyticsCollectionRequest(data)`
110
+
111
+ **Payload Type:** `AnalyticsCollectionRequestMessage`
112
+
113
+ **Fields:**
114
+
115
+ - `marketplace` (string) [✗]: The marketplace to scrape (etsy, ebay, etc.)
116
+
117
+ - `query` (string) [✓]: The search query to use
118
+
119
+ - `options` (object) [✗]: Collection options (pages, filters, etc.)
120
+
121
+
122
+
123
+ ### backend-logging-event
124
+
125
+ **Description:** Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
126
+ This event is sent to ELK for centralized monitoring, alerting, and debugging.
127
+
128
+ Automatically emitted by the custom Pino logger interceptor when:
129
+ - logger.warn() is called
130
+ - logger.error() is called
131
+ - uncaught exceptions occur
132
+ - request failures happen (4xx, 5xx responses)
133
+
134
+ Used for:
135
+ - System health monitoring
136
+ - Error tracking and alerting
137
+ - Performance degradation detection
138
+ - Security incident tracking
139
+ - Compliance and audit trails
140
+
141
+
142
+ **Method:** `client.backendLoggingEvent(data)`
143
+
144
+ **Payload Type:** `BackendLoggingEventMessage`
145
+
146
+ **Fields:**
147
+
148
+ - `eventType` (string) [✓]: Type of logging event
149
+
150
+ - `timestamp` (string) [✓]: ISO 8601 timestamp when the log was generated
151
+
152
+ - `level` (string) [✓]: Log level severity
153
+
154
+ - `message` (string) [✓]: Human-readable log message
155
+
156
+ - `context` (string) [✓]: Logger context (typically the class/service name)
157
+
158
+ - `requestId` (string) [✗]: Unique request ID for correlation (X-Request-Id header)
159
+
160
+ - `userId` (string) [✗]: ID of the authenticated user (if available)
161
+
162
+ - `httpMethod` (string) [✗]: HTTP method of the request
163
+
164
+ - `httpUrl` (string) [✗]: Request URL path (without query params for privacy)
165
+
166
+ - `httpStatusCode` (integer) [✗]: HTTP response status code
167
+
168
+ - `errorType` (string) [✗]: Error class/type name
169
+
170
+ - `errorStack` (string) [✗]: Stack trace (sanitized, no sensitive data)
171
+
172
+ - `errorCode` (string) [✗]: Application-specific error code for categorization
173
+
174
+ - `metadata` (object) [✗]: Additional structured context (sanitized, no PII)
175
+
176
+ - `environment` (string) [✗]: Deployment environment
177
+
178
+ - `serviceVersion` (string) [✗]: Backend service version
179
+
180
+ - `hostname` (string) [✗]: Server hostname/pod name
181
+
182
+ - `durationMs` (number) [✗]: Operation duration in milliseconds (if applicable)
183
+
184
+
185
+
103
186
  ### etsy-analytics-sync-completed
104
187
 
105
188
  **Description:** Contains synced analytics data for Etsy listings. Backend stores this in etsy_analytics_snapshots table and indexes to ELK.
@@ -121,6 +204,8 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
121
204
 
122
205
  - `results` (array) [✗]: Analytics for each synced listing
123
206
 
207
+ - `credentialUpdate` (object) [✗]: New credentials if token was refreshed during operation
208
+
124
209
  - `errors` (array) [✗]: Errors for failed listings
125
210
 
126
211
  - `syncedAt` (string) [✗]:
@@ -147,6 +232,8 @@ Can sync: - Specific listings (provide listingIds) - All user listings (provide
147
232
 
148
233
  - `shopId` (string) [✗]: Etsy shop ID for shop-level analytics
149
234
 
235
+ - `credentials` (object) [✗]: Etsy OAuth credentials
236
+
150
237
  - `timeRange` (object) [✗]: Date range for historical analytics
151
238
 
152
239
  - `syncOptions` (object) [✗]:
@@ -182,6 +269,8 @@ Can sync: - Specific listings (provide listingIds) - All user listings (provide
182
269
 
183
270
  - `etsyListingUrl` (string) [✗]: URL to view listing on Etsy (only if status=SUCCESS)
184
271
 
272
+ - `credentialUpdate` (object) [✗]: New credentials if token was refreshed during operation
273
+
185
274
  - `etsyFileId` (string) [✗]: Etsy digital file ID (only if status=SUCCESS)
186
275
 
187
276
  - `error` (object) [✗]: Error details (only if status=FAILED)
@@ -211,6 +300,8 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
211
300
 
212
301
  - `ownerId` (string) [✗]: User ID who owns the metamodel
213
302
 
303
+ - `credentials` (object) [✗]: Etsy OAuth credentials
304
+
214
305
  - `materialVariant` (object) [✗]: Material-specific listing configuration
215
306
 
216
307
  - `baseListingData` (object) [✗]: Common listing information
@@ -251,7 +342,15 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
251
342
 
252
343
  ### file-download-request
253
344
 
254
- **Description:** Handles file download requests.
345
+ **Description:** Downloads model file from storage provider to MinIO for processing pipeline.
346
+ Acts as parent job for thumbnail generation, technical metadata analysis, and metadata generation.
347
+
348
+ Retry Configuration:
349
+ - Automatic retry enabled for transient failures (connection errors, timeouts)
350
+ - Default: 5 attempts with exponential backoff (2s, 4s, 8s, 16s, 32s)
351
+ - Retry on: STORAGE_TIMEOUT, NETWORK_ERROR, MINIO_UNAVAILABLE, CONNECTION_REFUSED
352
+ - No retry on: INVALID_CREDENTIALS, FILE_NOT_FOUND, PERMISSION_DENIED
353
+
255
354
 
256
355
  **Method:** `client.fileDownloadRequest(data)`
257
356
 
@@ -261,562 +360,1588 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
261
360
 
262
361
  - `modelId` (string) [✗]: The unique identifier for the model to be downloaded.
263
362
 
363
+ - `ownerId` (string) [✗]: The identifier of the user who owns the model. Optional - if not provided, will be retrieved from StorageConnection.
364
+
264
365
  - `storageLocation` (object) [✗]: The storage location of the model.
265
366
 
367
+ - `metadata` (object) [✗]: Optional metadata from discovery. For Thingiverse, contains downloadUrl for direct file access.
266
368
 
369
+ - `credentials` (object) [✗]: Decrypted credentials required for this specific download operation. Injected by the backend.
267
370
 
268
- ### marketplace-analytics-sync-completed
371
+ - `minioDestination` (object) [✗]: Destination in MinIO where file will be uploaded after download.
269
372
 
270
- **Description:** Contains synced analytics data for marketplace listings. Backend stores this in marketplace_analytics_snapshots table and indexes to ELK. Works with any marketplace provider.
373
+ - `autoEnqueueChildren` (boolean) [✗]: Automatically enqueue thumbnail generation, technical metadata analysis, and metadata generation jobs after download completes.
271
374
 
272
- **Method:** `client.marketplaceAnalyticsSyncCompleted(data)`
375
+ - `previewType` (string) [✗]: Preview type for thumbnail generation (passed to child job).
273
376
 
274
- **Payload Type:** `MarketplaceAnalyticsSyncCompletedMessage`
377
+ - `generate360Views` (boolean) [✗]: Generate 16 angle views for 360° preview (passed to child job).
275
378
 
276
- **Fields:**
379
+ - `webhookUrl` (string) [✗]: Optional webhook URL to call when download completes. If provided, worker will POST completion status to this endpoint.
277
380
 
278
- - `originalJobId` (string) [✗]: BullMQ job ID from original request
279
381
 
280
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
281
382
 
282
- - `status` (string) [✗]: Sync result (SUCCESS, PARTIAL_SUCCESS, or FAILED)
383
+ ### file-vectorize-completed
283
384
 
284
- - `syncedCount` (integer) [✗]: Number of listings successfully synced
385
+ **Description:** Result of the vectorization process containing the embedding vector.
285
386
 
286
- - `errorCount` (integer) [✗]: Number of listings that failed
387
+ **Method:** `client.fileVectorizeCompleted(data)`
287
388
 
288
- - `results` (array) [✗]: Analytics for each synced listing
389
+ **Payload Type:** `FileVectorizeCompletedMessage`
289
390
 
290
- - `errors` (array) [✗]: Errors for failed listings
391
+ **Fields:**
291
392
 
292
- - `syncedAt` (string) [✗]: When sync completed (ISO 8601)
393
+ - `fileId` (string) [✗]:
293
394
 
294
- - `nextScheduledSync` (string) [✗]: When next automatic sync should occur (ISO 8601)
395
+ - `vector` (array) [✗]: The computed embedding vector
295
396
 
397
+ - `modelName` (string) [✗]:
296
398
 
399
+ - `dimension` (integer) [✗]: Length of the vector (e.g., 512)
297
400
 
298
- ### marketplace-analytics-sync-request
299
401
 
300
- **Description:** Syncs analytics data from marketplace API for one or more listings. Fetches views, favorites, sales, revenue, and traffic source data. Can sync: specific listings, all user listings, or shop-level analytics. Works with any marketplace provider that supports analytics (etsy, ebay, etc.).
301
402
 
302
- **Method:** `client.marketplaceAnalyticsSyncRequest(data)`
403
+ ### file-vectorize-request
303
404
 
304
- **Payload Type:** `MarketplaceAnalyticsSyncRequestMessage`
405
+ **Description:** Request to generate a vector embedding for an image file using CLIP.
305
406
 
306
- **Fields:**
407
+ **Method:** `client.fileVectorizeRequest(data)`
307
408
 
308
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
409
+ **Payload Type:** `FileVectorizeRequestMessage`
309
410
 
310
- - `marketplaceConnectionId` (string) [✗]: UUID of the marketplace connection configuration
411
+ **Fields:**
311
412
 
312
- - `listingIds` (array) [✗]: Internal listing UUIDs to sync. Empty array = sync all for user.
413
+ - `fileId` (string) [✗]: The ID of the file in the database
313
414
 
314
- - `userId` (string) [✗]: UUID of user whose listings to sync (if listingIds empty)
415
+ - `storageItem` () [✗]: Location of the image file
315
416
 
316
- - `externalShopId` (string) [✗]: External marketplace shop ID for shop-level analytics
417
+ - `modelName` (string) [✗]: Optional: Specific model version to use
317
418
 
318
- - `timeRange` (object) [✗]: Date range for historical analytics
319
419
 
320
- - `syncOptions` (object) [✗]: Optional sync configuration
321
420
 
322
- - `marketplaceCredentials` (object) [✗]: Encrypted marketplace credentials (retrieved from marketplaceConnectionId)
421
+ ### ip-check-completed
323
422
 
324
- - `webhookUrl` (string) [✗]: Callback URL for completion notification
423
+ **Description:** Contains IP verification results including trademark risk, copyright risk, detected brands/franchises, and analysis confidence scores
325
424
 
425
+ **Method:** `client.ipCheckCompleted(data)`
326
426
 
427
+ **Payload Type:** `IpCheckCompletedMessage`
327
428
 
328
- ### marketplace-publish-listing-completed
429
+ **Fields:**
329
430
 
330
- **Description:** Indicates completion of marketplace listing publication. Contains external listing ID and URL, or error details if failed. Works with any marketplace provider (etsy, ebay, etc.).
431
+ - `modelId` (string) [✗]: Model UUID that was analyzed
331
432
 
332
- **Method:** `client.marketplacePublishListingCompleted(data)`
433
+ - `ownerId` (string) [✗]: Owner user ID
333
434
 
334
- **Payload Type:** `MarketplacePublishListingCompletedMessage`
435
+ - `entityType` (string) [✗]: Type of entity checked: 'model' or 'metamodel'
335
436
 
336
- **Fields:**
437
+ - `status` (string) [✗]: Overall IP check outcome: 'clear', 'flagged', or 'error'
337
438
 
338
- - `originalJobId` (string) [✗]: BullMQ job ID from original request
439
+ - `trademarkRisk` (string) [✗]: Detected trademark infringement risk level: 'none', 'low', 'medium', 'high'
339
440
 
340
- - `listingId` (string) [✗]: Internal marketplace_items UUID
441
+ - `copyrightRisk` (string) [✗]: Detected copyright infringement risk level: 'none', 'low', 'medium', 'high'
341
442
 
342
- - `metamodelId` (string) [✗]: UUID of the metamodel that was published
443
+ - `matchedBrands` (array) [✗]: Brand names detected in model name or content
343
444
 
344
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
445
+ - `matchedFranchises` (array) [✗]: Franchise/character names detected
345
446
 
346
- - `materialName` (string) [✗]: Material variant name
447
+ - `similarModelsCount` (integer) [✗]: Number of visually similar models found
347
448
 
348
- - `status` (string) [✗]: Publication result (SUCCESS or FAILED)
449
+ - `confidence` (number) [✗]: Overall confidence score for the analysis (0.0-1.0)
349
450
 
350
- - `externalListingId` (string) [✗]: External marketplace listing ID (only if status=SUCCESS)
451
+ - `riskScorePercent` (integer) [✗]: Risk score as 0-100 integer (FR-024: >70 HIGH, 40-70 MEDIUM, <40 LOW)
351
452
 
352
- - `externalListingUrl` (string) [✗]: URL to view listing on marketplace (only if status=SUCCESS)
453
+ - `riskLevel` (string) [✗]: Overall risk level: 'none', 'low', 'medium', 'high'
353
454
 
354
- - `externalFileId` (string) [✗]: External marketplace file ID (only if status=SUCCESS)
455
+ - `recommendation` (string) [✗]: Recommended action: 'block' (HIGH risk), 'warn' (MEDIUM risk), 'allow' (LOW/NONE risk)
355
456
 
356
- - `error` (object) [✗]: Error details (only if status=FAILED)
457
+ - `suggestedChanges` (object) [✗]: Suggested modifications to reduce IP risk
357
458
 
358
- - `publishedAt` (string) [✗]: When the listing was created (ISO 8601, only if status=SUCCESS)
459
+ - `heuristicResults` (object) [✗]: Detailed results from each heuristic check
359
460
 
360
- - `processingDuration` (integer) [✗]: Processing time in milliseconds
461
+ - `error` (object) [✗]: Error details if status is 'error'
361
462
 
463
+ - `processingDurationMs` (integer) [✗]: Total processing time in milliseconds
362
464
 
363
465
 
364
- ### marketplace-publish-listing-request
365
466
 
366
- **Description:** Publishes a single metamodel listing to a marketplace for a specific material variant. Creates listing, uploads digital file, and returns external listing ID. This message is enqueued for EACH material variant when publishing a metamodel. The marketplace type (etsy, ebay, etc.) is determined by the marketplaceProvider field.
467
+ ### ip-check-request
367
468
 
368
- **Method:** `client.marketplacePublishListingRequest(data)`
469
+ **Description:** Triggers intellectual property verification analysis for a model thumbnail, detecting potential trademark and copyright issues using perceptual hashing, text analysis, and optional reverse image search.
369
470
 
370
- **Payload Type:** `MarketplacePublishListingRequestMessage`
471
+ **Method:** `client.ipCheckRequest(data)`
472
+
473
+ **Payload Type:** `IpCheckRequestMessage`
371
474
 
372
475
  **Fields:**
373
476
 
374
- - `listingId` (string) [✗]: Internal marketplace_items table UUID
477
+ - `modelId` (string) [✗]: Unique identifier for the model to analyze
375
478
 
376
- - `metamodelId` (string) [✗]: UUID of the metamodel being published
479
+ - `ownerId` (string) [✗]: User ID who owns the model
377
480
 
378
- - `ownerId` (string) [✗]: UUID of the user who owns the metamodel
481
+ - `entityType` (string) [✗]: Type of entity being checked: 'model' or 'metamodel'
379
482
 
380
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, leboncoin, etc.)
483
+ - `modelName` (string) [✗]: Name of the model for trademark/franchise text detection
381
484
 
382
- - `marketplaceConnectionId` (string) [✗]: UUID of the marketplace connection configuration
485
+ - `tags` (array) [✗]: Model tags for IP reference detection
383
486
 
384
- - `materialVariant` (object) [✗]: Material-specific listing configuration
487
+ - `description` (string) [✗]: Model description for text-based IP analysis
385
488
 
386
- - `baseListingData` (object) [✗]: Common listing information shared across variants
489
+ - `thumbnailUrl` (string) [✗]: URL to fetch the thumbnail image for visual analysis
387
490
 
388
- - `publishOptions` (object) [✗]: Publishing configuration (marketplace-specific options)
491
+ - `minioPath` (string) [✗]: Path to thumbnail in MinIO if stored internally
389
492
 
390
- - `marketplaceCredentials` (object) [✗]: Encrypted marketplace credentials (retrieved from marketplaceConnectionId)
493
+ - `additionalImageUrls` (array) [✗]: Optional additional images for more comprehensive analysis (e.g., 360° views)
391
494
 
392
- - `fileMetadata` (object) [✗]: Digital file to upload
495
+ - `analysisOptions` (object) [✗]: Optional analysis configuration
393
496
 
394
- - `webhookUrl` (string) [✗]: Callback URL for completion notification
395
497
 
396
498
 
499
+ ### marketplace-connection-sync-completed
397
500
 
398
- ### media-batch-download-completed
501
+ **Description:** Notification that marketplace connection sync has completed. Contains updated connection metadata, profile information, and sync statistics.
399
502
 
400
- **Description:** Notifies that a batch media download has been completed.
401
503
 
402
- **Method:** `client.mediaBatchDownloadCompleted(data)`
504
+ **Method:** `client.marketplaceConnectionSyncCompleted(data)`
403
505
 
404
- **Payload Type:** `MediaBatchDownloadCompletedMessage`
506
+ **Payload Type:** `MarketplaceConnectionSyncCompletedMessage`
405
507
 
406
508
  **Fields:**
407
509
 
408
- - `batchId` (string) []: The unique identifier for the batch download operation.
409
-
410
- - `status` (string) [✓]: The final status of the batch download operation.
411
-
412
- - `processedFiles` (array) [✗]: List of successfully processed files.
413
-
414
- - `failedFiles` (array) [✗]: List of files that failed to process.
415
-
416
- - `processedAt` (string) [✓]: Timestamp when the batch processing completed.
510
+ - `requestId` (string) []: Original request ID for correlation
417
511
 
418
- - `statistics` (object) [✗]: Statistics about the batch processing.
512
+ - `connectionId` (string) [✗]: Marketplace connection that was synced
419
513
 
514
+ - `marketplaceId` (string) [✗]: Marketplace provider ID
420
515
 
516
+ - `userId` (string) [✗]: Connection owner user ID
421
517
 
422
- ### media-batch-download-request
518
+ - `status` (string) [✗]: Overall sync result status
423
519
 
424
- **Description:** Request to download and process a batch of media files from a storage provider. Images are compressed and resized to specified dimensions, converted to WebP format. Text files and documents are processed and stored with metadata. All processed files are uploaded to MinIO S3 storage under the media/{batchId}/ prefix.
520
+ - `syncType` (string) [✗]: Type of sync that was performed
425
521
 
522
+ - `connectionData` (object) [✗]: Updated connection information
426
523
 
427
- **Method:** `client.mediaBatchDownloadRequest(data)`
524
+ - `categories` (array) [✗]: Available marketplace categories
428
525
 
429
- **Payload Type:** `MediaBatchDownloadRequestMessage`
526
+ - `statistics` (object) [✗]: Sync operation statistics
430
527
 
431
- **Fields:**
528
+ - `completedAt` (string) [✗]: When sync completed
432
529
 
433
- - `batchId` (string) [✗]: Unique identifier for this batch of media files. Used for organizing processed files in S3 storage (media/{batchId}/) and correlating with completion responses.
530
+ - `error` (object) [✗]: Error details if sync failed
434
531
 
435
532
 
436
- - `storageConnectionId` (string) [✗]: UUID of the StorageConnection entity from which to download the media files. Used to authenticate and access the source storage provider.
437
533
 
534
+ ### marketplace-connection-sync-request
438
535
 
439
- - `mediaFiles` (array) [✗]: Array of media files to download and process. Must contain at least one file. Each file includes metadata for identification and processing.
536
+ **Description:** Requests synchronization of marketplace connection data including: - Profile information and shop details - Account status and permissions - Available categories and shipping profiles - Rate limits and API quotas
537
+ This is typically triggered after initial connection or periodically to keep marketplace metadata up to date.
440
538
 
441
539
 
442
- - `compressionSettings` (object) [✗]: Optional compression settings that override deployment environment defaults. If not provided, uses values from MAX_IMAGE_WIDTH, MAX_IMAGE_HEIGHT, IMAGE_QUALITY, and OUTPUT_FORMAT environment variables.
540
+ **Method:** `client.marketplaceConnectionSyncRequest(data)`
443
541
 
542
+ **Payload Type:** `MarketplaceConnectionSyncRequestMessage`
444
543
 
544
+ **Fields:**
445
545
 
546
+ - `connectionId` (string) [✗]: Internal marketplace connection ID
446
547
 
447
- ### metamodel-metadata-generation-completed
548
+ - `marketplaceId` (string) [✗]: Marketplace provider ID (etsy, ebay, etc.)
448
549
 
449
- **Description:** Handles metamodel metadata generation completion. Contains AI-generated metadata and aggregated technical analysis.
550
+ - `userId` (string) [✗]: User who owns this connection
450
551
 
451
- **Method:** `client.metamodelMetadataGenerationCompleted(data)`
552
+ - `syncType` (string) [✗]: Type of sync to perform
452
553
 
453
- **Payload Type:** `MetamodelMetadataGenerationCompletedMessage`
554
+ - `priority` (string) [✗]: Processing priority
454
555
 
455
- **Fields:**
556
+ - `requestId` (string) [✗]: Unique request identifier for tracking
456
557
 
457
- - `metamodelId` (string) []: The unique identifier for the metamodel
558
+ - `webhookUrl` (string) []: Webhook URL to call when sync completes
458
559
 
459
- - `metadata` (object) []: AI-generated metadata for the metamodel
560
+ - `metadata` (object) []: Additional context data
460
561
 
461
- - `technicalMetadata` (object) [✓]: Aggregated technical analysis from constituent models
462
562
 
463
563
 
564
+ ### marketplace-credential-rotation-completed
464
565
 
465
- ### metamodel-metadata-generation-request
566
+ **Description:** Notification that marketplace credential rotation has completed. Contains the rotation results, new credential metadata, and any issues encountered.
466
567
 
467
- **Description:** Handles metamodel metadata generation requests via Ollama. Aggregates data from constituent models and generates AI-enhanced metadata.
468
568
 
469
- **Method:** `client.metamodelMetadataGenerationRequest(data)`
569
+ **Method:** `client.marketplaceCredentialRotationCompleted(data)`
470
570
 
471
- **Payload Type:** `MetamodelMetadataGenerationRequestMessage`
571
+ **Payload Type:** `MarketplaceCredentialRotationCompletedMessage`
472
572
 
473
573
  **Fields:**
474
574
 
475
- - `metamodelId` (string) [✗]: The unique identifier for the metamodel
575
+ - `requestId` (string) [✗]: Original rotation request ID
476
576
 
477
- - `constituentModelIds` (array) [✗]: Array of model IDs that compose this metamodel
577
+ - `connectionId` (string) [✗]: Marketplace connection that was rotated
478
578
 
479
- - `name` (string) [✗]: The name of the metamodel
579
+ - `marketplaceId` (string) [✗]: Marketplace provider ID
480
580
 
481
- - `ownerId` (string) [✗]: The owner's user ID
581
+ - `userId` (string) [✗]: Connection owner user ID
482
582
 
483
- - `libraryId` (string) [✗]: The library containing this metamodel
583
+ - `status` (string) [✗]: Overall rotation operation status
484
584
 
485
- - `constituentModels` (array) [✗]: Enriched metadata for constituent models (includes storage items)
585
+ - `rotationType` (string) [✗]: Type of rotation that was performed
486
586
 
487
- - `webhookUrl` (string) [✗]: Optional webhook URL for async completion notification
587
+ - `reason` (string) [✗]: Original reason for rotation
488
588
 
589
+ - `newCredentials` (object) [✗]: Metadata about new credentials
489
590
 
591
+ - `oldCredentials` (object) [✗]: Status of previous credentials
490
592
 
491
- ### model-discovery-folder-processed-event
593
+ - `operationDetails` (object) [✗]: Details of the rotation operation
492
594
 
493
- **Description:** Handles model discovery folder processed events.
595
+ - `connectionStatus` (object) [✗]: Connection status after credential rotation
494
596
 
495
- **Method:** `client.modelDiscoveryFolderProcessedEvent(data)`
597
+ - `nextRotation` (object) [✗]: Information about next scheduled rotation
496
598
 
497
- **Payload Type:** `ModelDiscoveryFolderProcessedEventMessage`
599
+ - `error` (object) [✗]: Error details if rotation failed
498
600
 
499
- **Fields:**
601
+ - `notifications` (array) [✗]: Notifications sent as part of rotation
500
602
 
501
- - `connectionId` (string) [✗]: The unique identifier for the connection.
502
603
 
503
- - `folderPath` (string) [✗]: The path to the processed folder.
504
604
 
505
- - `discoveredFiles` (array) [✗]: A list of files discovered in the folder.
605
+ ### marketplace-credential-rotation-request
506
606
 
507
- - `folderSignature` (object) [✗]: A signature representing the state of the folder.
607
+ **Description:** Requests rotation/refresh of marketplace connection credentials. This is used for: - OAuth token refresh when tokens are near expiry - API key rotation for enhanced security - Re-authentication after connection errors - Scheduled credential updates
508
608
 
509
- - `processedAt` (string) [✗]: The timestamp when the folder was processed.
510
609
 
511
- - `statistics` (object) [✗]: Statistics about the processed folder.
610
+ **Method:** `client.marketplaceCredentialRotationRequest(data)`
512
611
 
612
+ **Payload Type:** `MarketplaceCredentialRotationRequestMessage`
513
613
 
614
+ **Fields:**
514
615
 
515
- ### model-discovery-scan-found-event
616
+ - `connectionId` (string) [✗]: Marketplace connection ID requiring credential rotation
516
617
 
517
- **Description:** Handles model discovery scan found events.
618
+ - `marketplaceId` (string) [✗]: Marketplace provider ID (etsy, ebay, etc.)
518
619
 
519
- **Method:** `client.modelDiscoveryScanFoundEvent(data)`
620
+ - `userId` (string) [✗]: User who owns the connection
520
621
 
521
- **Payload Type:** `ModelDiscoveryScanFoundEventMessage`
622
+ - `rotationType` (string) [✗]: Type of credential rotation to perform
522
623
 
523
- **Fields:**
624
+ - `reason` (string) [✗]: Reason for credential rotation
524
625
 
525
- - `modelId` (string) [✗]: The unique identifier for the model.
626
+ - `urgency` (string) [✗]: How urgently the rotation is needed
526
627
 
527
- - `name` (string) [✗]: The name of the model.
628
+ - `currentCredentials` (object) [✗]: Current credential metadata (no actual secrets)
528
629
 
529
- - `fileName` (string) [✗]: The name of the model file.
630
+ - `options` (object) [✗]: Rotation configuration options
530
631
 
531
- - `description` (string) [✗]: A description of the model.
632
+ - `requestId` (string) [✗]: Unique request identifier
532
633
 
533
- - `fileTypes` (array) [✗]: An array of file types associated with the model.
634
+ - `webhookUrl` (string) [✗]: Webhook URL for completion notification
534
635
 
535
- - `size` (number) [✗]: The size of the model file in bytes.
636
+ - `scheduledAt` (string) [✗]: When this rotation was scheduled (if scheduled)
536
637
 
537
- - `storageLocation` (object) [✗]: The storage location of the model.
638
+ - `metadata` (object) [✗]: Additional request context
538
639
 
539
- - `providerType` (string) [✗]: The type of the storage provider.
540
640
 
541
- - `metadata` (object) [✗]: A flexible object for additional metadata.
542
641
 
642
+ ### marketplace-intelligence-completed
543
643
 
644
+ **Description:** Response from marketplace intelligence scraping.
645
+ Contains aggregated similarity data from marketplace searches.
544
646
 
545
- ### model-discovery-scan-progress-event
647
+ Consumed by worker-backend to update pipeline context before
648
+ sellability analysis runs.
546
649
 
547
- **Description:** Handles model discovery scan progress events.
548
650
 
549
- **Method:** `client.modelDiscoveryScanProgressEvent(data)`
651
+ **Method:** `client.marketplaceIntelligenceCompleted(data)`
550
652
 
551
- **Payload Type:** `ModelDiscoveryScanProgressEventMessage`
653
+ **Payload Type:** `MarketplaceIntelligenceCompletedMessage`
552
654
 
553
655
  **Fields:**
554
656
 
555
- - `payload` (object) []: Contains the discovery scan progress details.
657
+ - `modelId` (string) []: UUID of the model that was researched
556
658
 
659
+ - `ownerId` (string) [✓]: UUID of the model owner
557
660
 
661
+ - `status` (string) [✓]: Result status
558
662
 
559
- ### model-discovery-scan-request
663
+ - `marketData` (object) [✗]: Aggregated market intelligence across all scraped marketplaces
560
664
 
561
- **Description:** Handles model discovery scan requests events.
665
+ - `marketplaceBreakdown` (array) [✗]: Results per marketplace
562
666
 
563
- **Method:** `client.modelDiscoveryScanRequest(data)`
667
+ - `similarityScore` (number) [✗]: How saturated the market is for this model type (0=unique, 100=very common)
564
668
 
565
- **Payload Type:** `ModelDiscoveryScanRequestMessage`
669
+ - `error` (object) [✗]: Error information if status is FAILED
566
670
 
567
- **Fields:**
671
+ - `analyzedAt` (string) [✗]: When the analysis completed
568
672
 
569
- - `libraryId` (string) [✗]: The ID of the library to scan.
673
+ - `analysisVersion` (string) [✗]: Version of the intelligence collector
570
674
 
571
- - `storageConnectionId` (string) [✗]: The ID of the storage connection to scan.
572
675
 
573
- - `providerType` (string) [✗]: The type of the storage provider.
574
676
 
575
- - `path` (string) [✗]: The specific path within the storage connection to scan for this library.
677
+ ### marketplace-intelligence-event
576
678
 
679
+ **Description:** Public marketplace intelligence data scraped from external marketplaces.
577
680
 
681
+ This event contains:
682
+ - Listing details (title, price, images)
683
+ - Engagement metrics (views, favorites, reviews)
684
+ - Shop information
685
+ - Market positioning data
578
686
 
579
- ### model-metadata-generation-completed
687
+ Unlike marketplace-listing-sync-request (private user data), this focuses on:
688
+ - Broad market trends and pricing analysis
689
+ - Competitive intelligence and demand signals
690
+ - Product popularity and sentiment
580
691
 
581
- **Description:** Handles model metadata generation completed.
692
+ Consumed by worker-analytic-collector for Elasticsearch indexing.
693
+ Used for market research, pricing optimization, and trend detection.
582
694
 
583
- **Method:** `client.modelMetadataGenerationCompleted(data)`
584
695
 
585
- **Payload Type:** `ModelMetadataGenerationCompletedMessage`
696
+ **Method:** `client.marketplaceIntelligenceEvent(data)`
586
697
 
587
- **Fields:**
698
+ **Payload Type:** `MarketplaceIntelligenceEventMessage`
588
699
 
589
- - `modelId` (string) [✓]: The unique identifier for the model.
700
+ **Fields:**
590
701
 
591
- - `metadata` (object) [✓]: The enriched metadata for the model.
702
+ - `marketplace` (string) [✓]: Source marketplace
592
703
 
704
+ - `externalId` (string) [✓]: Marketplace-native listing ID
593
705
 
706
+ - `listing` (object) [✓]: Core listing information
594
707
 
595
- ### model-metadata-generation-request
708
+ - `metrics` (object) [✗]: Public engagement and sales metrics
596
709
 
597
- **Description:** Handles model metadata generation requests.
710
+ - `metadata` (object) [✗]: Additional listing context and categorization
598
711
 
599
- **Method:** `client.modelMetadataGenerationRequest(data)`
712
+ - `queryContext` (object) [✗]: Search context that found this listing
600
713
 
601
- **Payload Type:** `ModelMetadataGenerationRequestMessage`
714
+ - `collectedAt` (string) [✓]: ISO 8601 timestamp when data was scraped
602
715
 
603
- **Fields:**
716
+ - `collectorVersion` (string) [✗]: Version of collector that scraped this data
604
717
 
605
- - `modelId` (string) [✗]: The unique identifier for the model.
718
+ - `scrapingMethod` (string) [✗]: Method used for scraping
606
719
 
607
- - `storageConnectionId` (string) [✗]: The ID of the storage connection.
608
720
 
609
- - `filePath` (string) [✗]: The path to the model file.
610
721
 
611
- - `fileName` (string) [✗]: The name of the model file.
722
+ ### marketplace-intelligence-request
612
723
 
613
- - `fileSize` (number) [✗]: The size of the model file in bytes.
724
+ **Description:** Triggers automated marketplace scraping to find similar/competing listings
725
+ for a given model. This is a pipeline stage that runs after metadata generation
726
+ to inform sellability analysis with real market data.
614
727
 
615
- - `fileLastModified` (string) [✗]: The last modified date of the model file.
728
+ The worker-analytic-collector (or marketplace-connectors worker) will:
729
+ 1. Use model metadata (title, tags, category) to build search queries
730
+ 2. Scrape connected marketplaces (Etsy, eBay, etc.) for similar listings
731
+ 3. Emit marketplace-intelligence-event results for Elasticsearch indexing
732
+ 4. Return aggregated similarity data to the pipeline context
616
733
 
617
- - `storageProviderType` (string) [✗]: The type of the storage provider.
734
+ Pipeline integration:
735
+ - Triggered after: metadata-generation (needs model title/tags/category)
736
+ - Results feed into: sellability-analysis (market positioning data)
618
737
 
619
- - `modelThumbnailUrl` (string) [✗]: The URL of the model thumbnail.
620
738
 
621
- - `metamodel` (object) [✗]: The metamodel of the model.
739
+ **Method:** `client.marketplaceIntelligenceRequest(data)`
622
740
 
741
+ **Payload Type:** `MarketplaceIntelligenceRequestMessage`
623
742
 
743
+ **Fields:**
624
744
 
625
- ### model-metamodel-detection-found
745
+ - `modelId` (string) [✓]: UUID of the model to research
626
746
 
627
- **Description:** Handles model metamodel detection found with hierarchical relationships.
747
+ - `ownerId` (string) [✓]: UUID of the model owner
628
748
 
629
- **Method:** `client.modelMetamodelDetectionFound(data)`
749
+ - `searchContext` (object) [✗]: Model metadata used to build marketplace search queries
630
750
 
631
- **Payload Type:** `ModelMetamodelDetectionFoundMessage`
751
+ - `scrapingOptions` (object) [✗]: Configuration for the marketplace scraping
632
752
 
633
- **Fields:**
753
+ - `pipelineId` (string) [✗]: Pipeline execution ID for correlation
634
754
 
635
- - `metamodels` (array) []: List of metamodel nodes in hierarchical structure (roots and children).
755
+ - `executionId` (string) []: Pipeline execution UUID for correlation
636
756
 
637
757
 
638
758
 
639
- ### model-metamodel-detection-request
759
+ ### marketplace-listing-description-generation-completed
640
760
 
641
- **Description:** Handles model metamodel detection requests.
761
+ **Description:** Notifies backend that marketplace description generation completed. Contains generated description with metadata tracking (AI model, confidence, generation timestamp) and suggested price.
642
762
 
643
- **Method:** `client.modelMetamodelDetectionRequest(data)`
763
+ **Method:** `client.marketplaceListingDescriptionGenerationCompleted(data)`
644
764
 
645
- **Payload Type:** `ModelMetamodelDetectionRequestMessage`
765
+ **Payload Type:** `MarketplaceListingDescriptionGenerationCompletedMessage`
646
766
 
647
767
  **Fields:**
648
768
 
649
- - `connectionId` (string) [✓]: The unique identifier for the storage connection.
769
+ - `modelId` (string) [✓]: UUID of the model that was processed
650
770
 
651
- - `folderPath` (string) [✓]: The path to the folder that was processed.
771
+ - `entityType` (string) [✓]: Type of entity processed
652
772
 
653
- - `discoveredFiles` (array) []: A list of files discovered in the folder.
773
+ - `targetMarketplace` (string) []: Target marketplace ID (e.g., 'etsy', 'ebay')
654
774
 
655
- - `folderSignature` (object) [✓]: A signature representing the state of the folder.
775
+ - `description` (string) [✓]: SEO-optimized marketplace description (3-5 sentences)
656
776
 
657
- - `processedAt` (string) [✓]: The timestamp when the folder was processed.
777
+ - `metadata` (object) [✓]: Content generation metadata for tracking
658
778
 
659
- - `statistics` (object) []: Statistics about the processed folder.
779
+ - `suggestedPrice` (object) []: Volume-based price calculation for 3D printed item
660
780
 
781
+ - `error` (string) [✗]: Error message if generation failed
661
782
 
662
783
 
663
- ### model-sellability-analysis-completed
664
784
 
665
- **Description:** Contains sellability analysis results including Etsy-specific recommendations, material pricing, and marketplace compatibility scores
785
+ ### marketplace-listing-description-generation-request
666
786
 
667
- **Method:** `client.modelSellabilityAnalysisCompleted(data)`
787
+ **Description:** Generates SEO-optimized marketplace description for a 3D model using LLM vision analysis. Worker receives model data, technical metadata, and thumbnail URLs to generate compelling product descriptions tailored to the target marketplace.
668
788
 
669
- **Payload Type:** `ModelSellabilityAnalysisCompletedMessage`
789
+ **Method:** `client.marketplaceListingDescriptionGenerationRequest(data)`
790
+
791
+ **Payload Type:** `MarketplaceListingDescriptionGenerationRequestMessage`
670
792
 
671
793
  **Fields:**
672
794
 
673
- - `metamodelId` (string) []: Metamodel UUID
795
+ - `modelId` (string) []: UUID of the model (reference only)
674
796
 
675
- - `ownerId` (string) []: Owner user ID
797
+ - `entityType` (string) []: Type of entity being processed
676
798
 
677
- - `sellabilityScore` (number) []: Overall sellability score (0-100)
799
+ - `entityName` (string) []: Name/title of the model or metamodel
678
800
 
679
- - `pricingRecommendations` (object) []: Pricing analysis and recommendations with material-specific pricing (v2.0.0)
801
+ - `targetMarketplace` (string) []: Target marketplace ID (e.g., 'etsy', 'ebay', 'thingiverse')
680
802
 
681
- - `marketplaceRecommendations` (array) []: Recommended marketplaces with Etsy-specific scoring (v2.0.0)
803
+ - `userId` (string) []: UUID of the user requesting generation
682
804
 
683
- - `demandAnalysis` (object) [✗]: Market demand insights
805
+ - `webhookUrl` (string) [✗]: Callback URL for completion notification
684
806
 
685
- - `qualityFactors` (object) [✗]: Quality-related factors affecting sellability
807
+ - `technicalMetadata` (object) [✗]: Technical analysis data for context
686
808
 
687
- - `recommendations` (array) [✗]: Actionable recommendations to improve sellability
809
+ - `thumbnailUrls` (array) [✗]: URLs to 360-degree thumbnail views
688
810
 
689
- - `analyzedAt` (string) [✗]: Analysis completion timestamp (ISO 8601)
811
+ - `existingTags` (array) [✗]: Currently assigned tags for context
690
812
 
691
- - `analysisVersion` (string) [✗]: Analysis algorithm version
813
+ - `existingCategory` (string) [✗]: Current classification for context
692
814
 
693
- - `error` (object) [✗]: Error information if analysis failed
815
+ - `brandVoice` (string) [✗]: Desired tone/voice for the listing (e.g., 'professional', 'playful')
694
816
 
817
+ - `targetMarket` (string) [✗]: Target geographic market (e.g., 'US', 'EU')
695
818
 
819
+ - `keywords` (array) [✗]: Specific keywords to include
696
820
 
697
- ### model-sellability-analysis-request
698
821
 
699
- **Description:** Analyzes a metamodel to determine sellability score, pricing recommendations, and optimal marketplace selection. Enhanced with Etsy-specific analysis including competitor pricing, category demand trends, and material suitability.
700
822
 
701
- **Method:** `client.modelSellabilityAnalysisRequest(data)`
823
+ ### marketplace-listing-sync-completed
702
824
 
703
- **Payload Type:** `ModelSellabilityAnalysisRequestMessage`
825
+ **Description:** Notification that marketplace listing sync operation has completed. Contains detailed results of the sync including created/updated listings, errors encountered, and performance statistics.
704
826
 
705
- **Fields:**
706
827
 
707
- - `metamodelId` (string) [✗]: UUID of the metamodel to analyze. Worker will fetch all model metadata, technical metadata, enriched metadata, and child models from PostgreSQL.
828
+ **Method:** `client.marketplaceListingSyncCompleted(data)`
708
829
 
709
- - `ownerId` (string) [✗]: UUID of the user who owns the metamodel
830
+ **Payload Type:** `MarketplaceListingSyncCompletedMessage`
710
831
 
711
- - `analysisOptions` (object) [✗]: Optional analysis configuration
832
+ **Fields:**
712
833
 
834
+ - `requestId` (string) [✗]: Original request ID for correlation
713
835
 
836
+ - `connectionId` (string) [✗]: Marketplace connection that was synced
714
837
 
715
- ### model-technical-metadata-completed
838
+ - `marketplaceId` (string) [✗]: Marketplace provider ID
716
839
 
717
- **Description:** Reports comprehensive results of technical metadata analysis including geometry, quality metrics, and print-readiness assessment
840
+ - `userId` (string) [✗]: Connection owner user ID
718
841
 
719
- **Method:** `client.modelTechnicalMetadataCompleted(data)`
842
+ - `status` (string) [✗]: Overall sync operation status
720
843
 
721
- **Payload Type:** `ModelTechnicalMetadataCompletedMessage`
844
+ - `syncDirection` (string) [✗]: Direction of sync that was performed
722
845
 
723
- **Fields:**
846
+ - `statistics` (object) [✗]: Detailed sync operation statistics
724
847
 
725
- - `originalJobId` (string) [✗]: ID of the original analysis request job
848
+ - `results` (object) [✗]: Detailed sync results by operation
726
849
 
727
- - `modelId` (string) [✗]: ID of the analyzed model
850
+ - `successfulListings` (array) [✗]: Details of successfully processed listings
728
851
 
729
- - `status` (string) [✗]: Analysis completion status
852
+ - `failedListings` (array) [✗]: Details of listings that failed to sync
730
853
 
731
- - `vertices` (integer) [✗]: Number of vertices in the mesh
854
+ - `errors` (array) [✗]: Non-listing-specific errors encountered
732
855
 
733
- - `faces` (integer) [✗]: Number of faces/polygons in the mesh
856
+ - `completedAt` (string) [✗]: When sync operation completed
734
857
 
735
- - `edges` (integer) [✗]: Number of edges in the mesh
858
+ - `nextSyncRecommendedAt` (string) [✗]: When next sync is recommended
736
859
 
737
- - `detailLevel` (string) [✗]: Visual detail level based on polygon density
738
860
 
739
- - `boundingBox` (object) [✗]: 3D bounding box dimensions in millimeters
740
861
 
741
- - `volumeCubicMm` (number) [✗]: Model volume in cubic millimeters (for material calculation)
862
+ ### marketplace-listing-sync-request
742
863
 
743
- - `surfaceAreaSqMm` (number) [✗]: Total surface area in square millimeters
864
+ **Description:** Requests synchronization of marketplace listings for a connection. Can sync specific listings or all listings for a marketplace connection.
865
+ Includes bidirectional sync: - Pull: Fetch listings from marketplace to update local database - Push: Update marketplace listings with local changes - Full: Both pull and push operations
744
866
 
745
- - `minWallThickness` (number) [✗]: Minimum wall thickness detected in millimeters (critical for printability)
746
867
 
747
- - `maxWallThickness` (number) [✗]: Maximum wall thickness detected in millimeters
868
+ **Method:** `client.marketplaceListingSyncRequest(data)`
748
869
 
749
- - `manifold` (boolean) [✗]: Is the mesh watertight/manifold? Critical for 3D printing (true = printable)
870
+ **Payload Type:** `MarketplaceListingSyncRequestMessage`
750
871
 
751
- - `nonManifoldEdges` (integer) [✗]: Number of non-manifold edges (repair needed if > 0)
872
+ **Fields:**
752
873
 
753
- - `holes` (integer) [✗]: Number of holes/boundary loops in the mesh (0 = closed mesh)
874
+ - `connectionId` (string) [✗]: Marketplace connection ID
754
875
 
755
- - `flippedNormals` (integer) [✗]: Number of faces with inverted normals (causes rendering/slicing issues)
876
+ - `marketplaceId` (string) [✗]: Marketplace provider ID (etsy, ebay, etc.)
756
877
 
757
- - `selfIntersections` (integer) [✗]: Number of self-intersecting faces (0 = clean geometry)
878
+ - `userId` (string) [✗]: User who owns the connection
758
879
 
759
- - `qualityScore` (number) [✗]: Overall quality score 0-100 (100 = perfect for printing, <60 needs repair)
880
+ - `syncDirection` (string) [✗]: Direction of sync operation
760
881
 
761
- - `printabilityScore` (number) [✗]: Printability score 0-100 (considers supports, orientation, size constraints)
882
+ - `syncScope` (string) [✗]: Scope of listings to sync
762
883
 
763
- - `requiresSupports` (boolean) [✗]: Does this model require support structures for 3D printing?
884
+ - `listingIds` (array) [✗]: Specific listing IDs to sync (if syncScope=specific)
764
885
 
765
- - `overhangs` (array) [✗]: Detected overhang areas requiring support structures
886
+ - `externalListingIds` (array) [✗]: External marketplace listing IDs to sync
766
887
 
767
- - `estimatedPrintTimeMinutes` (integer) [✗]: Estimated print time in minutes using normal quality settings (0.2mm layers, 20% infill)
888
+ - `options` (object) [✗]: Sync configuration options
768
889
 
769
- - `printTimeEstimates` (object) [✗]: Print time estimates for different quality presets
890
+ - `priority` (string) [✗]: Processing priority
770
891
 
771
- - `estimatedMaterialGrams` (number) [✗]: Estimated material usage in grams using 20% infill (assumes PLA density 1.24g/cm³)
892
+ - `requestId` (string) [✗]: Unique request identifier
772
893
 
773
- - `materialEstimates` (object) [✗]: Material usage estimates for different infill percentages
894
+ - `webhookUrl` (string) [✗]: Webhook URL for completion notification
774
895
 
775
- - `recommendedOrientation` (object) [✗]: Recommended print orientation for minimal support material and best results
896
+ - `metadata` (object) [✗]: Additional request context
776
897
 
777
- - `originalUnit` (string) [✗]: Original file format unit detected from metadata or inferred from scale
778
898
 
779
- - `formatVersion` (string) [✗]: File format version (e.g., 'STL Binary', 'OBJ v4', 'PLY 1.0')
780
899
 
781
- - `hasColorData` (boolean) [✗]: Does the file contain per-vertex color information?
900
+ ### marketplace-listing-tags-generation-completed
782
901
 
783
- - `hasTextureCoordinates` (boolean) [✗]: Does the file contain UV texture mapping coordinates?
902
+ **Description:** Notifies backend that marketplace tags generation completed. Contains generated tags optimized for discoverability with metadata tracking.
784
903
 
785
- - `hasVertexNormals` (boolean) [✗]: Does the file contain per-vertex normal vectors?
904
+ **Method:** `client.marketplaceListingTagsGenerationCompleted(data)`
786
905
 
787
- - `analyzedBy` (string) [✗]: Tool/service that performed the analysis
906
+ **Payload Type:** `MarketplaceListingTagsGenerationCompletedMessage`
788
907
 
789
- - `analysisVersion` (string) [✗]: Version of the analysis algorithm (for tracking improvements)
908
+ **Fields:**
790
909
 
791
- - `analysisConfidence` (number) []: Confidence level of analysis results (0.0 = uncertain, 1.0 = highly confident)
910
+ - `modelId` (string) []: UUID of the model that was processed
792
911
 
793
- - `analysisWarnings` (array) []: Warnings or issues detected during analysis (structured for programmatic handling)
912
+ - `entityType` (string) []: Type of entity processed
794
913
 
795
- - `analyzedAt` (string) []: ISO 8601 timestamp when analysis was performed (e.g., '2025-11-19T14:35:22Z')
914
+ - `tags` (array) []: Generated searchability tags (style, technical, usage keywords)
796
915
 
797
- - `errorMessage` (string) []: Detailed error message if status is FAILED
916
+ - `metadata` (object) []: Content generation metadata for tracking
798
917
 
799
- - `errorCode` (string) [✗]: Machine-readable error code for programmatic error handling
918
+ - `error` (string) [✗]: Error message if generation failed
800
919
 
801
920
 
802
921
 
803
- ### model-technical-metadata-request
922
+ ### marketplace-listing-tags-generation-request
804
923
 
805
- **Description:** Triggers comprehensive technical analysis of a 3D model file to extract geometry, quality metrics, and print-readiness information
924
+ **Description:** Generates searchability tags for a 3D model optimized for marketplace discoverability. Worker creates style, technical, and usage keywords following marketplace tag limits and SEO best practices.
806
925
 
807
- **Method:** `client.modelTechnicalMetadataRequest(data)`
926
+ **Method:** `client.marketplaceListingTagsGenerationRequest(data)`
927
+
928
+ **Payload Type:** `MarketplaceListingTagsGenerationRequestMessage`
929
+
930
+ **Fields:**
931
+
932
+ - `modelId` (string) [✓]: UUID of the model (reference only)
933
+
934
+ - `entityType` (string) [✓]: Type of entity being processed
935
+
936
+ - `entityName` (string) [✓]: Name/title of the model or metamodel
937
+
938
+ - `targetMarketplace` (string) [✓]: Target marketplace ID (e.g., 'etsy', 'ebay', 'thingiverse')
939
+
940
+ - `userId` (string) [✓]: UUID of the user requesting generation
941
+
942
+ - `webhookUrl` (string) [✗]: Callback URL for completion notification
943
+
944
+ - `technicalMetadata` (object) [✗]: Technical analysis data for tag generation
945
+
946
+ - `thumbnailUrls` (array) [✗]: URLs to 360-degree thumbnail views for visual analysis
947
+
948
+ - `existingTags` (array) [✗]: Currently assigned tags to supplement or replace
949
+
950
+ - `existingCategory` (string) [✗]: Current classification for category-based tags
951
+
952
+ - `tagLimit` (number) [✗]: Maximum number of tags for marketplace (e.g., 13 for Etsy)
953
+
954
+ - `targetMarket` (string) [✗]: Target geographic market (e.g., 'US', 'EU')
955
+
956
+ - `style` (string) [✗]: Artistic style of the model (e.g., 'realistic', 'low-poly')
957
+
958
+ - `useCases` (array) [✗]: Intended uses for the model
959
+
960
+
961
+
962
+ ### marketplace-listing-title-generation-completed
963
+
964
+ **Description:** Notifies backend that marketplace title generation completed. Contains generated title with metadata tracking.
965
+
966
+ **Method:** `client.marketplaceListingTitleGenerationCompleted(data)`
967
+
968
+ **Payload Type:** `MarketplaceListingTitleGenerationCompletedMessage`
969
+
970
+ **Fields:**
971
+
972
+ - `modelId` (string) [✓]: UUID of the model that was processed
973
+
974
+ - `entityType` (string) [✓]: Type of entity processed
975
+
976
+ - `title` (string) [✓]: Marketplace-optimized title
977
+
978
+ - `metadata` (object) [✓]: Content generation metadata for tracking
979
+
980
+ - `error` (string) [✗]: Error message if generation failed
981
+
982
+
983
+
984
+ ### marketplace-listing-title-generation-request
985
+
986
+ **Description:** Generates marketplace-optimized title for a 3D model. Worker creates concise, SEO-friendly titles following marketplace character limits and best practices.
987
+
988
+ **Method:** `client.marketplaceListingTitleGenerationRequest(data)`
989
+
990
+ **Payload Type:** `MarketplaceListingTitleGenerationRequestMessage`
991
+
992
+ **Fields:**
993
+
994
+ - `modelId` (string) [✓]: UUID of the model (reference only)
995
+
996
+ - `entityType` (string) [✓]: Type of entity being processed
997
+
998
+ - `currentName` (string) [✓]: Current model/metamodel name
999
+
1000
+ - `targetMarketplace` (string) [✓]: Target marketplace ID (e.g., 'etsy', 'ebay', 'thingiverse')
1001
+
1002
+ - `userId` (string) [✓]: UUID of the user requesting generation
1003
+
1004
+ - `webhookUrl` (string) [✗]: Callback URL for completion notification
1005
+
1006
+ - `technicalMetadata` (object) [✗]: Technical analysis data for context
1007
+
1008
+ - `existingTags` (array) [✗]: Currently assigned tags for SEO keywords
1009
+
1010
+ - `existingCategory` (string) [✗]: Current classification for categorization
1011
+
1012
+ - `characterLimit` (number) [✗]: Maximum character count for marketplace (e.g., 140 for Etsy)
1013
+
1014
+ - `brandVoice` (string) [✗]: Desired tone/voice for the listing (e.g., 'professional', 'playful')
1015
+
1016
+ - `targetMarket` (string) [✗]: Target geographic market (e.g., 'US', 'EU')
1017
+
1018
+ - `keywords` (array) [✗]: Specific keywords to include
1019
+
1020
+
1021
+
1022
+ ### marketplace-listing-update-completed
1023
+
1024
+ **Description:** Result of a listing update operation
1025
+
1026
+ **Method:** `client.marketplaceListingUpdateCompleted(data)`
1027
+
1028
+ **Payload Type:** `MarketplaceListingUpdateCompletedMessage`
1029
+
1030
+ **Fields:**
1031
+
1032
+ - `marketplace` (string) [✗]: Target marketplace
1033
+
1034
+ - `listingId` (string) [✗]: External ID of the listing
1035
+
1036
+ - `status` (string) [✗]: Status of the update (success, failed)
1037
+
1038
+ - `result` (object) [✗]: Result details from the marketplace API
1039
+
1040
+ - `error` (string) [✗]: Error message if failed
1041
+
1042
+
1043
+
1044
+ ### marketplace-listing-update-request
1045
+
1046
+ **Description:** Request to update an existing listing on a marketplace (price, quantity, etc.)
1047
+
1048
+ **Method:** `client.marketplaceListingUpdateRequest(data)`
1049
+
1050
+ **Payload Type:** `MarketplaceListingUpdateRequestMessage`
1051
+
1052
+ **Fields:**
1053
+
1054
+ - `marketplace` (string) [✗]: Target marketplace (etsy, ebay, etc.)
1055
+
1056
+ - `listingId` (string) [✗]: External ID of the listing to update
1057
+
1058
+ - `updates` (object) [✗]: Fields to update
1059
+
1060
+ - `credentials` (object) [✗]: User credentials for the marketplace
1061
+
1062
+
1063
+
1064
+ ### media-batch-download-completed
1065
+
1066
+ **Description:** Notifies that a batch media download has been completed.
1067
+
1068
+ **Method:** `client.mediaBatchDownloadCompleted(data)`
1069
+
1070
+ **Payload Type:** `MediaBatchDownloadCompletedMessage`
1071
+
1072
+ **Fields:**
1073
+
1074
+ - `batchId` (string) [✓]: The unique identifier for the batch download operation.
1075
+
1076
+ - `status` (string) [✓]: The final status of the batch download operation.
1077
+
1078
+ - `processedFiles` (array) [✗]: List of successfully processed files.
1079
+
1080
+ - `failedFiles` (array) [✗]: List of files that failed to process.
1081
+
1082
+ - `processedAt` (string) [✓]: Timestamp when the batch processing completed.
1083
+
1084
+ - `statistics` (object) [✗]: Statistics about the batch processing.
1085
+
1086
+
1087
+
1088
+ ### media-batch-download-request
1089
+
1090
+ **Description:** Request to download and process a batch of media files from a storage provider. Images are compressed and resized to specified dimensions, converted to WebP format. Text files and documents are processed and stored with metadata. All processed files are uploaded to MinIO S3 storage under the media/{batchId}/ prefix.
1091
+
1092
+
1093
+ **Method:** `client.mediaBatchDownloadRequest(data)`
1094
+
1095
+ **Payload Type:** `MediaBatchDownloadRequestMessage`
1096
+
1097
+ **Fields:**
1098
+
1099
+ - `batchId` (string) [✗]: Unique identifier for this batch of media files. Used for organizing processed files in S3 storage (media/{batchId}/) and correlating with completion responses.
1100
+
1101
+
1102
+ - `downloadStrategy` (string) [✗]: Download strategy for media files: - storage_provider: Download from authenticated storage connection (Google Drive, SFTP, etc.) - external_url: Download from public HTTP URLs (CDN, API responses, Thingiverse, etc.)
1103
+
1104
+
1105
+ - `entityType` (string) [✗]: Type of entity these media files belong to. Used for linking downloaded media to the correct entity in the database.
1106
+
1107
+
1108
+ - `entityId` (string) [✗]: UUID of the model or metamodel entity that owns these media files. Used for creating storage item associations after download.
1109
+
1110
+
1111
+ - `storageConnectionId` (string) [✗]: UUID of the StorageConnection entity from which to download the media files. Required when downloadStrategy is 'storage_provider'. Used to authenticate and access the source storage provider.
1112
+
1113
+
1114
+ - `credentials` (object) [✗]: Decrypted credentials for the storage provider (Fat Payload pattern). Required when downloadStrategy is 'storage_provider'.
1115
+
1116
+
1117
+ - `mediaFiles` (array) [✗]: Array of media files to download and process. Must contain at least one file. Each file includes metadata for identification and processing.
1118
+
1119
+
1120
+ - `compressionSettings` (object) [✗]: Optional compression settings that override deployment environment defaults. If not provided, uses values from MAX_IMAGE_WIDTH, MAX_IMAGE_HEIGHT, IMAGE_QUALITY, and OUTPUT_FORMAT environment variables.
1121
+
1122
+
1123
+
1124
+
1125
+ ### metamodel-metadata-generation-completed
1126
+
1127
+ **Description:** Handles metamodel metadata generation completion. Contains AI-generated metadata and aggregated technical analysis.
1128
+
1129
+ **Method:** `client.metamodelMetadataGenerationCompleted(data)`
1130
+
1131
+ **Payload Type:** `MetamodelMetadataGenerationCompletedMessage`
1132
+
1133
+ **Fields:**
1134
+
1135
+ - `metamodelId` (string) [✓]: The unique identifier for the metamodel
1136
+
1137
+ - `metadata` (object) [✓]: AI-generated metadata for the metamodel
1138
+
1139
+ - `technicalMetadata` (object) [✓]: Aggregated technical analysis from constituent models
1140
+
1141
+
1142
+
1143
+ ### metamodel-metadata-generation-request
1144
+
1145
+ **Description:** Handles metamodel metadata generation requests via Ollama. Aggregates data from constituent models and generates AI-enhanced metadata.
1146
+
1147
+ **Method:** `client.metamodelMetadataGenerationRequest(data)`
1148
+
1149
+ **Payload Type:** `MetamodelMetadataGenerationRequestMessage`
1150
+
1151
+ **Fields:**
1152
+
1153
+ - `metamodelId` (string) [✗]: The unique identifier for the metamodel
1154
+
1155
+ - `constituentModelIds` (array) [✗]: Array of model IDs that compose this metamodel
1156
+
1157
+ - `name` (string) [✗]: The name of the metamodel
1158
+
1159
+ - `ownerId` (string) [✗]: The owner's user ID
1160
+
1161
+ - `libraryId` (string) [✗]: The library containing this metamodel
1162
+
1163
+ - `constituentModels` (array) [✗]: Enriched metadata for constituent models (includes storage items)
1164
+
1165
+ - `webhookUrl` (string) [✗]: Optional webhook URL for async completion notification
1166
+
1167
+
1168
+
1169
+ ### model-analytics-collection-request
1170
+
1171
+ **Description:** Request to collect marketplace analytics for a specific metamodel.
1172
+ Triggered by backend scheduler every 6 hours for popular/tagged metamodels.
1173
+
1174
+ Worker performs targeted market searches based on metamodel metadata
1175
+ and stores aggregated statistics in Elasticsearch for trend analysis.
1176
+
1177
+
1178
+ **Method:** `client.modelAnalyticsCollectionRequest(data)`
1179
+
1180
+ **Payload Type:** `ModelAnalyticsCollectionRequestMessage`
1181
+
1182
+ **Fields:**
1183
+
1184
+ - `metamodelId` (string) [✓]: The metamodel ID to collect analytics for
1185
+
1186
+ - `ownerId` (string) [✓]: Owner user ID for audit trail
1187
+
1188
+ - `primaryCategory` (string) [✗]: Primary classification category (e.g., "miniature", "terrain")
1189
+
1190
+ - `subCategory` (string) [✗]: Sub-category for more specific targeting
1191
+
1192
+ - `tags` (array) [✗]: Relevant tags from metamodel metadata (max 10)
1193
+
1194
+ - `franchise` (string) [✗]: Franchise name if detected (e.g., "Dungeons & Dragons")
1195
+
1196
+ - `confidence` (number) [✗]: Classification confidence score
1197
+
1198
+ - `priority` (string) [✗]: Collection priority level
1199
+
1200
+ - `triggeredBy` (string) [✗]: Source of trigger (e.g., "backend-scheduler", "manual")
1201
+
1202
+ - `triggeredAt` (string) [✗]: Timestamp when collection was triggered
1203
+
1204
+
1205
+
1206
+ ### model-discovery-folder-processed-event
1207
+
1208
+ **Description:** Handles model discovery folder processed events.
1209
+
1210
+ **Method:** `client.modelDiscoveryFolderProcessedEvent(data)`
1211
+
1212
+ **Payload Type:** `ModelDiscoveryFolderProcessedEventMessage`
1213
+
1214
+ **Fields:**
1215
+
1216
+ - `connectionId` (string) [✗]: The unique identifier for the connection.
1217
+
1218
+ - `folderPath` (string) [✗]: The path to the processed folder.
1219
+
1220
+ - `discoveredFiles` (array) [✗]: A list of files discovered in the folder.
1221
+
1222
+ - `folderSignature` (object) [✗]: A signature representing the state of the folder.
1223
+
1224
+ - `processedAt` (string) [✗]: The timestamp when the folder was processed.
1225
+
1226
+ - `statistics` (object) [✗]: Statistics about the processed folder.
1227
+
1228
+
1229
+
1230
+ ### model-discovery-scan-found-event
1231
+
1232
+ **Description:** Handles model discovery scan found events.
1233
+
1234
+ **Method:** `client.modelDiscoveryScanFoundEvent(data)`
1235
+
1236
+ **Payload Type:** `ModelDiscoveryScanFoundEventMessage`
1237
+
1238
+ **Fields:**
1239
+
1240
+ - `modelId` (string) [✗]: The unique identifier for the model.
1241
+
1242
+ - `name` (string) [✗]: The name of the model.
1243
+
1244
+ - `fileName` (string) [✗]: The name of the model file.
1245
+
1246
+ - `description` (string) [✗]: A description of the model.
1247
+
1248
+ - `fileTypes` (array) [✗]: An array of file types associated with the model.
1249
+
1250
+ - `size` (number) [✗]: The size of the model file in bytes.
1251
+
1252
+ - `storageLocation` (object) [✗]: The storage location of the model.
1253
+
1254
+ - `providerType` (string) [✗]: The type of the storage provider.
1255
+
1256
+ - `metadata` (object) [✗]: A flexible object for additional metadata.
1257
+
1258
+
1259
+
1260
+ ### model-discovery-scan-progress-event
1261
+
1262
+ **Description:** Handles model discovery scan progress events.
1263
+
1264
+ **Method:** `client.modelDiscoveryScanProgressEvent(data)`
1265
+
1266
+ **Payload Type:** `ModelDiscoveryScanProgressEventMessage`
1267
+
1268
+ **Fields:**
1269
+
1270
+ - `payload` (object) [✗]: Contains the discovery scan progress details.
1271
+
1272
+
1273
+
1274
+ ### model-discovery-scan-request
1275
+
1276
+ **Description:** Handles model discovery scan requests events.
1277
+
1278
+ **Method:** `client.modelDiscoveryScanRequest(data)`
1279
+
1280
+ **Payload Type:** `ModelDiscoveryScanRequestMessage`
1281
+
1282
+ **Fields:**
1283
+
1284
+ - `libraryId` (string) [✗]: The ID of the library to scan.
1285
+
1286
+ - `storageConnectionId` (string) [✗]: The ID of the storage connection to scan.
1287
+
1288
+ - `providerType` (string) [✗]: The type of the storage provider.
1289
+
1290
+ - `path` (string) [✗]: The specific path within the storage connection to scan for this library.
1291
+
1292
+ - `credentials` (object) [✗]: Decrypted credentials for the storage provider.
1293
+
1294
+ - `configuration` (object) [✗]: Configuration for the storage connection (e.g. scanRootPath).
1295
+
1296
+
1297
+
1298
+ ### model-finder-index-request
1299
+
1300
+ **Description:** DEPRECATED (2026-02-18) — FR-023 retired. Merge 3D rendering into worker-file-vectorize.
1301
+
1302
+ **Method:** `client.modelFinderIndexRequest(data)`
1303
+
1304
+ **Payload Type:** `ModelFinderIndexRequestMessage`
1305
+
1306
+ **Fields:**
1307
+
1308
+ - `modelId` (string) [✗]:
1309
+
1310
+ - `storageItem` () [✗]:
1311
+
1312
+
1313
+
1314
+ ### model-finder-response
1315
+
1316
+ **Description:** DEPRECATED (2026-02-18) — FR-023 retired. Merge 3D rendering into worker-file-vectorize.
1317
+
1318
+ **Method:** `client.modelFinderResponse(data)`
1319
+
1320
+ **Payload Type:** `ModelFinderResponseMessage`
1321
+
1322
+ **Fields:**
1323
+
1324
+ - `requestId` (string) [✗]:
1325
+
1326
+ - `results` (array) [✗]:
1327
+
1328
+
1329
+
1330
+ ### model-finder-search-request
1331
+
1332
+ **Description:** DEPRECATED (2026-02-18) — FR-023 retired. Merge 3D rendering into worker-file-vectorize.
1333
+
1334
+ **Method:** `client.modelFinderSearchRequest(data)`
1335
+
1336
+ **Payload Type:** `ModelFinderSearchRequestMessage`
1337
+
1338
+ **Fields:**
1339
+
1340
+ - `referenceModelId` (string) [✗]: Optional: Search using an existing model as reference
1341
+
1342
+ - `referenceImageId` (string) [✗]: Optional: Search using an uploaded image
1343
+
1344
+ - `limit` (integer) [✗]:
1345
+
1346
+
1347
+
1348
+ ### model-metadata-generation-completed
1349
+
1350
+ **Description:** Notifies backend that enriched marketplace metadata generation completed. Backend updates Model entity with generated description, tags, classification, etc.
1351
+
1352
+ **Method:** `client.modelMetadataGenerationCompleted(data)`
1353
+
1354
+ **Payload Type:** `ModelMetadataGenerationCompletedMessage`
1355
+
1356
+ **Fields:**
1357
+
1358
+ - `modelId` (string) [✓]: UUID of the model that was processed.
1359
+
1360
+ - `metadata` (object) [✓]: Enriched marketplace metadata generated by LLM.
1361
+
1362
+
1363
+
1364
+ ### model-metadata-generation-request
1365
+
1366
+ **Description:** Generates enriched marketplace metadata (SEO descriptions, tags, categories) for 3D models using LLM vision analysis. Worker receives all necessary data in the payload (Model, TechnicalMetadata, Thumbnails) and does NOT query the database. Prerequisites: file download, technical metadata, and thumbnail generation must be complete before this message is sent.
1367
+
1368
+ **Method:** `client.modelMetadataGenerationRequest(data)`
1369
+
1370
+ **Payload Type:** `ModelMetadataGenerationRequestMessage`
1371
+
1372
+ **Fields:**
1373
+
1374
+ - `modelId` (string) [✗]: UUID of the model (reference only)
1375
+
1376
+ - `model` (object) [✗]: Core model entity data
1377
+
1378
+ - `technicalMetadata` (object) [✗]: Geometric and technical analysis results
1379
+
1380
+ - `thumbnails` (array) [✗]: List of 360 degree thumbnail views (URLs or paths)
1381
+
1382
+
1383
+
1384
+ ### model-metamodel-detection-found
1385
+
1386
+ **Description:** Handles model metamodel detection found with hierarchical relationships.
1387
+
1388
+ **Method:** `client.modelMetamodelDetectionFound(data)`
1389
+
1390
+ **Payload Type:** `ModelMetamodelDetectionFoundMessage`
1391
+
1392
+ **Fields:**
1393
+
1394
+ - `metamodels` (array) [✓]: List of metamodel nodes in hierarchical structure (roots and children).
1395
+
1396
+ - `ekgEdges` (array) [✗]: EKG edges derived from Louvain clustering (OPTIONAL - new field)
1397
+
1398
+
1399
+
1400
+ ### model-metamodel-detection-request
1401
+
1402
+ **Description:** Handles model metamodel detection requests.
1403
+
1404
+ **Method:** `client.modelMetamodelDetectionRequest(data)`
1405
+
1406
+ **Payload Type:** `ModelMetamodelDetectionRequestMessage`
1407
+
1408
+ **Fields:**
1409
+
1410
+ - `connectionId` (string) [✓]: The unique identifier for the storage connection.
1411
+
1412
+ - `folderPath` (string) [✓]: The path to the folder that was processed.
1413
+
1414
+ - `discoveredFiles` (array) [✗]: A list of files discovered in the folder. Worker should check this first, then manifestUrl.
1415
+
1416
+ - `manifestUrl` (string) [✗]: URL to a JSON file containing the list of discovered files (for large folders)
1417
+
1418
+ - `folderSignature` (object) [✓]: A signature representing the state of the folder.
1419
+
1420
+ - `processedAt` (string) [✓]: The timestamp when the folder was processed.
1421
+
1422
+ - `statistics` (object) [✓]: Statistics about the processed folder.
1423
+
1424
+
1425
+
1426
+ ### model-print-analysis-completed
1427
+
1428
+ **Description:** Reports completion of 3D print analysis — contains estimation, printability, and cost breakdown per FR-022
1429
+
1430
+ **Method:** `client.modelPrintAnalysisCompleted(data)`
1431
+
1432
+ **Payload Type:** `ModelPrintAnalysisCompletedMessage`
1433
+
1434
+ **Fields:**
1435
+
1436
+ - `originalJobId` (string) [✗]: ID of the original analysis request job
1437
+
1438
+ - `modelId` (string) [✗]: UUID of the analysed model
1439
+
1440
+ - `status` (string) [✗]: Analysis result status
1441
+
1442
+ - `errorMessage` (string) [✗]: Error description when status is FAILED
1443
+
1444
+ - `material` (string) [✗]: Material type used for estimation
1445
+
1446
+ - `quality` (string) [✗]: Quality preset used
1447
+
1448
+ - `printTimeMinutes` (number) [✗]: Estimated total print time in minutes
1449
+
1450
+ - `materialGrams` (number) [✗]: Estimated material consumption in grams (body only)
1451
+
1452
+ - `needsSupport` (boolean) [✗]: Whether the model requires support structures
1453
+
1454
+ - `supportMaterialGrams` (number) [✗]: Estimated support material in grams
1455
+
1456
+ - `overhangPercentage` (number) [✗]: Percentage of surface area with overhangs > 45°
1457
+
1458
+ - `minWallThicknessMm` (number) [✗]: Thinnest detected wall in millimeters
1459
+
1460
+ - `solidVolumeCm3` (number) [✗]: Solid volume of the mesh in cm³
1461
+
1462
+ - `surfaceAreaCm2` (number) [✗]: Total surface area in cm²
1463
+
1464
+ - `boundingBox` (object) [✗]: Bounding box in millimeters
1465
+
1466
+ - `estimatedCostEUR` (number) [✗]: Total estimated production cost in EUR
1467
+
1468
+ - `costBreakdown` (object) [✗]: Granular cost breakdown per WF-009 MaterialCostCalculatorService
1469
+
1470
+
1471
+
1472
+ ### model-print-analysis-request
1473
+
1474
+ **Description:** Triggers 3D print analysis for a model — estimates print time, material usage, support needs, and cost breakdown per FR-022
1475
+
1476
+ **Method:** `client.modelPrintAnalysisRequest(data)`
1477
+
1478
+ **Payload Type:** `ModelPrintAnalysisRequestMessage`
1479
+
1480
+ **Fields:**
1481
+
1482
+ - `modelId` (string) [✗]: UUID of the model to analyse
1483
+
1484
+ - `ownerId` (string) [✗]: UUID of the user who owns the model
1485
+
1486
+ - `material` (string) [✗]: Material type enum value (e.g. PLA, PETG, RESIN_STANDARD)
1487
+
1488
+ - `quality` (string) [✗]: Print quality preset
1489
+
1490
+ - `webhookUrl` (string) [✗]: URL called when analysis completes or fails
1491
+
1492
+ - `minioPath` (string) [✗]: Path to model in MinIO storage for geometry analysis (e.g. 'raw_models/{modelId}/original.glb')
1493
+
1494
+
1495
+
1496
+ ### model-sellability-analysis-completed
1497
+
1498
+ **Description:** Contains sellability analysis results including Etsy-specific recommendations, material pricing, and marketplace compatibility scores
1499
+
1500
+ **Method:** `client.modelSellabilityAnalysisCompleted(data)`
1501
+
1502
+ **Payload Type:** `ModelSellabilityAnalysisCompletedMessage`
1503
+
1504
+ **Fields:**
1505
+
1506
+ - `metamodelId` (string) [✗]: Metamodel UUID
1507
+
1508
+ - `ownerId` (string) [✗]: Owner user ID
1509
+
1510
+ - `sellabilityScore` (number) [✗]: Overall sellability score (0-100)
1511
+
1512
+ - `pricingRecommendations` (object) [✗]: Pricing analysis and recommendations with material-specific pricing (v2.0.0)
1513
+
1514
+ - `marketplaceRecommendations` (array) [✗]: Recommended marketplaces with Etsy-specific scoring (v2.0.0)
1515
+
1516
+ - `demandAnalysis` (object) [✗]: Market demand insights
1517
+
1518
+ - `qualityFactors` (object) [✗]: Quality-related factors affecting sellability
1519
+
1520
+ - `recommendations` (array) [✗]: Actionable recommendations to improve sellability
1521
+
1522
+ - `analyzedAt` (string) [✗]: Analysis completion timestamp (ISO 8601)
1523
+
1524
+ - `analysisVersion` (string) [✗]: Analysis algorithm version
1525
+
1526
+ - `error` (object) [✗]: Error information if analysis failed
1527
+
1528
+
1529
+
1530
+ ### model-sellability-analysis-request
1531
+
1532
+ **Description:** Analyzes a metamodel to determine sellability score, pricing recommendations, and optimal marketplace selection. Enhanced with Etsy-specific analysis including competitor pricing, category demand trends, and material suitability.
1533
+
1534
+ **Method:** `client.modelSellabilityAnalysisRequest(data)`
1535
+
1536
+ **Payload Type:** `ModelSellabilityAnalysisRequestMessage`
1537
+
1538
+ **Fields:**
1539
+
1540
+ - `metamodelId` (string) [✗]: UUID of the metamodel to analyze.
1541
+
1542
+ - `ownerId` (string) [✗]: UUID of the user who owns the metamodel
1543
+
1544
+ - `metamodelData` (object) [✗]: Full metamodel data including technical metadata, enriched metadata, and child models. Injected by backend to avoid DB access.
1545
+
1546
+ - `manifestUrl` (string) [✗]: URL to a JSON manifest containing the metamodel data if it is too large for the message payload.
1547
+
1548
+ - `analysisOptions` (object) [✗]: Optional analysis configuration
1549
+
1550
+
1551
+
1552
+ ### model-semantic-analysis-completed
1553
+
1554
+ **Description:** Handles completion of 3D model semantic analysis with generated tags and similarity results.
1555
+
1556
+ **Method:** `client.modelSemanticAnalysisCompleted(data)`
1557
+
1558
+ **Payload Type:** `ModelSemanticAnalysisCompletedMessage`
1559
+
1560
+ **Fields:**
1561
+
1562
+ - `modelId` (string) [✗]: The unique identifier for the model.
1563
+
1564
+ - `userId` (string) [✗]: The user ID who owns the model.
1565
+
1566
+ - `processingStatus` (string) [✗]: Final processing status.
1567
+
1568
+ - `semanticMetadata` (object) [✗]: Generated semantic metadata and analysis results.
1569
+
1570
+ - `processingTime` (object) [✗]: Processing performance metrics.
1571
+
1572
+ - `qualityMetrics` (object) [✗]: Processing quality and confidence metrics.
1573
+
1574
+ - `error` (object) [✗]: Error information if processing failed.
1575
+
1576
+ - `debugInfo` (object) [✗]: Additional debug information for troubleshooting.
1577
+
1578
+
1579
+
1580
+ ### model-semantic-analysis-request
1581
+
1582
+ **Description:** Handles 3D model semantic analysis requests using ULIP-2 neural networks and FAISS vector similarity search.
1583
+
1584
+ **Method:** `client.modelSemanticAnalysisRequest(data)`
1585
+
1586
+ **Payload Type:** `ModelSemanticAnalysisRequestMessage`
1587
+
1588
+ **Fields:**
1589
+
1590
+ - `modelId` (string) [✗]: The unique identifier for the model.
1591
+
1592
+ - `userId` (string) [✗]: The user ID who owns the model.
1593
+
1594
+ - `storageConnectionId` (string) [✗]: The ID of the storage connection.
1595
+
1596
+ - `filePath` (string) [✗]: The path to the 3D model file in storage.
1597
+
1598
+ - `fileName` (string) [✗]: The name of the model file.
1599
+
1600
+ - `fileSize` (number) [✗]: The size of the model file in bytes.
1601
+
1602
+ - `storageProviderType` (string) [✗]: The type of the storage provider (S3, GoogleDrive, SFTP, etc).
1603
+
1604
+ - `processingOptions` (object) [✗]: Configuration options for semantic analysis.
1605
+
1606
+ - `priority` (number) [✗]: Processing priority (1=highest, 10=lowest).
1607
+
1608
+ - `webhookUrl` (string) [✗]: Optional webhook URL for completion notification.
1609
+
1610
+ - `retryCount` (number) [✗]: Current retry attempt number.
1611
+
1612
+
1613
+
1614
+ ### model-technical-metadata-completed
1615
+
1616
+ **Description:** Reports comprehensive results of technical metadata analysis including geometry, quality metrics, and print-readiness assessment
1617
+
1618
+ **Method:** `client.modelTechnicalMetadataCompleted(data)`
1619
+
1620
+ **Payload Type:** `ModelTechnicalMetadataCompletedMessage`
1621
+
1622
+ **Fields:**
1623
+
1624
+ - `originalJobId` (string) [✗]: ID of the original analysis request job
1625
+
1626
+ - `modelId` (string) [✗]: ID of the analyzed model
1627
+
1628
+ - `status` (string) [✗]: Analysis completion status
1629
+
1630
+ - `vertices` (integer) [✗]: Number of vertices in the mesh
1631
+
1632
+ - `faces` (integer) [✗]: Number of faces/polygons in the mesh
1633
+
1634
+ - `edges` (integer) [✗]: Number of edges in the mesh
1635
+
1636
+ - `detailLevel` (string) [✗]: Visual detail level based on polygon density
1637
+
1638
+ - `boundingBox` (object) [✗]: 3D bounding box dimensions in millimeters
1639
+
1640
+ - `volumeCubicMm` (number) [✗]: Model volume in cubic millimeters (for material calculation)
1641
+
1642
+ - `surfaceAreaSqMm` (number) [✗]: Total surface area in square millimeters
1643
+
1644
+ - `minWallThickness` (number) [✗]: Minimum wall thickness detected in millimeters (critical for printability)
1645
+
1646
+ - `maxWallThickness` (number) [✗]: Maximum wall thickness detected in millimeters
1647
+
1648
+ - `manifold` (boolean) [✗]: Is the mesh watertight/manifold? Critical for 3D printing (true = printable)
1649
+
1650
+ - `nonManifoldEdges` (integer) [✗]: Number of non-manifold edges (repair needed if > 0)
1651
+
1652
+ - `holes` (integer) [✗]: Number of holes/boundary loops in the mesh (0 = closed mesh)
1653
+
1654
+ - `flippedNormals` (integer) [✗]: Number of faces with inverted normals (causes rendering/slicing issues)
1655
+
1656
+ - `selfIntersections` (integer) [✗]: Number of self-intersecting faces (0 = clean geometry)
1657
+
1658
+ - `qualityScore` (number) [✗]: Overall quality score 0-100 (100 = perfect for printing, <60 needs repair)
1659
+
1660
+ - `printabilityScore` (number) [✗]: Printability score 0-100 (considers supports, orientation, size constraints)
1661
+
1662
+ - `requiresSupports` (boolean) [✗]: Does this model require support structures for 3D printing?
1663
+
1664
+ - `overhangs` (array) [✗]: Detected overhang areas requiring support structures
1665
+
1666
+ - `estimatedPrintTimeMinutes` (integer) [✗]: Estimated print time in minutes using normal quality settings (0.2mm layers, 20% infill)
1667
+
1668
+ - `printTimeEstimates` (object) [✗]: Print time estimates for different quality presets
1669
+
1670
+ - `estimatedMaterialGrams` (number) [✗]: Estimated material usage in grams using 20% infill (assumes PLA density 1.24g/cm³)
1671
+
1672
+ - `materialEstimates` (object) [✗]: Material usage estimates for different infill percentages
1673
+
1674
+ - `recommendedOrientation` (object) [✗]: Recommended print orientation for minimal support material and best results
1675
+
1676
+ - `slicerRecommendations` (object) [✗]: Slicer-derived recommended print settings based on model analysis (feeds into print job creation as defaults)
1677
+
1678
+ - `originalUnit` (string) [✗]: Original file format unit detected from metadata or inferred from scale
1679
+
1680
+ - `formatVersion` (string) [✗]: File format version (e.g., 'STL Binary', 'OBJ v4', 'PLY 1.0')
1681
+
1682
+ - `hasColorData` (boolean) [✗]: Does the file contain per-vertex color information?
1683
+
1684
+ - `hasTextureCoordinates` (boolean) [✗]: Does the file contain UV texture mapping coordinates?
1685
+
1686
+ - `hasVertexNormals` (boolean) [✗]: Does the file contain per-vertex normal vectors?
1687
+
1688
+ - `analyzedBy` (string) [✗]: Tool/service that performed the analysis
1689
+
1690
+ - `analysisVersion` (string) [✗]: Version of the analysis algorithm (for tracking improvements)
1691
+
1692
+ - `analysisConfidence` (number) [✗]: Confidence level of analysis results (0.0 = uncertain, 1.0 = highly confident)
1693
+
1694
+ - `analysisWarnings` (array) [✗]: Warnings or issues detected during analysis (structured for programmatic handling)
1695
+
1696
+ - `analyzedAt` (string) [✗]: ISO 8601 timestamp when analysis was performed (e.g., '2025-11-19T14:35:22Z')
1697
+
1698
+ - `errorMessage` (string) [✗]: Detailed error message if status is FAILED
1699
+
1700
+ - `errorCode` (string) [✗]: Machine-readable error code for programmatic error handling
1701
+
1702
+
1703
+
1704
+ ### model-technical-metadata-request
1705
+
1706
+ **Description:** Triggers comprehensive technical analysis of a 3D model file to extract geometry, quality metrics, and print-readiness information
1707
+
1708
+ **Method:** `client.modelTechnicalMetadataRequest(data)`
808
1709
 
809
1710
  **Payload Type:** `ModelTechnicalMetadataRequestMessage`
810
1711
 
811
1712
  **Fields:**
812
1713
 
813
- - `modelId` (string) [✗]: Unique identifier for the model to analyze
1714
+ - `modelId` (string) [✗]: Unique identifier for the model to analyze
1715
+
1716
+ - `ownerId` (string) [✗]: User ID who owns the model
1717
+
1718
+ - `storageLocation` (object) [✗]: Location of the 3D model file (legacy - used for direct download if minioPath not provided)
1719
+
1720
+ - `minioPath` (string) [✗]: Path to model in MinIO (e.g., 'raw_models/{modelId}/original.glb'). If provided, file will be read from MinIO instead of downloading from storage provider.
1721
+
1722
+ - `parentJobId` (string) [✗]: ID of parent file-download job (for BullMQ dependency tracking).
1723
+
1724
+ - `analysisOptions` (object) [✗]: Optional analysis configuration parameters
1725
+
1726
+
1727
+
1728
+ ### slicing-fdm-request
1729
+
1730
+ **Description:** Request FDM slicing simulation via OrcaSlicer (preferred) or heuristic fallback. Accepts OrcaSlicer-compatible printer/process/filament JSON profiles.
1731
+
1732
+ **Method:** `client.slicingFdmRequest(data)`
1733
+
1734
+ **Payload Type:** `SlicingFdmRequestMessage`
1735
+
1736
+ **Fields:**
1737
+
1738
+ - `modelId` (string) [✗]: UUID of the model
1739
+
1740
+ - `storageItemId` (string) [✗]: UUID or path of the storage item to download the STL/3MF
1741
+
1742
+ - `profileId` (string) [✗]: UUID of the user's slicer profile from the database
1743
+
1744
+ - `profileName` (string) [✗]: Human-readable profile name (e.g. 'My Bambu X1C - PLA Fine')
1745
+
1746
+ - `printerProfile` (object) [✗]: OrcaSlicer printer profile JSON: nozzle_diameter, bed_shape, max speeds, acceleration, retraction
1747
+
1748
+ - `processProfile` (object) [✗]: OrcaSlicer process profile JSON: layer_height, sparse_infill_density, wall_loops, speeds, support settings
1749
+
1750
+ - `filamentProfile` (object) [✗]: OrcaSlicer filament profile JSON: filament_type, filament_density, temperature, flow_ratio, retraction
1751
+
1752
+ - `layerHeight` (number) [✗]: Override: layer height in mm (takes precedence over processProfile)
1753
+
1754
+ - `infillPercentage` (number) [✗]: Override: infill percentage (0-100)
1755
+
1756
+ - `nozzleDiameter` (number) [✗]: Override: nozzle diameter in mm
1757
+
1758
+ - `printSpeed` (number) [✗]: Override: outer wall print speed in mm/s
1759
+
1760
+ - `wallCount` (integer) [✗]: Override: number of wall loops / perimeters
1761
+
1762
+ - `supportEnabled` (boolean) [✗]: Override: generate support structures
1763
+
1764
+ - `materialDensity` (number) [✗]: Override: filament density in g/cm³ (default: 1.24 PLA)
1765
+
1766
+ - `webhookUrl` (string) [✗]: URL to POST the slicing result back to
1767
+
1768
+
1769
+
1770
+ ### slicing-fdm-result
1771
+
1772
+ **Description:** Result of FDM slicing simulation from OrcaSlicer (toolpath) or heuristic fallback. Contains exact physical metrics for cost calculation.
1773
+
1774
+ **Method:** `client.slicingFdmResult(data)`
1775
+
1776
+ **Payload Type:** `SlicingFdmResultMessage`
1777
+
1778
+ **Fields:**
1779
+
1780
+ - `modelId` (string) [✗]: UUID of the model
814
1781
 
815
- - `ownerId` (string) [✗]: User ID who owns the model
1782
+ - `status` (string) [✗]: Status of the simulation
816
1783
 
817
- - `storageLocation` (object) [✗]: Location of the 3D model file
1784
+ - `printTimeHours` (number) [✗]: Exact print time in hours (from toolpath analysis)
818
1785
 
819
- - `analysisOptions` (object) [✗]: Optional analysis configuration parameters
1786
+ - `materialWeightGrams` (number) [✗]: Total filament weight in grams (including supports)
1787
+
1788
+ - `materialVolumeCm3` (number) [✗]: Extruded material volume in cm³
1789
+
1790
+ - `maxZHeightMM` (number) [✗]: Maximum Z height in mm
1791
+
1792
+ - `supportMaterialWeightGrams` (number) [✗]: Support structure filament weight in grams
1793
+
1794
+ - `layerCount` (integer) [✗]: Total number of layers
1795
+
1796
+ - `totalExtrusionLengthMm` (number) [✗]: Total filament extrusion length in mm
1797
+
1798
+ - `slicingMethod` (string) [✗]: Engine that produced the result
1799
+
1800
+ - `slicerVersion` (string) [✗]: Version of the slicer engine used
1801
+
1802
+ - `profileUsed` (string) [✗]: Name or ID of the slicer profile used
1803
+
1804
+ - `errorCode` (string) [✗]: Error code if simulation failed
1805
+
1806
+ - `errorMessage` (string) [✗]: Error message if simulation failed
1807
+
1808
+
1809
+
1810
+ ### slicing-sla-request
1811
+
1812
+ **Description:** Request SLA/MSLA slicing simulation via PySLM cross-sectional analysis. Accepts resin printer profile with exposure, lift, and layer parameters.
1813
+
1814
+ **Method:** `client.slicingSlaRequest(data)`
1815
+
1816
+ **Payload Type:** `SlicingSlaRequestMessage`
1817
+
1818
+ **Fields:**
1819
+
1820
+ - `modelId` (string) [✗]: UUID of the model
1821
+
1822
+ - `storageItemId` (string) [✗]: UUID or path of the storage item to download the STL/3MF
1823
+
1824
+ - `technology` (string) [✗]: SLA or MSLA
1825
+
1826
+ - `profileId` (string) [✗]: UUID of the user's slicer profile from the database
1827
+
1828
+ - `profileName` (string) [✗]: Human-readable profile name (e.g. 'Elegoo Mars 3 - Standard Grey')
1829
+
1830
+ - `layerHeight` (number) [✗]: Layer height in mm (default: 0.05)
1831
+
1832
+ - `exposureTime` (number) [✗]: Normal layer UV exposure time in seconds (default: 2.5)
1833
+
1834
+ - `bottomExposureTime` (number) [✗]: Bottom/burn-in layer exposure time in seconds (default: 30)
1835
+
1836
+ - `bottomLayers` (integer) [✗]: Number of bottom/burn-in layers (default: 5)
1837
+
1838
+ - `liftHeight` (number) [✗]: Platform lift height in mm between layers (default: 5.0)
1839
+
1840
+ - `liftSpeed` (number) [✗]: Platform lift speed in mm/min (default: 60)
1841
+
1842
+ - `retractSpeed` (number) [✗]: Platform retract speed in mm/min (default: 150)
1843
+
1844
+ - `resinDensity` (number) [✗]: Resin density in g/cm³ (default: 1.1)
1845
+
1846
+ - `supportEnabled` (boolean) [✗]: Generate support structures (default: true for SLA)
1847
+
1848
+ - `webhookUrl` (string) [✗]: URL to POST the slicing result back to
1849
+
1850
+
1851
+
1852
+ ### slicing-sla-result
1853
+
1854
+ **Description:** Result of SLA/MSLA slicing simulation from PySLM cross-sectional analysis. Contains exact resin usage and print time metrics.
1855
+
1856
+ **Method:** `client.slicingSlaResult(data)`
1857
+
1858
+ **Payload Type:** `SlicingSlaResultMessage`
1859
+
1860
+ **Fields:**
1861
+
1862
+ - `modelId` (string) [✗]: UUID of the model
1863
+
1864
+ - `status` (string) [✗]: Status of the simulation
1865
+
1866
+ - `printTimeHours` (number) [✗]: Exact print time in hours (from cross-sectional analysis)
1867
+
1868
+ - `materialWeightGrams` (number) [✗]: Total resin weight in grams (including supports)
1869
+
1870
+ - `materialVolumeCm3` (number) [✗]: Cured resin volume in cm³ (from cross-sectional area integration)
1871
+
1872
+ - `maxZHeightMM` (number) [✗]: Maximum Z height in mm
1873
+
1874
+ - `supportMaterialWeightGrams` (number) [✗]: Support structure resin weight in grams
1875
+
1876
+ - `layerCount` (integer) [✗]: Total number of layers
1877
+
1878
+ - `maxCrossSectionAreaMm2` (number) [✗]: Maximum cross-sectional area in mm² (affects MSLA peel force)
1879
+
1880
+ - `slicingMethod` (string) [✗]: Engine that produced the result
1881
+
1882
+ - `slicerVersion` (string) [✗]: Version of PySLM / trimesh used
1883
+
1884
+ - `profileUsed` (string) [✗]: Name or ID of the slicer profile used
1885
+
1886
+ - `errorCode` (string) [✗]: Error code if simulation failed
1887
+
1888
+ - `errorMessage` (string) [✗]: Error message if simulation failed
1889
+
1890
+
1891
+
1892
+ ### texture-generation-completed
1893
+
1894
+ **Description:** Emitted when AI texture generation completes (success or failure). Contains artifact S3 URLs on success, or error details on failure. The credit reservation should be confirmed (success) or released (failure) based on the status.
1895
+
1896
+ **Method:** `client.textureGenerationCompleted(data)`
1897
+
1898
+ **Payload Type:** `TextureGenerationCompletedMessage`
1899
+
1900
+ **Fields:**
1901
+
1902
+ - `jobId` (string) [✗]: The unique job identifier matching the original request.
1903
+
1904
+ - `modelId` (string) [✗]: The ID of the model that was textured.
1905
+
1906
+ - `tenantId` (string) [✗]: The tenant who owns the model.
1907
+
1908
+ - `status` (string) [✗]: The result status of the texture generation.
1909
+
1910
+ - `artifacts` (object) [✗]: S3 URLs of generated texture artifacts. Present only when status is 'completed'.
1911
+
1912
+ - `error` (object) [✗]: Error details. Present only when status is 'failed'.
1913
+
1914
+ - `metrics` (object) [✗]: Pipeline performance metrics.
1915
+
1916
+ - `creditReservationId` (string) [✗]: Credit reservation ID to confirm (on success) or release (on failure).
1917
+
1918
+
1919
+
1920
+ ### texture-generation-request
1921
+
1922
+ **Description:** Request AI-powered texture generation for a 3D model. Requires a mesh file URL and a text prompt describing the desired texture. Credits are reserved before dispatch.
1923
+
1924
+ **Method:** `client.textureGenerationRequest(data)`
1925
+
1926
+ **Payload Type:** `TextureGenerationRequestMessage`
1927
+
1928
+ **Fields:**
1929
+
1930
+ - `jobId` (string) [✗]: Unique job identifier for tracking.
1931
+
1932
+ - `modelId` (string) [✗]: The unique identifier for the model to texture.
1933
+
1934
+ - `tenantId` (string) [✗]: The identifier of the tenant requesting the generation.
1935
+
1936
+ - `meshUrl` (string) [✗]: S3 URL to the source mesh file (GLB, OBJ, or STL).
1937
+
1938
+ - `prompt` (string) [✗]: Text description of the desired texture (1-500 characters). Example: 'weathered bronze with green patina'.
1939
+
1940
+ - `stylePreset` (string) [✗]: Style preset to guide the texture generation aesthetic.
1941
+
1942
+ - `resolution` (integer) [✗]: Output texture resolution (width = height in pixels).
1943
+
1944
+ - `creditReservationId` (string) [✗]: Credit reservation ID from the credit ledger. Must be confirmed on completion or released on failure.
820
1945
 
821
1946
 
822
1947
 
@@ -838,6 +1963,12 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
838
1963
 
839
1964
  - `thumbnailPath` (string) [✗]: The path to the generated thumbnail.
840
1965
 
1966
+ - `thumbnail360Views` (array) [✗]: Array of 360° thumbnail view paths (16 angles) for vision-based analysis.
1967
+
1968
+ - `gltfPreviewPath` (string) [✗]: The path to the generated GLTF/GLB 3D preview file.
1969
+
1970
+ - `animatedPreviewPath` (string) [✗]: The path to the generated animated MP4 preview file.
1971
+
841
1972
  - `errorMessage` (string) [✗]: An error message if the thumbnail generation failed.
842
1973
 
843
1974
  - `storageLocation` (object) [✗]: The storage location of the model.
@@ -846,7 +1977,7 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
846
1977
 
847
1978
  ### thumbnail-generation-request
848
1979
 
849
- **Description:** Handles thumbnail generation requests with customization options.
1980
+ **Description:** Handles thumbnail generation requests with customization options. Supports both storage provider downloads and MinIO-cached files.
850
1981
 
851
1982
  **Method:** `client.thumbnailGenerationRequest(data)`
852
1983
 
@@ -858,14 +1989,197 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
858
1989
 
859
1990
  - `ownerId` (string) [✗]: The identifier of the user who owns the entity.
860
1991
 
861
- - `storageLocation` (object) [✗]: The storage location of the model.
1992
+ - `storageLocation` (object) [✗]: The storage location of the model (legacy - used for direct download if minioPath not provided).
1993
+
1994
+ - `minioPath` (string) [✗]: Path to model in MinIO (e.g., 'raw_models/{modelId}/original.glb'). If provided, file will be read from MinIO instead of downloading from storage provider.
862
1995
 
863
1996
  - `previewType` (string) [✗]: The type of preview to generate, e.g., 'default', 'static', 'glb'.
864
1997
 
1998
+ - `generate360Views` (boolean) [✗]: Generate 16 angle views for 360° preview (4 horizontal x 4 vertical angles) for enhanced vision-based metadata analysis.
1999
+
2000
+ - `parentJobId` (string) [✗]: ID of parent file-download job (for BullMQ dependency tracking).
2001
+
865
2002
  - `customization` (object) [✗]: User-defined customizations for the thumbnail.
866
2003
 
867
2004
 
868
2005
 
2006
+ ### user-engagement-event
2007
+
2008
+ **Description:** User engagement and onboarding tracking events for analytics and behavioral insights.
2009
+
2010
+ Captures key user actions throughout their journey:
2011
+ - Account creation and onboarding steps
2012
+ - Feature usage and adoption
2013
+ - Model management activities
2014
+ - Marketplace interactions
2015
+ - Subscription changes
2016
+
2017
+ Used for:
2018
+ - User onboarding funnel analysis
2019
+ - Feature adoption tracking
2020
+ - User retention metrics
2021
+ - A/B testing and experimentation
2022
+ - Personalization and recommendations
2023
+ - Product analytics dashboards
2024
+
2025
+
2026
+ **Method:** `client.userEngagementEvent(data)`
2027
+
2028
+ **Payload Type:** `UserEngagementEventMessage`
2029
+
2030
+ **Fields:**
2031
+
2032
+ - `eventVersion` (string) [✓]: Schema version for forward-compatible evolution
2033
+
2034
+ - `eventType` (string) [✓]: Category of user engagement event
2035
+
2036
+ - `action` (string) [✓]: Specific user action performed
2037
+
2038
+ - `timestamp` (string) [✓]: ISO 8601 timestamp when the action occurred
2039
+
2040
+ - `userId` (string) [✓]: Unique identifier of the user
2041
+
2042
+ - `userEmail` (string) [✗]: User's email — MUST be SHA-256 hashed at the producer side before publishing (GDPR/CNIL compliance). Never send raw email.
2043
+
2044
+ - `userCreatedAt` (string) [✗]: When the user account was created (for cohort analysis)
2045
+
2046
+ - `userPlanTier` (string) [✗]: Current subscription plan tier
2047
+
2048
+ - `sessionId` (string) [✗]: User session identifier for grouping actions
2049
+
2050
+ - `requestId` (string) [✗]: Request ID for correlation with backend logs
2051
+
2052
+ - `correlationId` (string) [✗]: Correlation ID to link engagement events across frontend and backend boundaries, and to pipeline traces
2053
+
2054
+ - `actionDetails` (object) [✗]: Additional context about the action
2055
+
2056
+ - `source` (string) [✗]: Where the action originated
2057
+
2058
+ - `httpMethod` (string) [✗]: HTTP method used
2059
+
2060
+ - `httpUrl` (string) [✗]: API endpoint path
2061
+
2062
+ - `httpStatusCode` (integer) [✗]: HTTP response status code
2063
+
2064
+ - `durationMs` (number) [✗]: Action duration in milliseconds
2065
+
2066
+ - `experimentId` (string) [✗]: A/B test or experiment ID
2067
+
2068
+ - `experimentVariant` (string) [✗]: Experiment variant/group
2069
+
2070
+ - `environment` (string) [✗]: Deployment environment
2071
+
2072
+ - `clientInfo` (object) [✗]: Client/browser information (anonymized)
2073
+
2074
+
2075
+
2076
+ ### worker-analytics-event
2077
+
2078
+ **Description:** Analytics event emitted by workers for tracking processing metrics, user behavior,
2079
+ and model statistics. Consumed by worker-analytic-collector and forwarded to ELK.
2080
+
2081
+ All workers MUST emit this event upon job completion (success or failure).
2082
+ Each worker includes its specific metrics in the `metrics` object.
2083
+
2084
+
2085
+ **Method:** `client.workerAnalyticsEvent(data)`
2086
+
2087
+ **Payload Type:** `WorkerAnalyticsEventMessage`
2088
+
2089
+ **Fields:**
2090
+
2091
+ - `eventType` (string) [✓]: Type of analytics event
2092
+
2093
+ - `workerId` (string) [✓]: Identifier of the worker that processed the job
2094
+
2095
+ - `jobId` (string) [✓]: Unique job identifier from BullMQ
2096
+
2097
+ - `timestamp` (string) [✓]: ISO 8601 timestamp of event emission
2098
+
2099
+ - `userId` (string) [✗]: User who owns the model/triggered the job
2100
+
2101
+ - `modelId` (string) [✗]: Model identifier (if applicable)
2102
+
2103
+ - `metamodelId` (string) [✗]: Metamodel identifier (if applicable)
2104
+
2105
+ - `storageItemId` (string) [✗]: Storage item identifier (for download events)
2106
+
2107
+ - `status` (string) [✗]: Job completion status
2108
+
2109
+ - `errorCode` (string) [✗]: Error code if status is failure
2110
+
2111
+ - `errorMessage` (string) [✗]: Error message if status is failure
2112
+
2113
+ - `timing` (object) [✗]: Processing time metrics in milliseconds
2114
+
2115
+ - `metrics` (object) [✗]: Worker-specific metrics. Structure varies by eventType.
2116
+
2117
+
2118
+
2119
+ ### worker-metrics-enriched-event
2120
+
2121
+ **Description:** Enriched metrics event for detailed worker monitoring, cost tracking,
2122
+ and performance analysis. Published to backend.logging.events for
2123
+ centralized monitoring and cost attribution.
2124
+
2125
+ This event is emitted by all workers on job completion and includes:
2126
+ - LLM token usage and cost breakdown
2127
+ - System resource consumption (CPU, RAM, disk I/O)
2128
+ - Detailed timing breakdown by stage
2129
+ - User and context attribution
2130
+ - Model-specific metadata
2131
+
2132
+
2133
+ **Method:** `client.workerMetricsEnrichedEvent(data)`
2134
+
2135
+ **Payload Type:** `WorkerMetricsEnrichedEventMessage`
2136
+
2137
+ **Fields:**
2138
+
2139
+ - `eventType` (string) [✓]: Fixed type for enriched worker metrics
2140
+
2141
+ - `workerId` (string) [✓]: Identifier of the worker
2142
+
2143
+ - `jobId` (string) [✓]: Unique BullMQ job identifier
2144
+
2145
+ - `timestamp` (string) [✓]: ISO 8601 timestamp when job completed
2146
+
2147
+ - `status` (string) [✓]: Job completion status
2148
+
2149
+ - `userId` (string) [✗]: User who owns the resource/triggered the job
2150
+
2151
+ - `tenantId` (string) [✗]: Organization/tenant ID (for multi-tenant deployments)
2152
+
2153
+ - `sessionId` (string) [✗]: Session ID for correlating user actions
2154
+
2155
+ - `requestId` (string) [✗]: Request ID from originating API call (X-Request-Id)
2156
+
2157
+ - `modelId` (string) [✗]: Model ID being processed
2158
+
2159
+ - `metamodelId` (string) [✗]: Metamodel ID being processed
2160
+
2161
+ - `storageItemId` (string) [✗]: Storage item ID (for file operations)
2162
+
2163
+ - `timing` (object) [✗]: Comprehensive timing breakdown
2164
+
2165
+ - `llmUsage` (object) [✗]: LLM token usage and cost breakdown
2166
+
2167
+ - `resources` (object) [✗]: System resource consumption during job
2168
+
2169
+ - `workerMetrics` (object) [✗]: Worker-specific metrics (varies by worker type)
2170
+
2171
+ - `error` (object) [✗]: Error details if status is failure
2172
+
2173
+ - `environment` (string) [✗]: Deployment environment
2174
+
2175
+ - `region` (string) [✗]: Cloud region/datacenter
2176
+
2177
+ - `workerVersion` (string) [✗]: Worker service version
2178
+
2179
+ - `hostname` (string) [✗]: Pod/container hostname
2180
+
2181
+
2182
+
869
2183
  ## Configuration
870
2184
 
871
2185
  ### Environment Variables
@@ -904,6 +2218,29 @@ new WorkerClient(config: WorkerClientConfig)
904
2218
  - Get the current status of a job
905
2219
 
906
2220
 
2221
+ - `analyticsCollectionRequest(data: AnalyticsCollectionRequestMessage): Promise<JobResponse>`
2222
+ - Request to trigger a manual market data collection job.
2223
+ Used for ad-hoc scraping of specific queries on marketplaces.
2224
+
2225
+
2226
+ - `backendLoggingEvent(data: BackendLoggingEventMessage): Promise<JobResponse>`
2227
+ - Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
2228
+ This event is sent to ELK for centralized monitoring, alerting, and debugging.
2229
+
2230
+ Automatically emitted by the custom Pino logger interceptor when:
2231
+ - logger.warn() is called
2232
+ - logger.error() is called
2233
+ - uncaught exceptions occur
2234
+ - request failures happen (4xx, 5xx responses)
2235
+
2236
+ Used for:
2237
+ - System health monitoring
2238
+ - Error tracking and alerting
2239
+ - Performance degradation detection
2240
+ - Security incident tracking
2241
+ - Compliance and audit trails
2242
+
2243
+
907
2244
  - `etsyAnalyticsSyncCompleted(data: EtsyAnalyticsSyncCompletedMessage): Promise<JobResponse>`
908
2245
  - Contains synced analytics data for Etsy listings. Backend stores this in etsy_analytics_snapshots table and indexes to ELK.
909
2246
 
@@ -927,19 +2264,119 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
927
2264
  - Notifies that a file download has been processed, indicating success or failure.
928
2265
 
929
2266
  - `fileDownloadRequest(data: FileDownloadRequestMessage): Promise<JobResponse>`
930
- - Handles file download requests.
2267
+ - Downloads model file from storage provider to MinIO for processing pipeline.
2268
+ Acts as parent job for thumbnail generation, technical metadata analysis, and metadata generation.
2269
+
2270
+ Retry Configuration:
2271
+ - Automatic retry enabled for transient failures (connection errors, timeouts)
2272
+ - Default: 5 attempts with exponential backoff (2s, 4s, 8s, 16s, 32s)
2273
+ - Retry on: STORAGE_TIMEOUT, NETWORK_ERROR, MINIO_UNAVAILABLE, CONNECTION_REFUSED
2274
+ - No retry on: INVALID_CREDENTIALS, FILE_NOT_FOUND, PERMISSION_DENIED
2275
+
2276
+
2277
+ - `fileVectorizeCompleted(data: FileVectorizeCompletedMessage): Promise<JobResponse>`
2278
+ - Result of the vectorization process containing the embedding vector.
2279
+
2280
+ - `fileVectorizeRequest(data: FileVectorizeRequestMessage): Promise<JobResponse>`
2281
+ - Request to generate a vector embedding for an image file using CLIP.
2282
+
2283
+ - `ipCheckCompleted(data: IpCheckCompletedMessage): Promise<JobResponse>`
2284
+ - Contains IP verification results including trademark risk, copyright risk, detected brands/franchises, and analysis confidence scores
2285
+
2286
+ - `ipCheckRequest(data: IpCheckRequestMessage): Promise<JobResponse>`
2287
+ - Triggers intellectual property verification analysis for a model thumbnail, detecting potential trademark and copyright issues using perceptual hashing, text analysis, and optional reverse image search.
2288
+
2289
+ - `marketplaceConnectionSyncCompleted(data: MarketplaceConnectionSyncCompletedMessage): Promise<JobResponse>`
2290
+ - Notification that marketplace connection sync has completed. Contains updated connection metadata, profile information, and sync statistics.
2291
+
2292
+
2293
+ - `marketplaceConnectionSyncRequest(data: MarketplaceConnectionSyncRequestMessage): Promise<JobResponse>`
2294
+ - Requests synchronization of marketplace connection data including: - Profile information and shop details - Account status and permissions - Available categories and shipping profiles - Rate limits and API quotas
2295
+ This is typically triggered after initial connection or periodically to keep marketplace metadata up to date.
2296
+
2297
+
2298
+ - `marketplaceCredentialRotationCompleted(data: MarketplaceCredentialRotationCompletedMessage): Promise<JobResponse>`
2299
+ - Notification that marketplace credential rotation has completed. Contains the rotation results, new credential metadata, and any issues encountered.
2300
+
2301
+
2302
+ - `marketplaceCredentialRotationRequest(data: MarketplaceCredentialRotationRequestMessage): Promise<JobResponse>`
2303
+ - Requests rotation/refresh of marketplace connection credentials. This is used for: - OAuth token refresh when tokens are near expiry - API key rotation for enhanced security - Re-authentication after connection errors - Scheduled credential updates
2304
+
2305
+
2306
+ - `marketplaceIntelligenceCompleted(data: MarketplaceIntelligenceCompletedMessage): Promise<JobResponse>`
2307
+ - Response from marketplace intelligence scraping.
2308
+ Contains aggregated similarity data from marketplace searches.
2309
+
2310
+ Consumed by worker-backend to update pipeline context before
2311
+ sellability analysis runs.
2312
+
2313
+
2314
+ - `marketplaceIntelligenceEvent(data: MarketplaceIntelligenceEventMessage): Promise<JobResponse>`
2315
+ - Public marketplace intelligence data scraped from external marketplaces.
2316
+
2317
+ This event contains:
2318
+ - Listing details (title, price, images)
2319
+ - Engagement metrics (views, favorites, reviews)
2320
+ - Shop information
2321
+ - Market positioning data
2322
+
2323
+ Unlike marketplace-listing-sync-request (private user data), this focuses on:
2324
+ - Broad market trends and pricing analysis
2325
+ - Competitive intelligence and demand signals
2326
+ - Product popularity and sentiment
2327
+
2328
+ Consumed by worker-analytic-collector for Elasticsearch indexing.
2329
+ Used for market research, pricing optimization, and trend detection.
2330
+
2331
+
2332
+ - `marketplaceIntelligenceRequest(data: MarketplaceIntelligenceRequestMessage): Promise<JobResponse>`
2333
+ - Triggers automated marketplace scraping to find similar/competing listings
2334
+ for a given model. This is a pipeline stage that runs after metadata generation
2335
+ to inform sellability analysis with real market data.
2336
+
2337
+ The worker-analytic-collector (or marketplace-connectors worker) will:
2338
+ 1. Use model metadata (title, tags, category) to build search queries
2339
+ 2. Scrape connected marketplaces (Etsy, eBay, etc.) for similar listings
2340
+ 3. Emit marketplace-intelligence-event results for Elasticsearch indexing
2341
+ 4. Return aggregated similarity data to the pipeline context
2342
+
2343
+ Pipeline integration:
2344
+ - Triggered after: metadata-generation (needs model title/tags/category)
2345
+ - Results feed into: sellability-analysis (market positioning data)
2346
+
2347
+
2348
+ - `marketplaceListingDescriptionGenerationCompleted(data: MarketplaceListingDescriptionGenerationCompletedMessage): Promise<JobResponse>`
2349
+ - Notifies backend that marketplace description generation completed. Contains generated description with metadata tracking (AI model, confidence, generation timestamp) and suggested price.
2350
+
2351
+ - `marketplaceListingDescriptionGenerationRequest(data: MarketplaceListingDescriptionGenerationRequestMessage): Promise<JobResponse>`
2352
+ - Generates SEO-optimized marketplace description for a 3D model using LLM vision analysis. Worker receives model data, technical metadata, and thumbnail URLs to generate compelling product descriptions tailored to the target marketplace.
931
2353
 
932
- - `marketplaceAnalyticsSyncCompleted(data: MarketplaceAnalyticsSyncCompletedMessage): Promise<JobResponse>`
933
- - Contains synced analytics data for marketplace listings. Backend stores this in marketplace_analytics_snapshots table and indexes to ELK. Works with any marketplace provider.
2354
+ - `marketplaceListingSyncCompleted(data: MarketplaceListingSyncCompletedMessage): Promise<JobResponse>`
2355
+ - Notification that marketplace listing sync operation has completed. Contains detailed results of the sync including created/updated listings, errors encountered, and performance statistics.
934
2356
 
935
- - `marketplaceAnalyticsSyncRequest(data: MarketplaceAnalyticsSyncRequestMessage): Promise<JobResponse>`
936
- - Syncs analytics data from marketplace API for one or more listings. Fetches views, favorites, sales, revenue, and traffic source data. Can sync: specific listings, all user listings, or shop-level analytics. Works with any marketplace provider that supports analytics (etsy, ebay, etc.).
937
2357
 
938
- - `marketplacePublishListingCompleted(data: MarketplacePublishListingCompletedMessage): Promise<JobResponse>`
939
- - Indicates completion of marketplace listing publication. Contains external listing ID and URL, or error details if failed. Works with any marketplace provider (etsy, ebay, etc.).
2358
+ - `marketplaceListingSyncRequest(data: MarketplaceListingSyncRequestMessage): Promise<JobResponse>`
2359
+ - Requests synchronization of marketplace listings for a connection. Can sync specific listings or all listings for a marketplace connection.
2360
+ Includes bidirectional sync: - Pull: Fetch listings from marketplace to update local database - Push: Update marketplace listings with local changes - Full: Both pull and push operations
940
2361
 
941
- - `marketplacePublishListingRequest(data: MarketplacePublishListingRequestMessage): Promise<JobResponse>`
942
- - Publishes a single metamodel listing to a marketplace for a specific material variant. Creates listing, uploads digital file, and returns external listing ID. This message is enqueued for EACH material variant when publishing a metamodel. The marketplace type (etsy, ebay, etc.) is determined by the marketplaceProvider field.
2362
+
2363
+ - `marketplaceListingTagsGenerationCompleted(data: MarketplaceListingTagsGenerationCompletedMessage): Promise<JobResponse>`
2364
+ - Notifies backend that marketplace tags generation completed. Contains generated tags optimized for discoverability with metadata tracking.
2365
+
2366
+ - `marketplaceListingTagsGenerationRequest(data: MarketplaceListingTagsGenerationRequestMessage): Promise<JobResponse>`
2367
+ - Generates searchability tags for a 3D model optimized for marketplace discoverability. Worker creates style, technical, and usage keywords following marketplace tag limits and SEO best practices.
2368
+
2369
+ - `marketplaceListingTitleGenerationCompleted(data: MarketplaceListingTitleGenerationCompletedMessage): Promise<JobResponse>`
2370
+ - Notifies backend that marketplace title generation completed. Contains generated title with metadata tracking.
2371
+
2372
+ - `marketplaceListingTitleGenerationRequest(data: MarketplaceListingTitleGenerationRequestMessage): Promise<JobResponse>`
2373
+ - Generates marketplace-optimized title for a 3D model. Worker creates concise, SEO-friendly titles following marketplace character limits and best practices.
2374
+
2375
+ - `marketplaceListingUpdateCompleted(data: MarketplaceListingUpdateCompletedMessage): Promise<JobResponse>`
2376
+ - Result of a listing update operation
2377
+
2378
+ - `marketplaceListingUpdateRequest(data: MarketplaceListingUpdateRequestMessage): Promise<JobResponse>`
2379
+ - Request to update an existing listing on a marketplace (price, quantity, etc.)
943
2380
 
944
2381
  - `mediaBatchDownloadCompleted(data: MediaBatchDownloadCompletedMessage): Promise<JobResponse>`
945
2382
  - Notifies that a batch media download has been completed.
@@ -954,6 +2391,14 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
954
2391
  - `metamodelMetadataGenerationRequest(data: MetamodelMetadataGenerationRequestMessage): Promise<JobResponse>`
955
2392
  - Handles metamodel metadata generation requests via Ollama. Aggregates data from constituent models and generates AI-enhanced metadata.
956
2393
 
2394
+ - `modelAnalyticsCollectionRequest(data: ModelAnalyticsCollectionRequestMessage): Promise<JobResponse>`
2395
+ - Request to collect marketplace analytics for a specific metamodel.
2396
+ Triggered by backend scheduler every 6 hours for popular/tagged metamodels.
2397
+
2398
+ Worker performs targeted market searches based on metamodel metadata
2399
+ and stores aggregated statistics in Elasticsearch for trend analysis.
2400
+
2401
+
957
2402
  - `modelDiscoveryFolderProcessedEvent(data: ModelDiscoveryFolderProcessedEventMessage): Promise<JobResponse>`
958
2403
  - Handles model discovery folder processed events.
959
2404
 
@@ -966,11 +2411,20 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
966
2411
  - `modelDiscoveryScanRequest(data: ModelDiscoveryScanRequestMessage): Promise<JobResponse>`
967
2412
  - Handles model discovery scan requests events.
968
2413
 
2414
+ - `modelFinderIndexRequest(data: ModelFinderIndexRequestMessage): Promise<JobResponse>`
2415
+ - DEPRECATED (2026-02-18) — FR-023 retired. Merge 3D rendering into worker-file-vectorize.
2416
+
2417
+ - `modelFinderResponse(data: ModelFinderResponseMessage): Promise<JobResponse>`
2418
+ - DEPRECATED (2026-02-18) — FR-023 retired. Merge 3D rendering into worker-file-vectorize.
2419
+
2420
+ - `modelFinderSearchRequest(data: ModelFinderSearchRequestMessage): Promise<JobResponse>`
2421
+ - DEPRECATED (2026-02-18) — FR-023 retired. Merge 3D rendering into worker-file-vectorize.
2422
+
969
2423
  - `modelMetadataGenerationCompleted(data: ModelMetadataGenerationCompletedMessage): Promise<JobResponse>`
970
- - Handles model metadata generation completed.
2424
+ - Notifies backend that enriched marketplace metadata generation completed. Backend updates Model entity with generated description, tags, classification, etc.
971
2425
 
972
2426
  - `modelMetadataGenerationRequest(data: ModelMetadataGenerationRequestMessage): Promise<JobResponse>`
973
- - Handles model metadata generation requests.
2427
+ - Generates enriched marketplace metadata (SEO descriptions, tags, categories) for 3D models using LLM vision analysis. Worker receives all necessary data in the payload (Model, TechnicalMetadata, Thumbnails) and does NOT query the database. Prerequisites: file download, technical metadata, and thumbnail generation must be complete before this message is sent.
974
2428
 
975
2429
  - `modelMetamodelDetectionFound(data: ModelMetamodelDetectionFoundMessage): Promise<JobResponse>`
976
2430
  - Handles model metamodel detection found with hierarchical relationships.
@@ -978,23 +2432,93 @@ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
978
2432
  - `modelMetamodelDetectionRequest(data: ModelMetamodelDetectionRequestMessage): Promise<JobResponse>`
979
2433
  - Handles model metamodel detection requests.
980
2434
 
2435
+ - `modelPrintAnalysisCompleted(data: ModelPrintAnalysisCompletedMessage): Promise<JobResponse>`
2436
+ - Reports completion of 3D print analysis — contains estimation, printability, and cost breakdown per FR-022
2437
+
2438
+ - `modelPrintAnalysisRequest(data: ModelPrintAnalysisRequestMessage): Promise<JobResponse>`
2439
+ - Triggers 3D print analysis for a model — estimates print time, material usage, support needs, and cost breakdown per FR-022
2440
+
981
2441
  - `modelSellabilityAnalysisCompleted(data: ModelSellabilityAnalysisCompletedMessage): Promise<JobResponse>`
982
2442
  - Contains sellability analysis results including Etsy-specific recommendations, material pricing, and marketplace compatibility scores
983
2443
 
984
2444
  - `modelSellabilityAnalysisRequest(data: ModelSellabilityAnalysisRequestMessage): Promise<JobResponse>`
985
2445
  - Analyzes a metamodel to determine sellability score, pricing recommendations, and optimal marketplace selection. Enhanced with Etsy-specific analysis including competitor pricing, category demand trends, and material suitability.
986
2446
 
2447
+ - `modelSemanticAnalysisCompleted(data: ModelSemanticAnalysisCompletedMessage): Promise<JobResponse>`
2448
+ - Handles completion of 3D model semantic analysis with generated tags and similarity results.
2449
+
2450
+ - `modelSemanticAnalysisRequest(data: ModelSemanticAnalysisRequestMessage): Promise<JobResponse>`
2451
+ - Handles 3D model semantic analysis requests using ULIP-2 neural networks and FAISS vector similarity search.
2452
+
987
2453
  - `modelTechnicalMetadataCompleted(data: ModelTechnicalMetadataCompletedMessage): Promise<JobResponse>`
988
2454
  - Reports comprehensive results of technical metadata analysis including geometry, quality metrics, and print-readiness assessment
989
2455
 
990
2456
  - `modelTechnicalMetadataRequest(data: ModelTechnicalMetadataRequestMessage): Promise<JobResponse>`
991
2457
  - Triggers comprehensive technical analysis of a 3D model file to extract geometry, quality metrics, and print-readiness information
992
2458
 
2459
+ - `slicingFdmRequest(data: SlicingFdmRequestMessage): Promise<JobResponse>`
2460
+ - Request FDM slicing simulation via OrcaSlicer (preferred) or heuristic fallback. Accepts OrcaSlicer-compatible printer/process/filament JSON profiles.
2461
+
2462
+ - `slicingFdmResult(data: SlicingFdmResultMessage): Promise<JobResponse>`
2463
+ - Result of FDM slicing simulation from OrcaSlicer (toolpath) or heuristic fallback. Contains exact physical metrics for cost calculation.
2464
+
2465
+ - `slicingSlaRequest(data: SlicingSlaRequestMessage): Promise<JobResponse>`
2466
+ - Request SLA/MSLA slicing simulation via PySLM cross-sectional analysis. Accepts resin printer profile with exposure, lift, and layer parameters.
2467
+
2468
+ - `slicingSlaResult(data: SlicingSlaResultMessage): Promise<JobResponse>`
2469
+ - Result of SLA/MSLA slicing simulation from PySLM cross-sectional analysis. Contains exact resin usage and print time metrics.
2470
+
2471
+ - `textureGenerationCompleted(data: TextureGenerationCompletedMessage): Promise<JobResponse>`
2472
+ - Emitted when AI texture generation completes (success or failure). Contains artifact S3 URLs on success, or error details on failure. The credit reservation should be confirmed (success) or released (failure) based on the status.
2473
+
2474
+ - `textureGenerationRequest(data: TextureGenerationRequestMessage): Promise<JobResponse>`
2475
+ - Request AI-powered texture generation for a 3D model. Requires a mesh file URL and a text prompt describing the desired texture. Credits are reserved before dispatch.
2476
+
993
2477
  - `thumbnailGenerationCompleted(data: ThumbnailGenerationCompletedMessage): Promise<JobResponse>`
994
2478
  - Handles thumbnail generation completed.
995
2479
 
996
2480
  - `thumbnailGenerationRequest(data: ThumbnailGenerationRequestMessage): Promise<JobResponse>`
997
- - Handles thumbnail generation requests with customization options.
2481
+ - Handles thumbnail generation requests with customization options. Supports both storage provider downloads and MinIO-cached files.
2482
+
2483
+ - `userEngagementEvent(data: UserEngagementEventMessage): Promise<JobResponse>`
2484
+ - User engagement and onboarding tracking events for analytics and behavioral insights.
2485
+
2486
+ Captures key user actions throughout their journey:
2487
+ - Account creation and onboarding steps
2488
+ - Feature usage and adoption
2489
+ - Model management activities
2490
+ - Marketplace interactions
2491
+ - Subscription changes
2492
+
2493
+ Used for:
2494
+ - User onboarding funnel analysis
2495
+ - Feature adoption tracking
2496
+ - User retention metrics
2497
+ - A/B testing and experimentation
2498
+ - Personalization and recommendations
2499
+ - Product analytics dashboards
2500
+
2501
+
2502
+ - `workerAnalyticsEvent(data: WorkerAnalyticsEventMessage): Promise<JobResponse>`
2503
+ - Analytics event emitted by workers for tracking processing metrics, user behavior,
2504
+ and model statistics. Consumed by worker-analytic-collector and forwarded to ELK.
2505
+
2506
+ All workers MUST emit this event upon job completion (success or failure).
2507
+ Each worker includes its specific metrics in the `metrics` object.
2508
+
2509
+
2510
+ - `workerMetricsEnrichedEvent(data: WorkerMetricsEnrichedEventMessage): Promise<JobResponse>`
2511
+ - Enriched metrics event for detailed worker monitoring, cost tracking,
2512
+ and performance analysis. Published to backend.logging.events for
2513
+ centralized monitoring and cost attribution.
2514
+
2515
+ This event is emitted by all workers on job completion and includes:
2516
+ - LLM token usage and cost breakdown
2517
+ - System resource consumption (CPU, RAM, disk I/O)
2518
+ - Detailed timing breakdown by stage
2519
+ - User and context attribution
2520
+ - Model-specific metadata
2521
+
998
2522
 
999
2523
 
1000
2524
  ### Response Types