@mesh-sync/worker-backend-client 4.0.19 → 4.0.24-pr.51.20260312132340

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,26 @@ 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
+
103
123
  ### backend-logging-event
104
124
 
105
125
  **Description:** Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
@@ -163,52 +183,6 @@ Used for:
163
183
 
164
184
 
165
185
 
166
- ### ekg-edge-batch-create-completed
167
-
168
- **Description:** Completion event for EKG edge batch creation with propagation results.
169
-
170
- **Method:** `client.ekgEdgeBatchCreateCompleted(data)`
171
-
172
- **Payload Type:** `EkgEdgeBatchCreateCompletedMessage`
173
-
174
- **Fields:**
175
-
176
- - `requestId` (string) [✓]: Original request ID from ekg-edge-batch-create-request
177
-
178
- - `success` (boolean) [✓]: Whether the batch operation succeeded
179
-
180
- - `statistics` (object) [✓]: Batch operation statistics
181
-
182
- - `conflicts` (array) [✗]: List of high-conflict edges requiring review
183
-
184
- - `errors` (array) [✗]: Errors encountered during processing
185
-
186
- - `graphMetrics` (object) [✗]: Overall graph state after this batch
187
-
188
-
189
-
190
- ### ekg-edge-batch-create-request
191
-
192
- **Description:** Create multiple EKG edges with Dempster-Shafer mass functions. Triggered by metamodel detection completion.
193
-
194
- **Method:** `client.ekgEdgeBatchCreateRequest(data)`
195
-
196
- **Payload Type:** `EkgEdgeBatchCreateRequestMessage`
197
-
198
- **Fields:**
199
-
200
- - `requestId` (string) [✓]: Unique request ID for tracking (e.g., metamodel detection job ID)
201
-
202
- - `source` (string) [✓]: Source of the edges: metamodel-heuristic, manual, taxonomy-import, etc.
203
-
204
- - `edges` (array) [✓]: Batch of edges to create/update in the EKG
205
-
206
- - `propagationOptions` (object) [✗]: Options for evidential edge propagation after edge creation
207
-
208
- - `webhookUrl` (string) [✗]: Optional webhook URL for async completion notification
209
-
210
-
211
-
212
186
  ### etsy-analytics-sync-completed
213
187
 
214
188
  **Description:** Contains synced analytics data for Etsy listings. Backend stores this in etsy_analytics_snapshots table and indexes to ELK.
@@ -444,63 +418,81 @@ Retry Configuration:
444
418
 
445
419
 
446
420
 
447
- ### marketplace-analytics-sync-completed
421
+ ### ip-check-completed
448
422
 
449
- **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.
423
+ **Description:** Contains IP verification results including trademark risk, copyright risk, detected brands/franchises, and analysis confidence scores
450
424
 
451
- **Method:** `client.marketplaceAnalyticsSyncCompleted(data)`
425
+ **Method:** `client.ipCheckCompleted(data)`
452
426
 
453
- **Payload Type:** `MarketplaceAnalyticsSyncCompletedMessage`
427
+ **Payload Type:** `IpCheckCompletedMessage`
454
428
 
455
429
  **Fields:**
456
430
 
457
- - `originalJobId` (string) [✗]: BullMQ job ID from original request
431
+ - `modelId` (string) [✗]: Model UUID that was analyzed
432
+
433
+ - `ownerId` (string) [✗]: Owner user ID
458
434
 
459
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
435
+ - `entityType` (string) [✗]: Type of entity checked: 'model' or 'metamodel'
460
436
 
461
- - `status` (string) [✗]: Sync result (SUCCESS, PARTIAL_SUCCESS, or FAILED)
437
+ - `status` (string) [✗]: Overall IP check outcome: 'clear', 'flagged', or 'error'
462
438
 
463
- - `syncedCount` (integer) [✗]: Number of listings successfully synced
439
+ - `trademarkRisk` (string) [✗]: Detected trademark infringement risk level: 'none', 'low', 'medium', 'high'
464
440
 
465
- - `errorCount` (integer) [✗]: Number of listings that failed
441
+ - `copyrightRisk` (string) [✗]: Detected copyright infringement risk level: 'none', 'low', 'medium', 'high'
466
442
 
467
- - `results` (array) [✗]: Analytics for each synced listing
443
+ - `matchedBrands` (array) [✗]: Brand names detected in model name or content
468
444
 
