@mesh-sync/worker-backend-client 1.0.5 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -100,6 +100,194 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
100
100
  ## Available Message Types
101
101
 
102
102
 
103
+ ### backend-logging-event
104
+
105
+ **Description:** Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
106
+ This event is sent to ELK for centralized monitoring, alerting, and debugging.
107
+
108
+ Automatically emitted by the custom Pino logger interceptor when:
109
+ - logger.warn() is called
110
+ - logger.error() is called
111
+ - uncaught exceptions occur
112
+ - request failures happen (4xx, 5xx responses)
113
+
114
+ Used for:
115
+ - System health monitoring
116
+ - Error tracking and alerting
117
+ - Performance degradation detection
118
+ - Security incident tracking
119
+ - Compliance and audit trails
120
+
121
+
122
+ **Method:** `client.backendLoggingEvent(data)`
123
+
124
+ **Payload Type:** `BackendLoggingEventMessage`
125
+
126
+ **Fields:**
127
+
128
+ - `eventType` (string) [✓]: Type of logging event
129
+
130
+ - `timestamp` (string) [✓]: ISO 8601 timestamp when the log was generated
131
+
132
+ - `level` (string) [✓]: Log level severity
133
+
134
+ - `message` (string) [✓]: Human-readable log message
135
+
136
+ - `context` (string) [✓]: Logger context (typically the class/service name)
137
+
138
+ - `requestId` (string) [✗]: Unique request ID for correlation (X-Request-Id header)
139
+
140
+ - `userId` (string) [✗]: ID of the authenticated user (if available)
141
+
142
+ - `httpMethod` (string) [✗]: HTTP method of the request
143
+
144
+ - `httpUrl` (string) [✗]: Request URL path (without query params for privacy)
145
+
146
+ - `httpStatusCode` (integer) [✗]: HTTP response status code
147
+
148
+ - `errorType` (string) [✗]: Error class/type name
149
+
150
+ - `errorStack` (string) [✗]: Stack trace (sanitized, no sensitive data)
151
+
152
+ - `errorCode` (string) [✗]: Application-specific error code for categorization
153
+
154
+ - `metadata` (object) [✗]: Additional structured context (sanitized, no PII)
155
+
156
+ - `environment` (string) [✗]: Deployment environment
157
+
158
+ - `serviceVersion` (string) [✗]: Backend service version
159
+
160
+ - `hostname` (string) [✗]: Server hostname/pod name
161
+
162
+ - `durationMs` (number) [✗]: Operation duration in milliseconds (if applicable)
163
+
164
+
165
+
166
+ ### etsy-analytics-sync-completed
167
+
168
+ **Description:** Contains synced analytics data for Etsy listings. Backend stores this in etsy_analytics_snapshots table and indexes to ELK.
169
+
170
+
171
+ **Method:** `client.etsyAnalyticsSyncCompleted(data)`
172
+
173
+ **Payload Type:** `EtsyAnalyticsSyncCompletedMessage`
174
+
175
+ **Fields:**
176
+
177
+ - `originalJobId` (string) [✗]:
178
+
179
+ - `status` (string) [✗]:
180
+
181
+ - `syncedCount` (integer) [✗]: Number of listings successfully synced
182
+
183
+ - `errorCount` (integer) [✗]: Number of listings that failed
184
+
185
+ - `results` (array) [✗]: Analytics for each synced listing
186
+
187
+ - `errors` (array) [✗]: Errors for failed listings
188
+
189
+ - `syncedAt` (string) [✗]:
190
+
191
+ - `nextScheduledSync` (string) [✗]: When next automatic sync should occur
192
+
193
+
194
+
195
+ ### etsy-analytics-sync-request
196
+
197
+ **Description:** Syncs analytics data from Etsy API for one or more listings. Fetches views, favorites, sales, revenue, and traffic source data.
198
+ Can sync: - Specific listings (provide listingIds) - All user listings (provide userId, empty listingIds) - Shop-level analytics (provide shopId)
199
+
200
+
201
+ **Method:** `client.etsyAnalyticsSyncRequest(data)`
202
+
203
+ **Payload Type:** `EtsyAnalyticsSyncRequestMessage`
204
+
205
+ **Fields:**
206
+
207
+ - `listingIds` (array) [✗]: Internal listing IDs to sync. Empty = sync all for user.
208
+
209
+ - `userId` (string) [✗]: User whose listings to sync (if listingIds empty)
210
+
211
+ - `shopId` (string) [✗]: Etsy shop ID for shop-level analytics
212
+
213
+ - `timeRange` (object) [✗]: Date range for historical analytics
214
+
215
+ - `syncOptions` (object) [✗]:
216
+
217
+ - `etsyCredentials` (object) [✗]: Encrypted Etsy OAuth credentials
218
+
219
+ - `webhookUrl` (string) [✗]:
220
+
221
+
222
+
223
+ ### etsy-publish-listing-completed
224
+
225
+ **Description:** Indicates completion of Etsy listing publication. Contains external Etsy listing ID and URL, or error details if failed.
226
+
227
+
228
+ **Method:** `client.etsyPublishListingCompleted(data)`
229
+
230
+ **Payload Type:** `EtsyPublishListingCompletedMessage`
231
+
232
+ **Fields:**
233
+
234
+ - `originalJobId` (string) [✗]: BullMQ job ID from request
235
+
236
+ - `listingId` (string) [✗]: Internal marketplace_items ID
237
+
238
+ - `metamodelId` (string) [✗]: Metamodel that was published
239
+
240
+ - `materialName` (string) [✗]: Material variant name
241
+
242
+ - `status` (string) [✗]: Publication result
243
+
244
+ - `etsyListingId` (string) [✗]: External Etsy listing ID (only if status=SUCCESS)
245
+
246
+ - `etsyListingUrl` (string) [✗]: URL to view listing on Etsy (only if status=SUCCESS)
247
+
248
+ - `etsyFileId` (string) [✗]: Etsy digital file ID (only if status=SUCCESS)
249
+
250
+ - `error` (object) [✗]: Error details (only if status=FAILED)
251
+
252
+ - `publishedAt` (string) [✗]: When the listing was created (only if status=SUCCESS)
253
+
254
+ - `processingDuration` (integer) [✗]: Processing time in milliseconds
255
+
256
+
257
+
258
+ ### etsy-publish-listing-request
259
+
260
+ **Description:** Publishes a single metamodel listing to Etsy for a specific material variant. Creates Etsy listing, uploads digital file, and returns external listing ID.
261
+ This message is enqueued for EACH material variant when publishing a metamodel.
262
+ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
263
+
264
+
265
+ **Method:** `client.etsyPublishListingRequest(data)`
266
+
267
+ **Payload Type:** `EtsyPublishListingRequestMessage`
268
+
269
+ **Fields:**
270
+
271
+ - `listingId` (string) [✗]: Internal marketplace_items table ID
272
+
273
+ - `metamodelId` (string) [✗]: Metamodel being published
274
+
275
+ - `ownerId` (string) [✗]: User ID who owns the metamodel
276
+
277
+ - `materialVariant` (object) [✗]: Material-specific listing configuration
278
+
279
+ - `baseListingData` (object) [✗]: Common listing information
280
+
281
+ - `publishOptions` (object) [✗]:
282
+
283
+ - `etsyCredentials` (object) [✗]: Encrypted Etsy OAuth credentials
284
+
285
+ - `fileMetadata` (object) [✗]: Digital file to upload
286
+
287
+ - `webhookUrl` (string) [✗]: Callback URL for completion notification
288
+
289
+
290
+
103
291
  ### file-download-completed
