sizebay-core-sdk 1.10.0-dev.3 → 1.10.0-dev.4
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 +25 -53
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -111,13 +111,11 @@ Fetch products similar to a reference.
|
|
|
111
111
|
|
|
112
112
|
<!-- DOCGEN:returns GetSimilarProductsResponse -->
|
|
113
113
|
> **`GetSimilarProductsResponse`**
|
|
114
|
-
> * `data`: `ProductDto[]` — An array of products that are visually similar to the reference item.
|
|
115
|
-
The results are ordered by their similarity score.
|
|
114
|
+
> * `data`: `ProductDto[]` — An array of products that are visually similar to the reference item.<br>The results are ordered by their similarity score.
|
|
116
115
|
> * `page`: `number` — The current page number of the results.
|
|
117
116
|
> * `perPage`: `number` — The number of items per page.
|
|
118
117
|
> * `total`: `number` — The total number of similar products found.
|
|
119
|
-
> * `invalidPersonaHash`: `boolean` — Indicates if the provided persona hash is invalid or expired
|
|
120
|
-
which may affect personalized results.
|
|
118
|
+
> * `invalidPersonaHash`: `boolean` — Indicates if the provided persona hash is invalid or expired,<br>which may affect personalized results.
|
|
121
119
|
<!-- /DOCGEN -->
|
|
122
120
|
|
|
123
121
|
#### Example
|
|
@@ -147,10 +145,8 @@ Retrieve pairs of complementary products.
|
|
|
147
145
|
<!-- DOCGEN:params GetComplementaryProductsParams -->
|
|
148
146
|
| Field | Type | Required | Description |
|
|
149
147
|
| ----- | ---- | :------: | ----------- |
|
|
150
|
-
| `permalink` | string | Yes | The URL permalink of the reference product.
|
|
151
|
-
|
|
152
|
-
| `similarityThreshold` | number | Yes | The minimum similarity score (0-1) for recommended products.
|
|
153
|
-
A higher value yields more similar items, while a lower value provides more variety. |
|
|
148
|
+
| `permalink` | string | Yes | The URL permalink of the reference product.<br>Its style, color, and category are used to find matching items. |
|
|
149
|
+
| `similarityThreshold` | number | Yes | The minimum similarity score (0-1) for recommended products.<br>A higher value yields more similar items, while a lower value provides more variety. |
|
|
154
150
|
| `tenantId` | number | Yes | Tenant (client) ID. |
|
|
155
151
|
| `collectionName` | string | Yes | Embeddings collection name (namespace). |
|
|
156
152
|
| `sid` | string | Yes | Session identifier (`sid`) for the user. |
|
|
@@ -165,11 +161,9 @@ A higher value yields more similar items, while a lower value provides more vari
|
|
|
165
161
|
|
|
166
162
|
<!-- DOCGEN:returns GetComplementaryProductsResponse -->
|
|
167
163
|
> **`GetComplementaryProductsResponse`**
|
|
168
|
-
> * `baseProduct`: `ProductDto` — The reference product used to generate recommendations.
|
|
169
|
-
This is the item that corresponds to the permalink from the request.
|
|
164
|
+
> * `baseProduct`: `ProductDto` — The reference product used to generate recommendations.<br>This is the item that corresponds to the permalink from the request.
|
|
170
165
|
> * `complementary`: `ComplementaryPairDto[]` — A list of recommended pairs of products that are complementary to the base product.
|
|
171
|
-
> * `invalidPersonaHash`: `boolean` — Indicates if the provided persona hash is invalid or has expired.
|
|
172
|
-
If true, personalization may be affected.
|
|
166
|
+
> * `invalidPersonaHash`: `boolean` — Indicates if the provided persona hash is invalid or has expired.<br>If true, personalization may be affected.
|
|
173
167
|
<!-- /DOCGEN -->
|
|
174
168
|
|
|
175
169
|
#### Example
|
|
@@ -342,34 +336,20 @@ Sends user profile data. Uses cached `sid` if not provided.
|
|
|
342
336
|
<!-- DOCGEN:params SessionProfilePayload -->
|
|
343
337
|
| Field | Type | Required | Description |
|
|
344
338
|
| ----- | ---- | :------: | ----------- |
|
|
345
|
-
| `name` | string | Yes | Internal profile identifier or display name for the user.
|
|
346
|
-
|
|
347
|
-
| `
|
|
348
|
-
|
|
349
|
-
| `
|
|
350
|
-
|
|
351
|
-
| `
|
|
352
|
-
|
|
353
|
-
| `age` | string | Yes | User's age for age-appropriate sizing and recommendations.
|
|
354
|
-
Stored as string to accommodate various age formats. |
|
|
355
|
-
| `is3dFeel` | boolean | Yes | Feature flag indicating if advanced 3D fit visualization is enabled.
|
|
356
|
-
Affects the level of detail in size recommendations and fit analysis. |
|
|
357
|
-
| `weight` | string | Yes | User's body weight in the unit system specified by isMetric.
|
|
358
|
-
Used for comprehensive fit analysis and size calculations. |
|
|
359
|
-
| `height` | string | Yes | User's height in the unit system specified by isMetric.
|
|
360
|
-
Critical measurement for accurate size recommendations. |
|
|
339
|
+
| `name` | string | Yes | Internal profile identifier or display name for the user.<br>Typically used for analytics and user identification within Sizebay's system. |
|
|
340
|
+
| `skinType` | number | Yes | Skin tone classification used for color matching and style recommendations.<br>Numerical value representing different skin tone categories. |
|
|
341
|
+
| `footShape` | string | Yes | Foot shape classification for footwear recommendations.<br>Used to provide better shoe fit analysis when available. |
|
|
342
|
+
| `gender` | string | Yes | User's gender for size system selection and fit calculations.<br>Uses single character format as defined by Sizebay's standards. |
|
|
343
|
+
| `age` | string | Yes | User's age for age-appropriate sizing and recommendations.<br>Stored as string to accommodate various age formats. |
|
|
344
|
+
| `is3dFeel` | boolean | Yes | Feature flag indicating if advanced 3D fit visualization is enabled.<br>Affects the level of detail in size recommendations and fit analysis. |
|
|
345
|
+
| `weight` | string | Yes | User's body weight in the unit system specified by isMetric.<br>Used for comprehensive fit analysis and size calculations. |
|
|
346
|
+
| `height` | string | Yes | User's height in the unit system specified by isMetric.<br>Critical measurement for accurate size recommendations. |
|
|
361
347
|
| `measures` | { insoleLength: number; poundWeight: number | null; } | Yes | Additional precise body measurements for enhanced fit accuracy. |
|
|
362
|
-
| `product` | string | Yes | Product context or identifier related to the current profiling session.
|
|
363
|
-
|
|
364
|
-
| `
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
| `bodyShapeChest` | number | Yes | Chest/bust body shape index for clothing fit analysis.
|
|
368
|
-
Numerical value representing body proportions in the chest area. |
|
|
369
|
-
| `bodyShapeHip` | number | Yes | Hip body shape index for lower body clothing fit analysis.
|
|
370
|
-
Numerical value representing body proportions in the hip area. |
|
|
371
|
-
| `bodyShapeWaist` | number | Yes | Waist body shape index for torso fit analysis.
|
|
372
|
-
Numerical value representing body proportions in the waist area. |
|
|
348
|
+
| `product` | string | Yes | Product context or identifier related to the current profiling session.<br>Can link the profile to a specific product being viewed. |
|
|
349
|
+
| `isMetric` | boolean | Yes | Unit system preference for all measurements and recommendations.<br>- true: Metric system (cm, kg)<br>- false: Imperial system (inches, lbs) |
|
|
350
|
+
| `bodyShapeChest` | number | Yes | Chest/bust body shape index for clothing fit analysis.<br>Numerical value representing body proportions in the chest area. |
|
|
351
|
+
| `bodyShapeHip` | number | Yes | Hip body shape index for lower body clothing fit analysis.<br>Numerical value representing body proportions in the hip area. |
|
|
352
|
+
| `bodyShapeWaist` | number | Yes | Waist body shape index for torso fit analysis.<br>Numerical value representing body proportions in the waist area. |
|
|
373
353
|
<!-- /DOCGEN -->
|
|
374
354
|
|
|
375
355
|
#### Example
|
|
@@ -421,8 +401,7 @@ await client.sendProfile(profilePayload);
|
|
|
421
401
|
| `style` | string | Yes | The style classification of the product. |
|
|
422
402
|
| `gtin` | string | Yes | The Global Trade Item Number (GTIN) for the product. |
|
|
423
403
|
| `additionalImageLinks` | string[] | Yes | A list of additional image URLs for the product. |
|
|
424
|
-
| `suitableSizes` | SuitableSizeDto[] | No | Size recommendations from Sizebay's What Fits Me feature, including comfort scores.
|
|
425
|
-
This is populated when personalized sizing is available. |
|
|
404
|
+
| `suitableSizes` | SuitableSizeDto[] | No | Size recommendations from Sizebay's What Fits Me feature, including comfort scores.<br>This is populated when personalized sizing is available. |
|
|
426
405
|
| `clothType` | ClothType | No | The standardized clothing type, used for recommendations and size chart matching. |
|
|
427
406
|
<!-- /DOCGEN -->
|
|
428
407
|
|
|
@@ -442,14 +421,9 @@ This is populated when personalized sizing is available. |
|
|
|
442
421
|
<!-- DOCGEN:params SuitableSizeDto -->
|
|
443
422
|
| Field | Type | Required | Description |
|
|
444
423
|
| ----- | ---- | :------: | ----------- |
|
|
445
|
-
| `size` | string | Yes | Size label as defined in the product catalog (e.g., "M", "42", "8-10").
|
|
446
|
-
|
|
447
|
-
| `
|
|
448
|
-
- 0.0 = Very uncomfortable fit
|
|
449
|
-
- 0.5 = Adequate fit
|
|
450
|
-
- 1.0 = Perfect comfortable fit |
|
|
451
|
-
| `value` | boolean | No | Boolean indicator of whether this size is considered suitable for the user.
|
|
452
|
-
Based on comfort threshold and fit analysis algorithms. |
|
|
424
|
+
| `size` | string | Yes | Size label as defined in the product catalog (e.g., "M", "42", "8-10").<br>Uses the same format as the store's size system. |
|
|
425
|
+
| `comfortable` | number | Yes | AI-calculated comfort score ranging from 0 to 1, where a lower value indicates a better fit:<br>- 0.0 = Perfect, comfortable fit<br>- 0.5 = Adequate, but potentially tight/loose fit<br>- 1.0 = Very uncomfortable fit |
|
|
426
|
+
| `value` | boolean | No | Boolean indicator of whether this size is considered suitable for the user.<br>Based on comfort threshold and fit analysis algorithms. |
|
|
453
427
|
<!-- /DOCGEN -->
|
|
454
428
|
|
|
455
429
|
### `ComplementaryPairDto`
|
|
@@ -457,10 +431,8 @@ Based on comfort threshold and fit analysis algorithms. |
|
|
|
457
431
|
<!-- DOCGEN:params ComplementaryPairDto -->
|
|
458
432
|
| Field | Type | Required | Description |
|
|
459
433
|
| ----- | ---- | :------: | ----------- |
|
|
460
|
-
| `first` | ProductDto | Yes | First recommended product that complements the base product sent in the request.
|
|
461
|
-
|
|
462
|
-
| `secondary` | ProductDto | No | Second recommended product that complements the base product sent in the request.
|
|
463
|
-
May be null if no suitable second complementary item is found. |
|
|
434
|
+
| `first` | ProductDto | Yes | First recommended product that complements the base product sent in the request.<br>This product is selected based on style compatibility and fashion rules. |
|
|
435
|
+
| `secondary` | ProductDto | No | Second recommended product that complements the base product sent in the request.<br>May be null if no suitable second complementary item is found. |
|
|
464
436
|
<!-- /DOCGEN -->
|
|
465
437
|
|
|
466
438
|
### `ClothType`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sizebay-core-sdk",
|
|
3
|
-
"version": "1.10.0-dev.
|
|
3
|
+
"version": "1.10.0-dev.4",
|
|
4
4
|
"description": "A SDK designed for integrating multiple services (such as event tracking, AI services, etc.) into your application.",
|
|
5
5
|
"main": "dist/sizebay-core-sdk.umd.js",
|
|
6
6
|
"module": "dist/sizebay-core-sdk.es.js",
|