469
- - `errors` (array) [✗]: Errors for failed listings
445
+ - `matchedFranchises` (array) [✗]: Franchise/character names detected
446
+
447
+ - `similarModelsCount` (integer) [✗]: Number of visually similar models found
448
+
449
+ - `confidence` (number) [✗]: Overall confidence score for the analysis (0.0-1.0)
450
+
451
+ - `riskScorePercent` (integer) [✗]: Risk score as 0-100 integer (FR-024: >70 HIGH, 40-70 MEDIUM, <40 LOW)
452
+
453
+ - `riskLevel` (string) [✗]: Overall risk level: 'none', 'low', 'medium', 'high'
454
+
455
+ - `recommendation` (string) [✗]: Recommended action: 'block' (HIGH risk), 'warn' (MEDIUM risk), 'allow' (LOW/NONE risk)
456
+
457
+ - `suggestedChanges` (object) [✗]: Suggested modifications to reduce IP risk
470
458
 
471
- - `syncedAt` (string) [✗]: When sync completed (ISO 8601)
459
+ - `heuristicResults` (object) [✗]: Detailed results from each heuristic check
472
460
 
473
- - `nextScheduledSync` (string) [✗]: When next automatic sync should occur (ISO 8601)
461
+ - `error` (object) [✗]: Error details if status is 'error'
474
462
 
463
+ - `processingDurationMs` (integer) [✗]: Total processing time in milliseconds
475
464
 
476
465
 
477
- ### marketplace-analytics-sync-request
478
466
 
479
- **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.).
467
+ ### ip-check-request
480
468
 