104
292
 
105
293
  **Description:** Notifies that a file download has been processed, indicating success or failure.
@@ -126,7 +314,7 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
126
314
 
127
315
  ### file-download-request
128
316
 
129
- **Description:** Handles file download requests.
317
+ **Description:** Downloads model file from storage provider to MinIO for processing pipeline. Acts as parent job for thumbnail generation, technical metadata analysis, and metadata generation.
130
318
 
131
319
  **Method:** `client.fileDownloadRequest(data)`
132
320
 
@@ -136,8 +324,368 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
136
324
 
137
325
  - `modelId` (string) [✗]: The unique identifier for the model to be downloaded.
138
326
 
327
+ - `ownerId` (string) [✗]: The identifier of the user who owns the model.
328
+
139
329
  - `storageLocation` (object) [✗]: The storage location of the model.
140
330
 
331
+ - `minioDestination` (object) [✗]: Destination in MinIO where file will be uploaded after download.
332
+
333
+ - `autoEnqueueChildren` (boolean) [✗]: Automatically enqueue thumbnail generation, technical metadata analysis, and metadata generation jobs after download completes.
334
+
335
+ - `previewType` (string) [✗]: Preview type for thumbnail generation (passed to child job).
336
+
337
+ - `generate360Views` (boolean) [✗]: Generate 16 angle views for 360° preview (passed to child job).
338
+
339
+
340
+
341
+ ### marketplace-analytics-sync-completed
342
+
343
+ **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.
344
+
345
+ **Method:** `client.marketplaceAnalyticsSyncCompleted(data)`
346
+
347
+ **Payload Type:** `MarketplaceAnalyticsSyncCompletedMessage`
348
+
349
+ **Fields:**
350
+
351
+ - `originalJobId` (string) [✗]: BullMQ job ID from original request
352
+
353
+ - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
354
+
355
+ - `status` (string) [✗]: Sync result (SUCCESS, PARTIAL_SUCCESS, or FAILED)
356
+
357
+ - `syncedCount` (integer) [✗]: Number of listings successfully synced
358
+
359
+ - `errorCount` (integer) [✗]: Number of listings that failed
360
+
361
+ - `results` (array) [✗]: Analytics for each synced listing
362
+
363
+ - `errors` (array) [✗]: Errors for failed listings
364
+
365
+ - `syncedAt` (string) [✗]: When sync completed (ISO 8601)
366
+
367
+ - `nextScheduledSync` (string) [✗]: When next automatic sync should occur (ISO 8601)
368
+
369
+
370
+
371
+ ### marketplace-analytics-sync-request
372
+
373
+ **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.).
374
+
375
+ **Method:** `client.marketplaceAnalyticsSyncRequest(data)`
376
+
377
+ **Payload Type:** `MarketplaceAnalyticsSyncRequestMessage`
378
+
379
+ **Fields:**
380
+
381
+ - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
382
+
383
+ - `marketplaceConnectionId` (string) [✗]: UUID of the marketplace connection configuration
384
+
385
+ - `listingIds` (array) [✗]: Internal listing UUIDs to sync. Empty array = sync all for user.
386
+
387
+ - `userId` (string) [✗]: UUID of user whose listings to sync (if listingIds empty)
388
+
389
+ - `externalShopId` (string) [✗]: External marketplace shop ID for shop-level analytics
390
+
391
+ - `timeRange` (object) [✗]: Date range for historical analytics
392
+
393
+ - `syncOptions` (object) [✗]: Optional sync configuration
394
+
395
+ - `marketplaceCredentials` (object) [✗]: Encrypted marketplace credentials (retrieved from marketplaceConnectionId)
396
+
397
+ - `webhookUrl` (string) [✗]: Callback URL for completion notification
398
+
399
+
400
+
401
+ ### marketplace-connection-sync-completed
402
+
403
+ **Description:** Notification that marketplace connection sync has completed. Contains updated connection metadata, profile information, and sync statistics.
404
+
405
+
406
+ **Method:** `client.marketplaceConnectionSyncCompleted(data)`
407
+
408
+ **Payload Type:** `MarketplaceConnectionSyncCompletedMessage`
409
+
410
+ **Fields:**
411
+
412
+ - `requestId` (string) [✗]: Original request ID for correlation
413
+
414
+ - `connectionId` (string) [✗]: Marketplace connection that was synced
415
+
416
+ - `marketplaceId` (string) [✗]: Marketplace provider ID
417
+
418
+ - `userId` (string) [✗]: Connection owner user ID
419
+
420
+ - `status` (string) [✗]: Overall sync result status
421
+
422
+ - `syncType` (string) [✗]: Type of sync that was performed
423
+
424
+ - `connectionData` (object) [✗]: Updated connection information
425
+
426
+ - `categories` (array) [✗]: Available marketplace categories
427
+
428
+ - `statistics` (object) [✗]: Sync operation statistics
429
+
430
+ - `completedAt` (string) [✗]: When sync completed
431
+
432
+ - `error` (object) [✗]: Error details if sync failed
433
+
434
+
435
+
436
+ ### marketplace-connection-sync-request
437
+
438
+ **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
439
+ This is typically triggered after initial connection or periodically to keep marketplace metadata up to date.
440
+
441
+
442
+ **Method:** `client.marketplaceConnectionSyncRequest(data)`
443
+
444
+ **Payload Type:** `MarketplaceConnectionSyncRequestMessage`
445
+
446
+ **Fields:**
447
+
448
+ - `connectionId` (string) [✗]: Internal marketplace connection ID
449
+
450
+ - `marketplaceId` (string) [✗]: Marketplace provider ID (etsy, ebay, etc.)
451
+
452
+ - `userId` (string) [✗]: User who owns this connection
453
+
454
+ - `syncType` (string) [✗]: Type of sync to perform
455
+
456
+ - `priority` (string) [✗]: Processing priority
457
+
458
+ - `requestId` (string) [✗]: Unique request identifier for tracking
459
+
460
+ - `webhookUrl` (string) [✗]: Webhook URL to call when sync completes
461
+
462
+ - `metadata` (object) [✗]: Additional context data
463
+
464
+
465
+
466
+ ### marketplace-credential-rotation-completed
467
+
468
+ **Description:** Notification that marketplace credential rotation has completed. Contains the rotation results, new credential metadata, and any issues encountered.
469
+
470
+
471
+ **Method:** `client.marketplaceCredentialRotationCompleted(data)`
472
+
473
+ **Payload Type:** `MarketplaceCredentialRotationCompletedMessage`
474
+
475
+ **Fields:**
476
+
477
+ - `requestId` (string) [✗]: Original rotation request ID
478
+
479
+ - `connectionId` (string) [✗]: Marketplace connection that was rotated
480
+
481
+ - `marketplaceId` (string) [✗]: Marketplace provider ID
482
+
483
+ - `userId` (string) [✗]: Connection owner user ID
484
+
485
+ - `status` (string) [✗]: Overall rotation operation status
486
+
487
+ - `rotationType` (string) [✗]: Type of rotation that was performed
488
+
489
+ - `reason` (string) [✗]: Original reason for rotation
490
+
491
+ - `newCredentials` (object) [✗]: Metadata about new credentials
492
+
493
+ - `oldCredentials` (object) [✗]: Status of previous credentials
494
+
495
+ - `operationDetails` (object) [✗]: Details of the rotation operation
496
+
497
+ - `connectionStatus` (object) [✗]: Connection status after credential rotation
498
+
499
+ - `nextRotation` (object) [✗]: Information about next scheduled rotation
500
+
501
+ - `error` (object) [✗]: Error details if rotation failed
502
+
503
+ - `notifications` (array) [✗]: Notifications sent as part of rotation
504
+
505
+
506
+
507
+ ### marketplace-credential-rotation-request
508
+
509
+ **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
510
+
511
+
512
+ **Method:** `client.marketplaceCredentialRotationRequest(data)`
513
+
514
+ **Payload Type:** `MarketplaceCredentialRotationRequestMessage`
515
+
516
+ **Fields:**
517
+
518
+ - `connectionId` (string) [✗]: Marketplace connection ID requiring credential rotation
519
+
520
+ - `marketplaceId` (string) [✗]: Marketplace provider ID (etsy, ebay, etc.)
521
+
522
+ - `userId` (string) [✗]: User who owns the connection
523
+
524
+ - `rotationType` (string) [✗]: Type of credential rotation to perform
525
+
526
+ - `reason` (string) [✗]: Reason for credential rotation
527
+
528
+ - `urgency` (string) [✗]: How urgently the rotation is needed
529
+
530
+ - `currentCredentials` (object) [✗]: Current credential metadata (no actual secrets)
531
+
532
+ - `options` (object) [✗]: Rotation configuration options
533
+
534
+ - `requestId` (string) [✗]: Unique request identifier
535
+
536
+ - `webhookUrl` (string) [✗]: Webhook URL for completion notification
537
+
538
+ - `scheduledAt` (string) [✗]: When this rotation was scheduled (if scheduled)
539
+
540
+ - `metadata` (object) [✗]: Additional request context
541
+
542
+
543
+
544
+ ### marketplace-listing-sync-completed
545
+
546
+ **Description:** Notification that marketplace listing sync operation has completed. Contains detailed results of the sync including created/updated listings, errors encountered, and performance statistics.
547
+
548
+
549
+ **Method:** `client.marketplaceListingSyncCompleted(data)`
550
+
551
+ **Payload Type:** `MarketplaceListingSyncCompletedMessage`
552
+
553
+ **Fields:**
554
+
555
+ - `requestId` (string) [✗]: Original request ID for correlation
556
+
557
+ - `connectionId` (string) [✗]: Marketplace connection that was synced
558
+
559
+ - `marketplaceId` (string) [✗]: Marketplace provider ID
560
+
561
+ - `userId` (string) [✗]: Connection owner user ID
562
+
563
+ - `status` (string) [✗]: Overall sync operation status
564
+
565
+ - `syncDirection` (string) [✗]: Direction of sync that was performed
566
+
567
+ - `statistics` (object) [✗]: Detailed sync operation statistics
568
+
569
+ - `results` (object) [✗]: Detailed sync results by operation
570
+
571
+ - `successfulListings` (array) [✗]: Details of successfully processed listings
572
+
573
+ - `failedListings` (array) [✗]: Details of listings that failed to sync
574
+
575
+ - `errors` (array) [✗]: Non-listing-specific errors encountered
576
+
577
+ - `completedAt` (string) [✗]: When sync operation completed
578
+
579
+ - `nextSyncRecommendedAt` (string) [✗]: When next sync is recommended
580
+
581
+
582
+
583
+ ### marketplace-listing-sync-request
584
+
585
+ **Description:** Requests synchronization of marketplace listings for a connection. Can sync specific listings or all listings for a marketplace connection.
586
+ 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
587
+
588
+
589
+ **Method:** `client.marketplaceListingSyncRequest(data)`
590
+
591
+ **Payload Type:** `MarketplaceListingSyncRequestMessage`
592
+
593
+ **Fields:**
594
+
595
+ - `connectionId` (string) [✗]: Marketplace connection ID
596
+
597
+ - `marketplaceId` (string) [✗]: Marketplace provider ID (etsy, ebay, etc.)
598
+
599
+ - `userId` (string) [✗]: User who owns the connection
600
+
601
+ - `syncDirection` (string) [✗]: Direction of sync operation
602
+
603
+ - `syncScope` (string) [✗]: Scope of listings to sync
604
+
605
+ - `listingIds` (array) [✗]: Specific listing IDs to sync (if syncScope=specific)
606
+
607
+ - `externalListingIds` (array) [✗]: External marketplace listing IDs to sync
608
+
609
+ - `options` (object) [✗]: Sync configuration options
610
+
611
+ - `priority` (string) [✗]: Processing priority
612
+
613
+ - `requestId` (string) [✗]: Unique request identifier
614
+
615
+ - `webhookUrl` (string) [✗]: Webhook URL for completion notification
616
+
617
+ - `metadata` (object) [✗]: Additional request context
618
+
619
+
620
+
621
+ ### marketplace-publish-listing-completed
622
+
623
+ **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.).
624
+
625
+ **Method:** `client.marketplacePublishListingCompleted(data)`
626
+
627
+ **Payload Type:** `MarketplacePublishListingCompletedMessage`
628
+
629
+ **Fields:**
630
+
631
+ - `originalJobId` (string) [✗]: BullMQ job ID from original request
632
+
633
+ - `listingId` (string) [✗]: Internal marketplace_items UUID
634
+
635
+ - `metamodelId` (string) [✗]: UUID of the metamodel that was published
636
+
637
+ - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
638
+
639
+ - `materialName` (string) [✗]: Material variant name
640
+
641
+ - `status` (string) [✗]: Publication result (SUCCESS or FAILED)
642
+
643
+ - `externalListingId` (string) [✗]: External marketplace listing ID (only if status=SUCCESS)
644
+
645
+ - `externalListingUrl` (string) [✗]: URL to view listing on marketplace (only if status=SUCCESS)
646
+
647
+ - `externalFileId` (string) [✗]: External marketplace file ID (only if status=SUCCESS)
648
+
649
+ - `error` (object) [✗]: Error details (only if status=FAILED)
650
+
651
+ - `publishedAt` (string) [✗]: When the listing was created (ISO 8601, only if status=SUCCESS)
652
+
653
+ - `processingDuration` (integer) [✗]: Processing time in milliseconds
654
+
655
+
656
+
657
+ ### marketplace-publish-listing-request
658
+
659
+ **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.
660
+
661
+ **Method:** `client.marketplacePublishListingRequest(data)`
662
+
663
+ **Payload Type:** `MarketplacePublishListingRequestMessage`
664
+
665
+ **Fields:**
666
+
667
+ - `listingId` (string) [✗]: Internal marketplace_items table UUID
668
+
669
+ - `metamodelId` (string) [✗]: UUID of the metamodel being published
670
+
671
+ - `ownerId` (string) [✗]: UUID of the user who owns the metamodel
672
+
673
+ - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, leboncoin, etc.)
674
+
675
+ - `marketplaceConnectionId` (string) [✗]: UUID of the marketplace connection configuration
676
+
677
+ - `materialVariant` (object) [✗]: Material-specific listing configuration
678
+
679
+ - `baseListingData` (object) [✗]: Common listing information shared across variants
680
+
681
+ - `publishOptions` (object) [✗]: Publishing configuration (marketplace-specific options)
682
+
683
+ - `marketplaceCredentials` (object) [✗]: Encrypted marketplace credentials (retrieved from marketplaceConnectionId)
684
+
685
+ - `fileMetadata` (object) [✗]: Digital file to upload
686
+
687
+ - `webhookUrl` (string) [✗]: Callback URL for completion notification
688
+
141
689
 
