sizebay-core-sdk 1.5.0 → 1.6.0

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
@@ -109,6 +109,7 @@ Fetch products similar to a reference.
109
109
  | `sid` | string | Yes | String user ID |
110
110
  | `permalink` | string | Yes | Reference product URL |
111
111
  | `sizeSystem` | string | Yes | e.g. `"BR"`, `"EU"` |
112
+ | `similarityThreshold`| number | Yes | Threshold for similarity-by-image search |
112
113
  | `page` | number | No | Page number |
113
114
  | `perPage` | number | No | Items per page |
114
115
  | `filterByWhatFitsMe` | boolean | No | Enable “What Fits Me” filter (default: `false`) |
@@ -132,6 +133,7 @@ const similarResponse = await client.getSimilarProducts({
132
133
  sid: 'abc123',
133
134
  permalink: 'https://domain.com/product/xyz',
134
135
  sizeSystem: 'US',
136
+ similarityThreshold: 0.5,
135
137
  page: 1,
136
138
  perPage: 10
137
139
  });
@@ -153,6 +155,7 @@ Retrieve pairs of complementary products.
153
155
  | `sid` | string | Yes | String user ID |
154
156
  | `permalink` | string | Yes | Reference product URL |
155
157
  | `sizeSystem` | string | Yes | e.g. `"BR"`, `"EU"` |
158
+ | `similarityThreshold`| number | Yes | Threshold for similarity-by-image search |
156
159
  | `limit` | number | No | Max number of pairs |
157
160
  | `filterByWhatFitsMe` | boolean | No | Enable WFM filter |
158
161
  | `personaHash` | string | Cond.\* | Required when WFM filter is on |
@@ -179,6 +182,7 @@ const compResponse = await client.getComplementaryProducts({
179
182
  sid: 'abc123',
180
183
  permalink: 'https://domain.com/product/xyz',
181
184
  sizeSystem: 'US',
185
+ similarityThreshold: 0.5,
182
186
  limit: 5
183
187
  });
184
188
  console.log(compResponse.baseProduct, compResponse.complementary);
@@ -201,6 +205,7 @@ Find visually similar items from an uploaded image.
201
205
  | `collectionName` | string | Yes | Embeddings collection |
202
206
  | `sid` | string | Yes | String user ID |
203
207
  | `sizeSystem` | string | Yes | Size system |
208
+ | `similarityThreshold`| number | Yes | Threshold for similarity-by-image search |
204
209
  | `filterByWhatFitsMe` | boolean | No | Apply WFM filter |
205
210
  | `personaHash` | string | Cond.\* | Required when WFM is on |
206
211
  | `gender` | string | No | User gender context |
@@ -247,6 +252,7 @@ Get products that complete a look from an image.
247
252
  | `collectionName` | string | Yes | Embeddings collection |
248
253
  | `sid` | string | Yes | String user ID |
249
254
  | `sizeSystem` | string | Yes | Size system |
255
+ | `similarityThreshold`| number | Yes | Threshold for similarity-by-image search |
250
256
  | `productClass` | `"top" \| "bottom" \| "shoe" \| "fullbody"` | Yes | Base item class |
251
257
  | `filterByWhatFitsMe` | boolean | No | Apply WFM filter |
252
258
  | `personaHash` | string | Cond.\* | Required when WFM is on |
@@ -275,6 +281,7 @@ const imgComp = await client.searchComplementaryByImage({
275
281
  collectionName: 'clothing',
276
282
  sid: 'abc123',
277
283
  sizeSystem: 'US',
284
+ similarityThreshold: 0.5,
278
285
  productClass: 'top'
279
286
  });
280
287
  console.log(imgComp.complementary);
@@ -9,6 +9,7 @@ export interface GetSimilarProductsParams {
9
9
  sizeSystem: string;
10
10
  filterByWhatFitsMe?: boolean;
11
11
  personaHash?: string;
12
+ similarityThreshold: number;
12
13
  }
13
14
  export interface GetComplementaryProductsParams {
14
15
  tenantId: string;
@@ -19,6 +20,7 @@ export interface GetComplementaryProductsParams {
19
20
  sizeSystem: string;
20
21
  filterByWhatFitsMe?: boolean;
21
22
  personaHash?: string;
23
+ similarityThreshold: number;
22
24
  }
23
25
  export interface GetRecommendedSizeByProductsParams {
24
26
  tenantId: number;
@@ -83,6 +85,7 @@ export interface GetSimilarByImageBodyDto {
83
85
  category?: string;
84
86
  page?: number;
85
87
  perPage?: number;
88
+ similarityThreshold?: number;
86
89
  }
87
90
  export interface GetComplementaryByImageBodyDto {
88
91
  image: string;
@@ -98,6 +101,7 @@ export interface GetComplementaryByImageBodyDto {
98
101
  color?: string;
99
102
  page?: number;
100
103
  perPage?: number;
104
+ similarityThreshold: number;
101
105
  }
102
106
  export interface GetComplementaryProductsByImageResponse {
103
107
  baseProduct: ProductDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sizebay-core-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
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",