481
- **Method:** `client.marketplaceAnalyticsSyncRequest(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.
482
470
 
483
- **Payload Type:** `MarketplaceAnalyticsSyncRequestMessage`
471
+ **Method:** `client.ipCheckRequest(data)`
472
+
473
+ **Payload Type:** `IpCheckRequestMessage`
484
474
 
485
475
  **Fields:**
486
476
 
487
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
477
+ - `modelId` (string) [✗]: Unique identifier for the model to analyze
488
478
 
489
- - `marketplaceConnectionId` (string) [✗]: UUID of the marketplace connection configuration
479
+ - `ownerId` (string) [✗]: User ID who owns the model
490
480
 
491
- - `listingIds` (array) [✗]: Internal listing UUIDs to sync. Empty array = sync all for user.
481
+ - `entityType` (string) [✗]: Type of entity being checked: 'model' or 'metamodel'
492
482
 
493
- - `userId` (string) [✗]: UUID of user whose listings to sync (if listingIds empty)
483
+ - `modelName` (string) [✗]: Name of the model for trademark/franchise text detection
494
484
 
495
- - `externalShopId` (string) [✗]: External marketplace shop ID for shop-level analytics
485
+ - `tags` (array) [✗]: Model tags for IP reference detection
496
486
 
497
- - `timeRange` (object) [✗]: Date range for historical analytics
487
+ - `description` (string) [✗]: Model description for text-based IP analysis
498
488
 
499
- - `syncOptions` (object) [✗]: Optional sync configuration
489
+ - `thumbnailUrl` (string) [✗]: URL to fetch the thumbnail image for visual analysis
500
490
 
501
- - `marketplaceCredentials` (object) [✗]: Encrypted marketplace credentials (retrieved from marketplaceConnectionId)
491
+ - `minioPath` (string) [✗]: Path to thumbnail in MinIO if stored internally
502
492
 
503
- - `webhookUrl` (string) [✗]: Callback URL for completion notification
493
+ - `additionalImageUrls` (array) [✗]: Optional additional images for more comprehensive analysis (e.g., 360° views)
494
+
495
+ - `analysisOptions` (object) [✗]: Optional analysis configuration
504
496
 
505
497
 
506
498
 
@@ -647,6 +639,41 @@ This is typically triggered after initial connection or periodically to keep mar
647
639
 
648
640
 
649
641
 
642
+ ### marketplace-intelligence-completed
643
+
644
+ **Description:** Response from marketplace intelligence scraping.
645
+ Contains aggregated similarity data from marketplace searches.
646
+
647
+ Consumed by worker-backend to update pipeline context before
648
+ sellability analysis runs.
649
+
650
+
651
+ **Method:** `client.marketplaceIntelligenceCompleted(data)`
652
+
653
+ **Payload Type:** `MarketplaceIntelligenceCompletedMessage`
654
+
655
+ **Fields:**
656
+
657
+ - `modelId` (string) [✓]: UUID of the model that was researched
658
+
659
+ - `ownerId` (string) [✓]: UUID of the model owner
660
+
661
+ - `status` (string) [✓]: Result status
662
+
663
+ - `marketData` (object) [✗]: Aggregated market intelligence across all scraped marketplaces
664
+
665
+ - `marketplaceBreakdown` (array) [✗]: Results per marketplace
666
+
667
+ - `similarityScore` (number) [✗]: How saturated the market is for this model type (0=unique, 100=very common)
668
+
669
+ - `error` (object) [✗]: Error information if status is FAILED
670
+
671
+ - `analyzedAt` (string) [✗]: When the analysis completed
672
+
673
+ - `analysisVersion` (string) [✗]: Version of the intelligence collector
674
+
675
+
676
+
650
677
  ### marketplace-intelligence-event
651
678
 
652
679
  **Description:** Public marketplace intelligence data scraped from external marketplaces.
@@ -692,6 +719,43 @@ Used for market research, pricing optimization, and trend detection.
692
719
 
693
720
 
694
721
 
722
+ ### marketplace-intelligence-request
723
+
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.
727
+
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
733
+
734
+ Pipeline integration:
735
+ - Triggered after: metadata-generation (needs model title/tags/category)
736
+ - Results feed into: sellability-analysis (market positioning data)
737
+
738
+
739
+ **Method:** `client.marketplaceIntelligenceRequest(data)`
740
+
741
+ **Payload Type:** `MarketplaceIntelligenceRequestMessage`
742
+
743
+ **Fields:**
744
+
745
+ - `modelId` (string) [✓]: UUID of the model to research
746
+
747
+ - `ownerId` (string) [✓]: UUID of the model owner
748
+
749
+ - `searchContext` (object) [✗]: Model metadata used to build marketplace search queries
750
+
751
+ - `scrapingOptions` (object) [✗]: Configuration for the marketplace scraping
752
+
753
+ - `pipelineId` (string) [✗]: Pipeline execution ID for correlation
754
+
755
+ - `executionId` (string) [✗]: Pipeline execution UUID for correlation
756
+
757
+
758
+
695
759
  ### marketplace-listing-description-generation-completed
696
760
 
697
761
  **Description:** Notifies backend that marketplace description generation completed. Contains generated description with metadata tracking (AI model, confidence, generation timestamp) and suggested price.
@@ -997,76 +1061,6 @@ Includes bidirectional sync: - Pull: Fetch listings from marketplace to update l
997
1061
 
998
1062
 
999
1063
 
1000
- ### marketplace-publish-listing-completed
1001
-
1002
- **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.).
1003
-
1004
- **Method:** `client.marketplacePublishListingCompleted(data)`
1005
-
1006
- **Payload Type:** `MarketplacePublishListingCompletedMessage`
1007
-
1008
- **Fields:**
1009
-
1010
- - `originalJobId` (string) [✗]: BullMQ job ID from original request
1011
-
1012
- - `listingId` (string) [✗]: Internal marketplace_items UUID
1013
-
1014
- - `metamodelId` (string) [✗]: UUID of the metamodel that was published
1015
-
1016
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, etc.)
1017
-
1018
- - `materialName` (string) [✗]: Material variant name
1019
-
1020
- - `status` (string) [✗]: Publication result (SUCCESS or FAILED)
1021
-
1022
- - `externalListingId` (string) [✗]: External marketplace listing ID (only if status=SUCCESS)
1023
-
1024
- - `externalListingUrl` (string) [✗]: URL to view listing on marketplace (only if status=SUCCESS)
1025
-
1026
- - `externalFileId` (string) [✗]: External marketplace file ID (only if status=SUCCESS)
1027
-
1028
- - `error` (object) [✗]: Error details (only if status=FAILED)
1029
-
1030
- - `publishedAt` (string) [✗]: When the listing was created (ISO 8601, only if status=SUCCESS)
1031
-
1032
- - `processingDuration` (integer) [✗]: Processing time in milliseconds
1033
-
1034
-
1035
-
1036
- ### marketplace-publish-listing-request
1037
-
1038
- **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.
1039
-
1040
- **Method:** `client.marketplacePublishListingRequest(data)`
1041
-
1042
- **Payload Type:** `MarketplacePublishListingRequestMessage`
1043
-
1044
- **Fields:**
1045
-
1046
- - `listingId` (string) [✗]: Internal marketplace_items table UUID
1047
-
1048
- - `metamodelId` (string) [✗]: UUID of the metamodel being published
1049
-
1050
- - `ownerId` (string) [✗]: UUID of the user who owns the metamodel
1051
-
1052
- - `marketplaceProvider` (string) [✗]: Marketplace provider type (etsy, ebay, leboncoin, etc.)
1053
-
1054
- - `marketplaceConnectionId` (string) [✗]: UUID of the marketplace connection configuration
1055
-
1056
- - `materialVariant` (object) [✗]: Material-specific listing configuration
1057
-
1058
- - `baseListingData` (object) [✗]: Common listing information shared across variants
1059
-
1060
- - `publishOptions` (object) [✗]: Publishing configuration (marketplace-specific options)
1061
-
1062
- - `marketplaceCredentials` (object) [✗]: Encrypted marketplace credentials (retrieved from marketplaceConnectionId)
1063
-
1064
- - `fileMetadata` (object) [✗]: Digital file to upload
1065
-
1066
- - `webhookUrl` (string) [✗]: Callback URL for completion notification
1067
-
1068
-
1069
-
1070
1064
  ### media-batch-download-completed
1071
1065
 
1072
1066
  **Description:** Notifies that a batch media download has been completed.
@@ -1303,7 +1297,7 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
1303
1297
 
1304
1298
  ### model-finder-index-request
1305
1299
 
1306
- **Description:** Request to index a 3D model for similarity search.
1300
+ **Description:** DEPRECATED (2026-02-18) FR-023 retired. Merge 3D rendering into worker-file-vectorize.
1307
1301
 
1308
1302
  **Method:** `client.modelFinderIndexRequest(data)`
1309
1303
 
@@ -1319,7 +1313,7 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
1319
1313
 
1320
1314
  ### model-finder-response
1321
1315
 
1322
- **Description:** Response containing search results from the model finder.
1316
+ **Description:** DEPRECATED (2026-02-18) FR-023 retired. Merge 3D rendering into worker-file-vectorize.
1323
1317
 
1324
1318
  **Method:** `client.modelFinderResponse(data)`
1325
1319
 
@@ -1335,7 +1329,7 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
1335
1329
 
1336
1330
  ### model-finder-search-request
1337
1331
 
1338
- **Description:** Request to search for similar 3D models.
1332
+ **Description:** DEPRECATED (2026-02-18) FR-023 retired. Merge 3D rendering into worker-file-vectorize.
1339
1333
 
1340
1334
  **Method:** `client.modelFinderSearchRequest(data)`
1341
1335
 
@@ -1429,6 +1423,76 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
1429
1423
 
1430
1424
 
1431
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
+
1432
1496
  ### model-sellability-analysis-completed
1433
1497
 
1434
1498
  **Description:** Contains sellability analysis results including Etsy-specific recommendations, material pricing, and marketplace compatibility scores
@@ -1609,6 +1673,8 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
1609
1673
 
1610
1674
  - `recommendedOrientation` (object) [✗]: Recommended print orientation for minimal support material and best results
1611
1675
 
1676
+ - `slicerRecommendations` (object) [✗]: Slicer-derived recommended print settings based on model analysis (feeds into print job creation as defaults)
1677
+
1612
1678
  - `originalUnit` (string) [✗]: Original file format unit detected from metadata or inferred from scale
1613
1679
 
1614
1680
  - `formatVersion` (string) [✗]: File format version (e.g., 'STL Binary', 'OBJ v4', 'PLY 1.0')
@@ -1659,6 +1725,226 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
1659
1725
 
1660
1726
 
1661
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
1781
+
1782
+ - `status` (string) [✗]: Status of the simulation
1783
+
1784
+ - `printTimeHours` (number) [✗]: Exact print time in hours (from toolpath analysis)
1785
+
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.
1945
+
1946
+
1947
+
1662
1948
  ### thumbnail-generation-completed
1663
1949
 
1664
1950
  **Description:** Handles thumbnail generation completed.
@@ -1681,6 +1967,8 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
1681
1967
 
1682
1968
  - `gltfPreviewPath` (string) [✗]: The path to the generated GLTF/GLB 3D preview file.
1683
1969
 
1970
+ - `animatedPreviewPath` (string) [✗]: The path to the generated animated MP4 preview file.
1971
+
1684
1972
  - `errorMessage` (string) [✗]: An error message if the thumbnail generation failed.
1685
1973
 
1686
1974
  - `storageLocation` (object) [✗]: The storage location of the model.
@@ -1741,6 +2029,8 @@ Used for:
1741
2029
 
1742
2030
  **Fields:**
1743
2031
 
2032
+ - `eventVersion` (string) [✓]: Schema version for forward-compatible evolution
2033
+
1744
2034
  - `eventType` (string) [✓]: Category of user engagement event
1745
2035
 
1746
2036
  - `action` (string) [✓]: Specific user action performed
@@ -1749,7 +2039,7 @@ Used for:
1749
2039
 
1750
2040
  - `userId` (string) [✓]: Unique identifier of the user
1751
2041
 
1752
- - `userEmail` (string) [✗]: User's email (hashed for privacy in analytics)
2042
+ - `userEmail` (string) [✗]: User's email — MUST be SHA-256 hashed at the producer side before publishing (GDPR/CNIL compliance). Never send raw email.
1753
2043
 
1754
2044
  - `userCreatedAt` (string) [✗]: When the user account was created (for cohort analysis)
1755
2045
 
@@ -1757,7 +2047,9 @@ Used for:
1757
2047
 
1758
2048
  - `sessionId` (string) [✗]: User session identifier for grouping actions
1759
2049
 
1760
- - `requestId` (string) [✗]: Request ID for correlation with logs
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
1761
2053
 
1762
2054
  - `actionDetails` (object) [✗]: Additional context about the action
1763
2055
 
@@ -1926,6 +2218,11 @@ new WorkerClient(config: WorkerClientConfig)
1926
2218
  - Get the current status of a job
1927
2219
 
1928
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
+
1929
2226
  - `backendLoggingEvent(data: BackendLoggingEventMessage): Promise<JobResponse>`
1930
2227
  - Centralized logging event for capturing all warn/error/failure logs from meshsync-backend.
1931
2228
  This event is sent to ELK for centralized monitoring, alerting, and debugging.
@@ -1944,12 +2241,6 @@ Used for:
1944
2241
  - Compliance and audit trails
1945
2242
 
1946
2243
 
1947
- - `ekgEdgeBatchCreateCompleted(data: EkgEdgeBatchCreateCompletedMessage): Promise<JobResponse>`
1948
- - Completion event for EKG edge batch creation with propagation results.
1949
-
1950
- - `ekgEdgeBatchCreateRequest(data: EkgEdgeBatchCreateRequestMessage): Promise<JobResponse>`
1951
- - Create multiple EKG edges with Dempster-Shafer mass functions. Triggered by metamodel detection completion.
1952
-
1953
2244
  - `etsyAnalyticsSyncCompleted(data: EtsyAnalyticsSyncCompletedMessage): Promise<JobResponse>`
1954
2245
  - Contains synced analytics data for Etsy listings. Backend stores this in etsy_analytics_snapshots table and indexes to ELK.
1955
2246
 
@@ -1989,11 +2280,11 @@ Retry Configuration:
1989
2280
  - `fileVectorizeRequest(data: FileVectorizeRequestMessage): Promise<JobResponse>`
1990
2281
  - Request to generate a vector embedding for an image file using CLIP.
1991
2282
 
1992
- - `marketplaceAnalyticsSyncCompleted(data: MarketplaceAnalyticsSyncCompletedMessage): Promise<JobResponse>`
1993
- - Contains synced analytics data for marketplace listings. Backend stores this in marketplace_analytics_snapshots table and indexes to ELK. Works with any marketplace provider.
2283
+ - `ipCheckCompleted(data: IpCheckCompletedMessage): Promise<JobResponse>`
2284
+ - Contains IP verification results including trademark risk, copyright risk, detected brands/franchises, and analysis confidence scores
1994
2285
 
1995
- - `marketplaceAnalyticsSyncRequest(data: MarketplaceAnalyticsSyncRequestMessage): Promise<JobResponse>`
1996
- - 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.).
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.
1997
2288
 
1998
2289
  - `marketplaceConnectionSyncCompleted(data: MarketplaceConnectionSyncCompletedMessage): Promise<JobResponse>`
1999
2290
  - Notification that marketplace connection sync has completed. Contains updated connection metadata, profile information, and sync statistics.
@@ -2012,6 +2303,14 @@ This is typically triggered after initial connection or periodically to keep mar
2012
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
2013
2304
 
2014
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
+
2015
2314
  - `marketplaceIntelligenceEvent(data: MarketplaceIntelligenceEventMessage): Promise<JobResponse>`
2016
2315
  - Public marketplace intelligence data scraped from external marketplaces.
2017
2316
 
@@ -2030,6 +2329,22 @@ Consumed by worker-analytic-collector for Elasticsearch indexing.
2030
2329
  Used for market research, pricing optimization, and trend detection.
2031
2330
 
2032
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
+
2033
2348
  - `marketplaceListingDescriptionGenerationCompleted(data: MarketplaceListingDescriptionGenerationCompletedMessage): Promise<JobResponse>`
2034
2349
  - Notifies backend that marketplace description generation completed. Contains generated description with metadata tracking (AI model, confidence, generation timestamp) and suggested price.
2035
2350
 
@@ -2063,12 +2378,6 @@ Includes bidirectional sync: - Pull: Fetch listings from marketplace to update l
2063
2378
  - `marketplaceListingUpdateRequest(data: MarketplaceListingUpdateRequestMessage): Promise<JobResponse>`
2064
2379
  - Request to update an existing listing on a marketplace (price, quantity, etc.)
2065
2380
 
2066
- - `marketplacePublishListingCompleted(data: MarketplacePublishListingCompletedMessage): Promise<JobResponse>`
2067
- - 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.).
2068
-
2069
- - `marketplacePublishListingRequest(data: MarketplacePublishListingRequestMessage): Promise<JobResponse>`
2070
- - 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.
2071
-
2072
2381
  - `mediaBatchDownloadCompleted(data: MediaBatchDownloadCompletedMessage): Promise<JobResponse>`
2073
2382
  - Notifies that a batch media download has been completed.
2074
2383
 
@@ -2103,13 +2412,13 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
2103
2412
  - Handles model discovery scan requests events.
2104
2413
 
2105
2414
  - `modelFinderIndexRequest(data: ModelFinderIndexRequestMessage): Promise<JobResponse>`
2106
- - Request to index a 3D model for similarity search.
2415
+ - DEPRECATED (2026-02-18) FR-023 retired. Merge 3D rendering into worker-file-vectorize.
2107
2416
 
2108
2417
  - `modelFinderResponse(data: ModelFinderResponseMessage): Promise<JobResponse>`
2109
- - Response containing search results from the model finder.
2418
+ - DEPRECATED (2026-02-18) FR-023 retired. Merge 3D rendering into worker-file-vectorize.
2110
2419
 
2111
2420
  - `modelFinderSearchRequest(data: ModelFinderSearchRequestMessage): Promise<JobResponse>`
2112
- - Request to search for similar 3D models.
2421
+ - DEPRECATED (2026-02-18) FR-023 retired. Merge 3D rendering into worker-file-vectorize.
2113
2422
 
2114
2423
  - `modelMetadataGenerationCompleted(data: ModelMetadataGenerationCompletedMessage): Promise<JobResponse>`
2115
2424
  - Notifies backend that enriched marketplace metadata generation completed. Backend updates Model entity with generated description, tags, classification, etc.
@@ -2123,6 +2432,12 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
2123
2432
  - `modelMetamodelDetectionRequest(data: ModelMetamodelDetectionRequestMessage): Promise<JobResponse>`
2124
2433
  - Handles model metamodel detection requests.
2125
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
+
2126
2441
  - `modelSellabilityAnalysisCompleted(data: ModelSellabilityAnalysisCompletedMessage): Promise<JobResponse>`
2127
2442
  - Contains sellability analysis results including Etsy-specific recommendations, material pricing, and marketplace compatibility scores
2128
2443
 
@@ -2141,6 +2456,24 @@ and stores aggregated statistics in Elasticsearch for trend analysis.
2141
2456
  - `modelTechnicalMetadataRequest(data: ModelTechnicalMetadataRequestMessage): Promise<JobResponse>`
2142
2457
  - Triggers comprehensive technical analysis of a 3D model file to extract geometry, quality metrics, and print-readiness information
2143
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
+
2144
2477
  - `thumbnailGenerationCompleted(data: ThumbnailGenerationCompletedMessage): Promise<JobResponse>`
2145
2478
  - Handles thumbnail generation completed.
2146
2479