142
690
 
143
691
  ### media-batch-download-completed
@@ -233,6 +781,43 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
233
781
 
234
782
 
235
783
 
784
+ ### model-analytics-collection-request
785
+
786
+ **Description:** Request to collect marketplace analytics for a specific metamodel.
787
+ Triggered by backend scheduler every 6 hours for popular/tagged metamodels.
788
+
789
+ Worker performs targeted market searches based on metamodel metadata
790
+ and stores aggregated statistics in Elasticsearch for trend analysis.
791
+
792
+
793
+ **Method:** `client.modelAnalyticsCollectionRequest(data)`
794
+
795
+ **Payload Type:** `ModelAnalyticsCollectionRequestMessage`
796
+
797
+ **Fields:**
798
+
799
+ - `metamodelId` (string) [✓]: The metamodel ID to collect analytics for
800
+
801
+ - `ownerId` (string) [✓]: Owner user ID for audit trail
802
+
803
+ - `primaryCategory` (string) [✗]: Primary classification category (e.g., "miniature", "terrain")
804
+
805
+ - `subCategory` (string) [✗]: Sub-category for more specific targeting
806
+
807
+ - `tags` (array) [✗]: Relevant tags from metamodel metadata (max 10)
808
+
809
+ - `franchise` (string) [✗]: Franchise name if detected (e.g., "Dungeons & Dragons")
810
+
811
+ - `confidence` (number) [✗]: Classification confidence score
812
+
813
+ - `priority` (string) [✗]: Collection priority level
814
+
815
+ - `triggeredBy` (string) [✗]: Source of trigger (e.g., "backend-scheduler", "manual")
816
+
817
+ - `triggeredAt` (string) [✗]: Timestamp when collection was triggered
818
+
819
+
820
+
236
821
  ### model-discovery-folder-processed-event
237
822
 
238
823
  **Description:** Handles model discovery folder processed events.
@@ -339,7 +924,7 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
339
924
 
340
925
  ### model-metadata-generation-request
341
926
 
342
- **Description:** Handles model metadata generation requests.
927
+ **Description:** Handles model metadata generation requests. Supports both storage provider downloads and MinIO-cached files.
343
928
 
344
929
  **Method:** `client.modelMetadataGenerationRequest(data)`
345
930
 
@@ -349,9 +934,13 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
349
934
 
350
935
  - `modelId` (string) [✗]: The unique identifier for the model.
351
936
 
352
- - `storageConnectionId` (string) [✗]: The ID of the storage connection.
937
+ - `ownerId` (string) [✗]: The identifier of the user who owns the model.
353
938
 
354
- - `filePath` (string) [✗]: The path to the model file.
939
+ - `storageConnectionId` (string) [✗]: The ID of the storage connection (legacy - used if minioPath not provided).
940
+
941
+ - `filePath` (string) [✗]: The path to the model file (legacy - used if minioPath not provided).
942
+
943
+ - `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.
355
944
 
356
945
  - `fileName` (string) [✗]: The name of the model file.
357
946
 
@@ -361,6 +950,8 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
361
950
 
362
951
  - `storageProviderType` (string) [✗]: The type of the storage provider.
363
952
 
953
+ - `parentJobId` (string) [✗]: ID of parent file-download job (for BullMQ dependency tracking).
954
+
364
955
  - `modelThumbnailUrl` (string) [✗]: The URL of the model thumbnail.
365
956
 
366
957
  - `metamodel` (object) [✗]: The metamodel of the model.
@@ -405,6 +996,120 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
405
996
 
406
997
 
407
998
 
999
+ ### model-sellability-analysis-completed
1000
+
1001
+ **Description:** Contains sellability analysis results including Etsy-specific recommendations, material pricing, and marketplace compatibility scores
1002
+
1003
+ **Method:** `client.modelSellabilityAnalysisCompleted(data)`
1004
+
1005
+ **Payload Type:** `ModelSellabilityAnalysisCompletedMessage`
1006
+
1007
+ **Fields:**
1008
+
1009
+ - `metamodelId` (string) [✗]: Metamodel UUID
1010
+
1011
+ - `ownerId` (string) [✗]: Owner user ID
1012
+
1013
+ - `sellabilityScore` (number) [✗]: Overall sellability score (0-100)
1014
+
1015
+ - `pricingRecommendations` (object) [✗]: Pricing analysis and recommendations with material-specific pricing (v2.0.0)
1016
+
1017
+ - `marketplaceRecommendations` (array) [✗]: Recommended marketplaces with Etsy-specific scoring (v2.0.0)
1018
+
1019
+ - `demandAnalysis` (object) [✗]: Market demand insights
1020
+
1021
+ - `qualityFactors` (object) [✗]: Quality-related factors affecting sellability
1022
+
1023
+ - `recommendations` (array) [✗]: Actionable recommendations to improve sellability
1024
+
1025
+ - `analyzedAt` (string) [✗]: Analysis completion timestamp (ISO 8601)
1026
+
1027
+ - `analysisVersion` (string) [✗]: Analysis algorithm version
1028
+
1029
+ - `error` (object) [✗]: Error information if analysis failed
1030
+
1031
+
1032
+
1033
+ ### model-sellability-analysis-request
1034
+
1035
+ **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.
1036
+
1037
+ **Method:** `client.modelSellabilityAnalysisRequest(data)`
1038
+
1039
+ **Payload Type:** `ModelSellabilityAnalysisRequestMessage`
1040
+
1041
+ **Fields:**
1042
+
1043
+ - `metamodelId` (string) [✗]: UUID of the metamodel to analyze. Worker will fetch all model metadata, technical metadata, enriched metadata, and child models from PostgreSQL.
1044
+
1045
+ - `ownerId` (string) [✗]: UUID of the user who owns the metamodel
1046
+
1047
+ - `analysisOptions` (object) [✗]: Optional analysis configuration
1048
+
1049
+
1050
+
1051
+ ### model-semantic-analysis-completed
1052
+
1053
+ **Description:** Handles completion of 3D model semantic analysis with generated tags and similarity results.
1054
+
1055
+ **Method:** `client.modelSemanticAnalysisCompleted(data)`
1056
+
1057
+ **Payload Type:** `ModelSemanticAnalysisCompletedMessage`
1058
+
1059
+ **Fields:**
1060
+
1061
+ - `modelId` (string) [✗]: The unique identifier for the model.
1062
+
1063
+ - `userId` (string) [✗]: The user ID who owns the model.
1064
+
1065
+ - `processingStatus` (string) [✗]: Final processing status.
1066
+
1067
+ - `semanticMetadata` (object) [✗]: Generated semantic metadata and analysis results.
1068
+
1069
+ - `processingTime` (object) [✗]: Processing performance metrics.
1070
+
1071
+ - `qualityMetrics` (object) [✗]: Processing quality and confidence metrics.
1072
+
1073
+ - `error` (object) [✗]: Error information if processing failed.
1074
+
1075
+ - `debugInfo` (object) [✗]: Additional debug information for troubleshooting.
1076
+
1077
+
1078
+
1079
+ ### model-semantic-analysis-request
1080
+
1081
+ **Description:** Handles 3D model semantic analysis requests using ULIP-2 neural networks and FAISS vector similarity search.
1082
+
1083
+ **Method:** `client.modelSemanticAnalysisRequest(data)`
1084
+
1085
+ **Payload Type:** `ModelSemanticAnalysisRequestMessage`
1086
+
1087
+ **Fields:**
1088
+
1089
+ - `modelId` (string) [✗]: The unique identifier for the model.
1090
+
1091
+ - `userId` (string) [✗]: The user ID who owns the model.
1092
+
1093
+ - `storageConnectionId` (string) [✗]: The ID of the storage connection.
1094
+
1095
+ - `filePath` (string) [✗]: The path to the 3D model file in storage.
1096
+
1097
+ - `fileName` (string) [✗]: The name of the model file.
1098
+
1099
+ - `fileSize` (number) [✗]: The size of the model file in bytes.
1100
+
1101
+ - `storageProviderType` (string) [✗]: The type of the storage provider (S3, GoogleDrive, SFTP, etc).
1102
+
1103
+ - `processingOptions` (object) [✗]: Configuration options for semantic analysis.
1104
+
1105
+ - `priority` (number) [✗]: Processing priority (1=highest, 10=lowest).
1106
+
1107
+ - `webhookUrl` (string) [✗]: Optional webhook URL for completion notification.
1108
+
1109
+ - `retryCount` (number) [✗]: Current retry attempt number.
1110
+
1111
+
1112
+
408
1113
  ### model-technical-metadata-completed
409
1114
 
410
1115
  **Description:** Reports comprehensive results of technical metadata analysis including geometry, quality metrics, and print-readiness assessment
@@ -507,7 +1212,11 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
507
1212
 
508
1213
  - `ownerId` (string) [✗]: User ID who owns the model
509
1214
 
510
- - `storageLocation` (object) [✗]: Location of the 3D model file
1215
+ - `storageLocation` (object) [✗]: Location of the 3D model file (legacy - used for direct download if minioPath not provided)
1216
+
1217
+ - `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.
1218
+
1219
+ - `parentJobId` (string) [✗]: ID of parent file-download job (for BullMQ dependency tracking).
511
1220
 
512
1221
  - `analysisOptions` (object) [✗]: Optional analysis configuration parameters
513
1222
 
@@ -539,7 +1248,7 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
539
1248
 
540
1249
  ### thumbnail-generation-request
541
1250
 
542
- **Description:** Handles thumbnail generation requests with customization options.
1251
+ **Description:** Handles thumbnail generation requests with customization options. Supports both storage provider downloads and MinIO-cached files.
543
1252
 
544
1253
  **Method:** `client.thumbnailGenerationRequest(data)`
545
1254
 
@@ -551,14 +1260,129 @@ await client.sendToQueue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
551
1260
 
552
1261
  - `ownerId` (string) [✗]: The identifier of the user who owns the entity.
553
1262
 
554
- - `storageLocation` (object) [✗]: The storage location of the model.
1263
+ - `storageLocation` (object) [✗]: The storage location of the model (legacy - used for direct download if minioPath not provided).
1264
+
1265
+ - `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.
555
1266
 
556
1267
  - `previewType` (string) [✗]: The type of preview to generate, e.g., 'default', 'static', 'glb'.
557
1268
 
1269
+ - `generate360Views` (boolean) [✗]: Generate 16 angle views for 360° preview (4 horizontal x 4 vertical angles).
1270
+
1271
+ - `parentJobId` (string) [✗]: ID of parent file-download job (for BullMQ dependency tracking).
1272
+
558
1273
  - `customization` (object) [✗]: User-defined customizations for the thumbnail.
559
1274
 
560
1275
 
561
1276
 
1277
+ ### user-engagement-event
1278
+
1279
+ **Description:** User engagement and onboarding tracking events for analytics and behavioral insights.
1280
+
1281
+ Captures key user actions throughout their journey:
1282
+ - Account creation and onboarding steps
1283
+ - Feature usage and adoption
1284
+ - Model management activities
1285
+ - Marketplace interactions
1286
+ - Subscription changes
1287
+
1288
+ Used for:
1289
+ - User onboarding funnel analysis
1290
+ - Feature adoption tracking
1291
+ - User retention metrics
1292
+ - A/B testing and experimentation
1293
+ - Personalization and recommendations
1294
+ - Product analytics dashboards
1295
+
1296
+
1297
+ **Method:** `client.userEngagementEvent(data)`
1298
+
1299
+ **Payload Type:** `UserEngagementEventMessage`
1300
+
1301
+ **Fields:**
1302
+
1303
+ - `eventType` (string) [✓]: Category of user engagement event
1304
+
1305
+ - `action` (string) [✓]: Specific user action performed
1306
+
1307
+ - `timestamp` (string) [✓]: ISO 8601 timestamp when the action occurred
1308
+
1309
+ - `userId` (string) [✓]: Unique identifier of the user
1310
+
1311
+ - `userEmail` (string) [✗]: User's email (hashed for privacy in analytics)
1312
+
1313
+ - `userCreatedAt` (string) [✗]: When the user account was created (for cohort analysis)
1314
+
1315
+ - `userPlanTier` (string) [✗]: Current subscription plan tier
1316
+
1317
+ - `sessionId` (string) [✗]: User session identifier for grouping actions
1318
+
1319
+ - `requestId` (string) [✗]: Request ID for correlation with logs
1320
+
1321
+ - `actionDetails` (object) [✗]: Additional context about the action
1322
+
1323
+ - `source` (string) [✗]: Where the action originated
1324
+
1325
+ - `httpMethod` (string) [✗]: HTTP method used
1326
+
1327
+ - `httpUrl` (string) [✗]: API endpoint path
1328
+
1329
+ - `httpStatusCode` (integer) [✗]: HTTP response status code
1330
+
1331
+ - `durationMs` (number) [✗]: Action duration in milliseconds
1332
+
1333
+ - `experimentId` (string) [✗]: A/B test or experiment ID
1334
+
1335
+ - `experimentVariant` (string) [✗]: Experiment variant/group
1336
+
1337
+ - `environment` (string) [✗]: Deployment environment
1338
+
1339
+ - `clientInfo` (object) [✗]: Client/browser information (anonymized)
1340
+
1341
+
1342
+
1343
+ ### worker-analytics-event
1344
+
1345
+ **Description:** Analytics event emitted by workers for tracking processing metrics, user behavior,
1346
+ and model statistics. Consumed by worker-analytic-collector and forwarded to ELK.
1347
+
1348
+ All workers MUST emit this event upon job completion (success or failure).
1349
+ Each worker includes its specific metrics in the `metrics` object.
1350
+
1351
+
1352
+ **Method:** `client.workerAnalyticsEvent(data)`
1353
+
1354
+ **Payload Type:** `WorkerAnalyticsEventMessage`
1355
+
1356
+ **Fields:**
1357
+
1358
+ - `eventType` (string) [✓]: Type of analytics event
1359
+
1360
+ - `workerId` (string) [✓]: Identifier of the worker that processed the job
1361
+
1362
+ - `jobId` (string) [✓]: Unique job identifier from BullMQ
1363
+
1364
+ - `timestamp` (string) [✓]: ISO 8601 timestamp of event emission
1365
+
1366
+ - `userId` (string) [✗]: User who owns the model/triggered the job
1367
+
1368
+ - `modelId` (string) [✗]: Model identifier (if applicable)
1369
+
1370
+ - `metamodelId` (string) [✗]: Metamodel identifier (if applicable)
1371
+
1372
+ - `storageItemId` (string) [✗]: Storage item identifier (for download events)
1373
+
1374
+ - `status` (string) [✗]: Job completion status
1375
+
1376
+ - `errorCode` (string) [✗]: Error code if status is failure
1377
+
1378
+ - `errorMessage` (string) [✗]: Error message if status is failure
1379
+
1380
+ - `timing` (object) [✗]: Processing time metrics in milliseconds
1381
+
1382
+ - `metrics` (object) [✗]: Worker-specific metrics. Structure varies by eventType.
1383
+
1384
+
1385
+
562
1386
  ## Configuration
563
1387
 
564
1388
  ### Environment Variables
@@ -597,11 +1421,86 @@ new WorkerClient(config: WorkerClientConfig)
597
1421
  - Get the current status of a job
598
1422
 
599
1423
 
1424
+ - `backendLoggingEvent(data: BackendLoggingEventMessage): Promise<JobResponse>`
1425
+ - Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
1426
+ This event is sent to ELK for centralized monitoring, alerting, and debugging.
1427
+
1428
+ Automatically emitted by the custom Pino logger interceptor when:
1429
+ - logger.warn() is called
1430
+ - logger.error() is called
1431
+ - uncaught exceptions occur
1432
+ - request failures happen (4xx, 5xx responses)
1433
+
1434
+ Used for:
1435
+ - System health monitoring
1436
+ - Error tracking and alerting
1437
+ - Performance degradation detection
1438
+ - Security incident tracking
1439
+ - Compliance and audit trails
1440
+
1441
+
1442
+ - `etsyAnalyticsSyncCompleted(data: EtsyAnalyticsSyncCompletedMessage): Promise<JobResponse>`
1443
+ - Contains synced analytics data for Etsy listings. Backend stores this in etsy_analytics_snapshots table and indexes to ELK.
1444
+
1445
+
1446
+ - `etsyAnalyticsSyncRequest(data: EtsyAnalyticsSyncRequestMessage): Promise<JobResponse>`
1447
+ - Syncs analytics data from Etsy API for one or more listings. Fetches views, favorites, sales, revenue, and traffic source data.
1448
+ Can sync: - Specific listings (provide listingIds) - All user listings (provide userId, empty listingIds) - Shop-level analytics (provide shopId)
1449
+
1450
+
1451
+ - `etsyPublishListingCompleted(data: EtsyPublishListingCompletedMessage): Promise<JobResponse>`
1452
+ - Indicates completion of Etsy listing publication. Contains external Etsy listing ID and URL, or error details if failed.
1453
+
1454
+
1455
+ - `etsyPublishListingRequest(data: EtsyPublishListingRequestMessage): Promise<JobResponse>`
1456
+ - Publishes a single metamodel listing to Etsy for a specific material variant. Creates Etsy listing, uploads digital file, and returns external listing ID.
1457
+ This message is enqueued for EACH material variant when publishing a metamodel.
1458
+ Example: Publishing a metamodel with PLA, Resin, ABS materials creates 3 jobs.
1459
+
1460
+
600
1461
  - `fileDownloadCompleted(data: FileDownloadCompletedMessage): Promise<JobResponse>`
601
1462
  - Notifies that a file download has been processed, indicating success or failure.
602
1463
 
603
1464
  - `fileDownloadRequest(data: FileDownloadRequestMessage): Promise<JobResponse>`
604
- - Handles file download requests.
1465
+ - Downloads model file from storage provider to MinIO for processing pipeline. Acts as parent job for thumbnail generation, technical metadata analysis, and metadata generation.
1466
+
1467
+ - `marketplaceAnalyticsSyncCompleted(data: MarketplaceAnalyticsSyncCompletedMessage): Promise<JobResponse>`
1468
+ - Contains synced analytics data for marketplace listings. Backend stores this in marketplace_analytics_snapshots table and indexes to ELK. Works with any marketplace provider.
1469
+
1470
+ - `marketplaceAnalyticsSyncRequest(data: MarketplaceAnalyticsSyncRequestMessage): Promise<JobResponse>`
1471
+ - 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.).
1472
+
1473
+ - `marketplaceConnectionSyncCompleted(data: MarketplaceConnectionSyncCompletedMessage): Promise<JobResponse>`
1474
+ - Notification that marketplace connection sync has completed. Contains updated connection metadata, profile information, and sync statistics.
1475
+
1476
+
1477
+ - `marketplaceConnectionSyncRequest(data: MarketplaceConnectionSyncRequestMessage): Promise<JobResponse>`
1478
+ - 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
1479
+ This is typically triggered after initial connection or periodically to keep marketplace metadata up to date.
1480
+
1481
+
1482
+ - `marketplaceCredentialRotationCompleted(data: MarketplaceCredentialRotationCompletedMessage): Promise<JobResponse>`
1483
+ - Notification that marketplace credential rotation has completed. Contains the rotation results, new credential metadata, and any issues encountered.
1484
+
1485
+
1486
+ - `marketplaceCredentialRotationRequest(data: MarketplaceCredentialRotationRequestMessage): Promise<JobResponse>`
1487
+ - 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
1488
+
1489
+
1490
+ - `marketplaceListingSyncCompleted(data: MarketplaceListingSyncCompletedMessage): Promise<JobResponse>`
1491
+ - Notification that marketplace listing sync operation has completed. Contains detailed results of the sync including created/updated listings, errors encountered, and performance statistics.
1492
+
1493
+
1494
+ - `marketplaceListingSyncRequest(data: MarketplaceListingSyncRequestMessage): Promise<JobResponse>`
1495
+ - Requests synchronization of marketplace listings for a connection. Can sync specific listings or all listings for a marketplace connection.
1496
+ 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
1497
+
1498
+
1499
+ - `marketplacePublishListingCompleted(data: MarketplacePublishListingCompletedMessage): Promise<JobResponse>`
1500
+ - 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.).
1501
+
1502
+ - `marketplacePublishListingRequest(data: MarketplacePublishListingRequestMessage): Promise<JobResponse>`
1503
+ - 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.
605
1504
 
606
1505
  - `mediaBatchDownloadCompleted(data: MediaBatchDownloadCompletedMessage): Promise<JobResponse>`
607
1506
  - Notifies that a batch media download has been completed.
@@ -616,6 +1515,14 @@ new WorkerClient(config: WorkerClientConfig)
616
1515
  - `metamodelMetadataGenerationRequest(data: MetamodelMetadataGenerationRequestMessage): Promise<JobResponse>`
617
1516
  - Handles metamodel metadata generation requests via Ollama. Aggregates data from constituent models and generates AI-enhanced metadata.
618
1517
 
1518
+ - `modelAnalyticsCollectionRequest(data: ModelAnalyticsCollectionRequestMessage): Promise<JobResponse>`
1519
+ - Request to collect marketplace analytics for a specific metamodel.
1520
+ Triggered by backend scheduler every 6 hours for popular/tagged metamodels.
1521
+
1522
+ Worker performs targeted market searches based on metamodel metadata
1523
+ and stores aggregated statistics in Elasticsearch for trend analysis.
1524
+
1525
+
619
1526
  - `modelDiscoveryFolderProcessedEvent(data: ModelDiscoveryFolderProcessedEventMessage): Promise<JobResponse>`
620
1527
  - Handles model discovery folder processed events.
621
1528
 
@@ -632,7 +1539,7 @@ new WorkerClient(config: WorkerClientConfig)
632
1539
  - Handles model metadata generation completed.
633
1540
 
634
1541
  - `modelMetadataGenerationRequest(data: ModelMetadataGenerationRequestMessage): Promise<JobResponse>`
635
- - Handles model metadata generation requests.
1542
+ - Handles model metadata generation requests. Supports both storage provider downloads and MinIO-cached files.
636
1543
 
637
1544
  - `modelMetamodelDetectionFound(data: ModelMetamodelDetectionFoundMessage): Promise<JobResponse>`
638
1545
  - Handles model metamodel detection found with hierarchical relationships.
@@ -640,6 +1547,18 @@ new WorkerClient(config: WorkerClientConfig)
640
1547
  - `modelMetamodelDetectionRequest(data: ModelMetamodelDetectionRequestMessage): Promise<JobResponse>`
641
1548
  - Handles model metamodel detection requests.
642
1549
 
1550
+ - `modelSellabilityAnalysisCompleted(data: ModelSellabilityAnalysisCompletedMessage): Promise<JobResponse>`
1551
+ - Contains sellability analysis results including Etsy-specific recommendations, material pricing, and marketplace compatibility scores
1552
+
1553
+ - `modelSellabilityAnalysisRequest(data: ModelSellabilityAnalysisRequestMessage): Promise<JobResponse>`
1554
+ - 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.
1555
+
1556
+ - `modelSemanticAnalysisCompleted(data: ModelSemanticAnalysisCompletedMessage): Promise<JobResponse>`
1557
+ - Handles completion of 3D model semantic analysis with generated tags and similarity results.
1558
+
1559
+ - `modelSemanticAnalysisRequest(data: ModelSemanticAnalysisRequestMessage): Promise<JobResponse>`
1560
+ - Handles 3D model semantic analysis requests using ULIP-2 neural networks and FAISS vector similarity search.
1561
+
643
1562
  - `modelTechnicalMetadataCompleted(data: ModelTechnicalMetadataCompletedMessage): Promise<JobResponse>`
644
1563
  - Reports comprehensive results of technical metadata analysis including geometry, quality metrics, and print-readiness assessment
645
1564
 
@@ -650,7 +1569,34 @@ new WorkerClient(config: WorkerClientConfig)
650
1569
  - Handles thumbnail generation completed.
651
1570
 
652
1571
  - `thumbnailGenerationRequest(data: ThumbnailGenerationRequestMessage): Promise<JobResponse>`
653
- - Handles thumbnail generation requests with customization options.
1572
+ - Handles thumbnail generation requests with customization options. Supports both storage provider downloads and MinIO-cached files.
1573
+
1574
+ - `userEngagementEvent(data: UserEngagementEventMessage): Promise<JobResponse>`
1575
+ - User engagement and onboarding tracking events for analytics and behavioral insights.
1576
+
1577
+ Captures key user actions throughout their journey:
1578
+ - Account creation and onboarding steps
1579
+ - Feature usage and adoption
1580
+ - Model management activities
1581
+ - Marketplace interactions
1582
+ - Subscription changes
1583
+
1584
+ Used for:
1585
+ - User onboarding funnel analysis
1586
+ - Feature adoption tracking
1587
+ - User retention metrics
1588
+ - A/B testing and experimentation
1589
+ - Personalization and recommendations
1590
+ - Product analytics dashboards
1591
+
1592
+
1593
+ - `workerAnalyticsEvent(data: WorkerAnalyticsEventMessage): Promise<JobResponse>`
1594
+ - Analytics event emitted by workers for tracking processing metrics, user behavior,
1595
+ and model statistics. Consumed by worker-analytic-collector and forwarded to ELK.
1596
+
1597
+ All workers MUST emit this event upon job completion (success or failure).
1598
+ Each worker includes its specific metrics in the `metrics` object.
1599
+
654
1600
 
655
1601
 
656
1602
  ### Response Types