@djust-b2b/djust-front-sdk 1.15.0 → 1.15.1

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.
@@ -7,144 +7,45 @@ exports.getProductVariantOffers = getProductVariantOffers;
7
7
  exports.getProductVariantSuppliers = getProductVariantSuppliers;
8
8
  exports.getProduct = getProduct;
9
9
  exports.getProductOffers = getProductOffers;
10
- exports.getProductPaginatedOffers = getProductPaginatedOffers;
11
10
  exports.getRelatedProducts = getRelatedProducts;
12
11
  exports.getProductReviews = getProductReviews;
13
12
  exports.getProductStatReviews = getProductStatReviews;
14
13
  exports.getProductVariantAttributes = getProductVariantAttributes;
15
14
  exports.createProductReview = createProductReview;
16
15
  exports.updateProductReview = updateProductReview;
16
+ exports.getProductPaginatedOffers = getProductPaginatedOffers;
17
17
  const parameters_validation_1 = require("../../helpers/parameters-validation");
18
18
  const fetch_instance_1 = require("../../settings/fetch-instance");
19
19
  /**
20
- * ## Search product with text expression for search and autocomplete
21
- * ### APICODE(PRODUCT 553)
22
- * @param {AutoCompleteSearchProductsParameters} params - Parameters for search product with text expression for search and autocomplete
23
- * #### locale - `string` | <strong style={{ color: 'red'}}>(required)</strong>
24
- * #### currency - `string` | <strong style={{ color: 'red'}}>(required)</strong>
25
- * #### input - `string`
26
- * #### pageable - `object`
27
- * #### aggregation - `string` (PRODUCT, VARIANT)
28
- * #### productTags - `string[]` | <strong style={{ color: 'red'}}>(optional)</strong>
29
- *
30
- * @returns {Promise<SearchProductsResponse>} - The response with the products
31
- *
32
- * @example
33
- * ###input
20
+ * 📄 Search products with a text expression for search and autocomplete.
21
+ *
22
+ * This function provides product search and autocomplete capabilities.
23
+ *
24
+ * 🛠 **Endpoint**: `GET /v2/shop/autocomplete`
25
+ *
26
+ * | Parameter | Type | Required | Description |
27
+ * |-----------------|--------------|----------|---------------------------------------------|
28
+ * | `input` | `string` | | The text expression to search for. |
29
+ * | `locale` | `string` | ✅ | The locale for the search. |
30
+ * | `currency` | `string` | ✅ | The currency for price formatting. |
31
+ * | `pageable.page` | `number` | ❌ | The page number to fetch (0-based index). |
32
+ * | `pageable.size` | `number` | ❌ | The number of items per page. |
33
+ * | `aggregation` | `boolean` | ❌ | Whether to include aggregation data. |
34
+ * | `productTags` | `string[]` | ❌ | Filters by product tags. |
35
+ *
36
+ * 📤 **Returns**:
37
+ * A `Promise` resolving to a `SearchProductsResponse` containing the matched products.
38
+ *
39
+ * 🛠 **Example usage**:
34
40
  * ```typescript
35
- * const response = await autoCompleteSearchProducts({
36
- * input: 'test',
37
- * locale: 'fr',
38
- * currency: 'EUR',
39
- * pageable: {
40
- * page: 1,
41
- * size: 10,
42
- * },
43
- * aggregation: 'PRODUCT',
44
- * productTags: ['tag1', 'tag2'],
41
+ * const products = await autoCompleteSearchProducts({
42
+ * input: 'laptop',
43
+ * locale: 'en-US',
44
+ * currency: 'USD',
45
+ * pageable: { page: 0, size: 10 },
45
46
  * });
47
+ * console.log(products);
46
48
  * ```
47
- *
48
- * Reponse - <strong style={{ color: 'green' }}>200</strong> - OK
49
- * ```json
50
- * {
51
- * "products": [
52
- * {
53
- * "attributes": [
54
- * {
55
- * "externalId": "string",
56
- * "externalSource": "MIRAKL",
57
- * "id": string,
58
- * "names": {
59
- * additionalProp1: "string",
60
- * additionalProp2: "string",
61
- * additionalProp3: "string",
62
- * }
63
- * }
64
- * ],
65
- * "offer": {
66
- * "currency": "EUR",
67
- * customFields: [
68
- * {
69
- * "externalId": "string",
70
- * "id": string,
71
- * "name": "string",
72
- * "values": [ "string" ]
73
- * }
74
- * ],
75
- * "externalId": "string",
76
- * "id": "string",
77
- * "leadTimeToShip": "string",
78
- * "maxOrderQuantity": 1,
79
- * "minOrderQuantity": 1,
80
- * "minShippingPrice": 0,
81
- * "minStockAlert": 0,
82
- * "packingType": "BOX",
83
- * "productUnit": "string",
84
- * "quantityPerItem": 0,
85
- * "stock": 5
86
- * },
87
- * "offerPrice": {
88
- * "discountPerItem": 0,
89
- * "discountUnitPrice": 0,
90
- * "itemPerPack": 0,
91
- * "id": "string",
92
- * "price": 0,
93
- * "externalId": "string",
94
- * "itemPrice": 0,
95
- * "offerPriceType": "PUBLIC",
96
- * "unitPrice": 0,
97
- * "unitPriceTTC": 0,
98
- * },
99
- * "product": {
100
- * "brand": "string"
101
- * "description": "string",
102
- * "externalId": string,
103
- * "id": "string",
104
- * "mainPictureUrl": "string"
105
- * "name": "string",
106
- * "sku": "string",
107
- * "tags": [
108
- * {
109
- * "id": "string",
110
- * "name": "string"
111
- * }
112
- * ],
113
- * "unit": {
114
- * "id": "string",
115
- * "type": "ITEM",
116
- * "unit": "string"
117
- * }
118
- * },
119
- * "supplier": {
120
- * "externalId": "string",
121
- * "id": "string",
122
- * "name": "string"
123
- * },
124
- * "variant": {
125
- * "description": "string",
126
- * "ean": "string",
127
- * "externalId": "string",
128
- * "id": "string",
129
- * "mpn": "string",
130
- * "name": "string",
131
- * "pictureUrls": [
132
- * {
133
- * "formatType": "string",
134
- * "heightInPx": 0,
135
- * "sizeType": "string",
136
- * "url": "string",
137
- * "widthInPx": 0,
138
- * "main": true
139
- * }
140
- * ],
141
- * "sku": "string"
142
- * },
143
- * }
144
- * ]
145
- * }
146
- * ```
147
- *
148
49
  */
149
50
  async function autoCompleteSearchProducts({ input, locale, currency, pageable, aggregation, productTags, }) {
150
51
  (0, parameters_validation_1.required)({ input, locale, currency });
@@ -159,218 +60,33 @@ async function autoCompleteSearchProducts({ input, locale, currency, pageable, a
159
60
  productTags,
160
61
  page: pageable === null || pageable === void 0 ? void 0 : pageable.page,
161
62
  size: pageable === null || pageable === void 0 ? void 0 : pageable.size,
162
- sort: pageable === null || pageable === void 0 ? void 0 : pageable.sort,
163
63
  },
164
64
  });
165
65
  return data;
166
66
  }
167
67
  /**
168
- * ## Get product list with filtering and pagination
169
- * ### APICODE(PRODUCT 552)
170
- * @param {GetProductsListParameters} params - Parameters for retrieving the product list, with filters, pagination, and locale.
171
- * #### locale - `string` | <strong style={{ color: 'red'}}>(required)</strong>
172
- * #### filters - `object` | <strong style={{ color: 'red'}}>(required)</strong>
173
- * #### pageable - `object`
68
+ * 📄 Fetches a list of products with thumbnails, reviews, attributes, and best offers.
69
+ *
70
+ * 🛠 **Endpoint**: `GET /v2/shop/search`
174
71
  *
175
- * @returns {Promise<GetProductsListResponse>} - The response with the products
72
+ * | Parameter | Type | Required | Description |
73
+ * |-----------------|--------------|----------|---------------------------------------------|
74
+ * | `locale` | `string` | ✅ | The locale for product data. |
75
+ * | `filters` | `object` | ❌ | Filters for narrowing down search results. |
76
+ * | `pageable.page` | `number` | ❌ | The page number to fetch (0-based index). |
77
+ * | `pageable.size` | `number` | ❌ | The number of items per page. |
176
78
  *
177
- * @example
178
- * ### Input
79
+ * 📤 **Returns**:
80
+ * A `Promise` resolving to a `GetProductsListResponse` containing the products and their metadata.
81
+ *
82
+ * 🛠 **Example usage**:
179
83
  * ```typescript
180
- * const response = await getProductsList({
181
- * locale: 'fr',
182
- * filters: {
183
- * currency: 'EUR',
184
- * categoryIds: ['category1', 'category2'],
185
- * skus: ['sku1', 'sku2'],
186
- * brand: ['brand1', 'brand2'],
187
- * query: 'query',
188
- * productTags: ['tag1', 'tag2'],
189
- * aggregation: 'PRODUCT',
190
- * attributes: ['attribute1', 'attribute2'],
191
- * suppliers: ['supplier1', 'supplier2'],
192
- * customFields: ['customField1', 'customField2'],
193
- * offerUpdatedTime: '2024-12-11T10:28:21.123Z',
194
- * productUpdatedTime: '2024-12-11T10:28:21.123Z'
195
- * },
196
- * pageable: {
197
- * page: 1,
198
- * size: 10,
199
- * sort: ['price,asc']
200
- * }
84
+ * const products = await getProductsList({
85
+ * locale: 'en-US',
86
+ * filters: { category: 'electronics' },
87
+ * pageable: { page: 1, size: 20 },
201
88
  * });
202
- * ```
203
- *
204
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
205
- * ```json
206
- * {
207
- * "facets": {
208
- * "attributes": [
209
- * {
210
- * "id": "string",
211
- * "name": "string",
212
- * "values": ["string"]
213
- * }
214
- * ],
215
- * "brands": [
216
- * {
217
- * "id": "string",
218
- * "name": "string"
219
- * }
220
- * ],
221
- * "customFields": [
222
- * {
223
- * "id": "string",
224
- * "name": "string",
225
- * "values": ["string"]
226
- * }
227
- * ],
228
- * "productTags": [
229
- * {
230
- * "id": "string",
231
- * "name": "string"
232
- * }
233
- * ],
234
- * "suppliers": [
235
- * {
236
- * "externalId": "string",
237
- * "id": "string",
238
- * "name": "string"
239
- * }
240
- * ]
241
- * },
242
- * "products": {
243
- * "content": [
244
- * {
245
- * "attributes": [
246
- * {
247
- * "externalId": "string",
248
- * "externalSource": "MIRAKL",
249
- * "id": "string",
250
- * "names": {
251
- * "additionalProp1": "string",
252
- * "additionalProp2": "string",
253
- * "additionalProp3": "string"
254
- * }
255
- * }
256
- * ],
257
- * "offer": {
258
- * "currency": "USD",
259
- * "customFields": [
260
- * {
261
- * "externalId": "string",
262
- * "id": "string",
263
- * "name": "string",
264
- * "values": ["string"]
265
- * }
266
- * ],
267
- * "externalId": "string",
268
- * "id": "string",
269
- * "leadTimeToShip": "string",
270
- * "maxOrderQuantity": 0,
271
- * "minOrderQuantity": 0,
272
- * "minShippingPrice": 0,
273
- * "minStockAlert": 0,
274
- * "packingType": "BOX",
275
- * "productUnit": "string",
276
- * "quantityPerItem": 0,
277
- * "stock": 0
278
- * },
279
- * "offerPrice": {
280
- * "discountItemPrice": 0,
281
- * "discountUnitPrice": 0,
282
- * "externalId": "string",
283
- * "id": "string",
284
- * "itemPerPack": 0,
285
- * "itemPrice": 0,
286
- * "offerPriceType": "PUBLIC",
287
- * "price": 0,
288
- * "unitPrice": 0,
289
- * "unitPriceTTC": 0
290
- * },
291
- * "product": {
292
- * "brand": "string",
293
- * "description": "string",
294
- * "externalId": "string",
295
- * "id": "string",
296
- * "mainPictureUrl": "string",
297
- * "name": "string",
298
- * "sku": "string",
299
- * "tags": [
300
- * {
301
- * "id": "string",
302
- * "name": "string"
303
- * }
304
- * ],
305
- * "unit": {
306
- * "id": "string",
307
- * "type": "ITEM",
308
- * "unit": "string"
309
- * }
310
- * },
311
- * "supplier": {
312
- * "externalId": "string",
313
- * "id": "string",
314
- * "name": "string"
315
- * },
316
- * "variant": {
317
- * "description": "string",
318
- * "ean": "string",
319
- * "externalId": "string",
320
- * "id": "string",
321
- * "mpn": "string",
322
- * "name": "string",
323
- * "pictureUrls": [
324
- * {
325
- * "formatType": "string",
326
- * "heightInPx": 0,
327
- * "main": true,
328
- * "sizeType": "string",
329
- * "url": "string",
330
- * "widthInPx": 0
331
- * }
332
- * ],
333
- * "sku": "string"
334
- * }
335
- * }
336
- * ],
337
- * "empty": true,
338
- * "first": true,
339
- * "last": true,
340
- * "number": 0,
341
- * "numberOfElements": 0,
342
- * "pageable": {
343
- * "offset": 0,
344
- * "pageNumber": 0,
345
- * "pageSize": 0,
346
- * "paged": true,
347
- * "sort": [
348
- * {
349
- * "ascending": true,
350
- * "descending": true,
351
- * "direction": "ASC",
352
- * "ignoreCase": true,
353
- * "nullHandling": "NATIVE",
354
- * "property": "string"
355
- * }
356
- * ],
357
- * "unpaged": true
358
- * },
359
- * "size": 0,
360
- * "sort": [
361
- * {
362
- * "ascending": true,
363
- * "descending": true,
364
- * "direction": "ASC",
365
- * "ignoreCase": true,
366
- * "nullHandling": "NATIVE",
367
- * "property": "string"
368
- * }
369
- * ],
370
- * "totalElements": 0,
371
- * "totalPages": 0
372
- * }
373
- * }
89
+ * console.log(products);
374
90
  * ```
375
91
  */
376
92
  async function getProductsList({ locale, filters, pageable, }) {
@@ -383,135 +99,33 @@ async function getProductsList({ locale, filters, pageable, }) {
383
99
  locale,
384
100
  page: pageable === null || pageable === void 0 ? void 0 : pageable.page,
385
101
  size: pageable === null || pageable === void 0 ? void 0 : pageable.size,
386
- sort: pageable === null || pageable === void 0 ? void 0 : pageable.sort,
387
102
  },
388
103
  });
389
104
  return data;
390
105
  }
391
106
  /**
392
- * ## Get paginated list of a product's variants
393
- * ### APICODE(PRODUCT 506)
394
- * @param {GetProductVariantsListParameters} params - Parameters for retrieving a product's variants, with pagination and locale.
395
- * #### productSku - `string` | <strong style={{ color: 'red'}}>(required)</strong>
396
- * #### locale - `string`
397
- * #### pageable - `object`
107
+ * 📄 Fetches product variants by product SKU.
108
+ *
109
+ * 🛠 **Endpoint**: `GET /v1/shop/product-variants`
398
110
  *
399
- * @returns {Promise<GetProductVariantsListResponse>} - The response with the product variants
111
+ * | Parameter | Type | Required | Description |
112
+ * |-----------------|--------------|----------|--------------------------------------------|
113
+ * | `productSku` | `string` | ✅ | The SKU of the product. |
114
+ * | `locale` | `string` | ❌ | The locale for product variants. |
115
+ * | `pageable.page` | `number` | ❌ | The page number to fetch (0-based index). |
116
+ * | `pageable.size` | `number` | ❌ | The number of items per page. |
400
117
  *
401
- * @example
402
- * ### Input
118
+ * 📤 **Returns**:
119
+ * A `Promise` resolving to a `GetProductVariantsListResponse` containing the product variants.
120
+ *
121
+ * 🛠 **Example usage**:
403
122
  * ```typescript
404
- * const response = await getProductVariantsList({
405
- * productSku: 'product-sku-123',
406
- * locale: 'fr',
407
- * pageable: {
408
- * page: 1,
409
- * size: 10,
410
- * sort: ['name,asc']
411
- * }
123
+ * const variants = await getProductVariantsList({
124
+ * productSku: 'sku123',
125
+ * locale: 'en-US',
126
+ * pageable: { page: 0, size: 10 },
412
127
  * });
413
- * ```
414
- *
415
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
416
- * ```json
417
- * {
418
- * "content": [
419
- * {
420
- * "attributeValues": [
421
- * {
422
- * "attribute": {
423
- * "externalId": "string",
424
- * "id": "string",
425
- * "name": {
426
- * "additionalProp1": "string",
427
- * "additionalProp2": "string",
428
- * "additionalProp3": "string"
429
- * },
430
- * "type": "LONG_TEXT"
431
- * },
432
- * "value": {}
433
- * }
434
- * ],
435
- * "description": "string",
436
- * "ean": "string",
437
- * "externalId": "string",
438
- * "id": "string",
439
- * "info": {
440
- * "description": "string",
441
- * "ean": "string",
442
- * "mpn": "string",
443
- * "name": "string",
444
- * "sku": "string"
445
- * },
446
- * "mpn": "string",
447
- * "name": "string",
448
- * "productMediaInfoDTO": {
449
- * "isMain": true,
450
- * "urls": [
451
- * {
452
- * "formatType": "string",
453
- * "heightInPx": 0,
454
- * "sizeType": "string",
455
- * "url": "string",
456
- * "widthInPx": 0
457
- * }
458
- * ]
459
- * },
460
- * "productPictures": [
461
- * {
462
- * "isMain": true,
463
- * "urls": [
464
- * {
465
- * "formatType": "string",
466
- * "heightInPx": 0,
467
- * "sizeType": "string",
468
- * "url": "string",
469
- * "widthInPx": 0
470
- * }
471
- * ]
472
- * }
473
- * ],
474
- * "skuProduct": "string",
475
- * "skuVariant": "string",
476
- * "status": "NEW"
477
- * }
478
- * ],
479
- * "empty": true,
480
- * "first": true,
481
- * "last": true,
482
- * "number": 0,
483
- * "numberOfElements": 0,
484
- * "pageable": {
485
- * "offset": 0,
486
- * "pageNumber": 0,
487
- * "pageSize": 0,
488
- * "paged": true,
489
- * "sort": [
490
- * {
491
- * "ascending": true,
492
- * "descending": true,
493
- * "direction": "ASC",
494
- * "ignoreCase": true,
495
- * "nullHandling": "NATIVE",
496
- * "property": "string"
497
- * }
498
- * ],
499
- * "unpaged": true
500
- * },
501
- * "size": 0,
502
- * "sort": [
503
- * {
504
- * "ascending": true,
505
- * "descending": true,
506
- * "direction": "ASC",
507
- * "ignoreCase": true,
508
- * "nullHandling": "NATIVE",
509
- * "property": "string"
510
- * }
511
- * ],
512
- * "totalElements": 0,
513
- * "totalPages": 0
514
- * }
128
+ * console.log(variants);
515
129
  * ```
516
130
  */
517
131
  async function getProductVariantsList({ productSku, locale, pageable, }) {
@@ -524,202 +138,57 @@ async function getProductVariantsList({ productSku, locale, pageable, }) {
524
138
  locale,
525
139
  page: pageable === null || pageable === void 0 ? void 0 : pageable.page,
526
140
  size: pageable === null || pageable === void 0 ? void 0 : pageable.size,
527
- sort: pageable === null || pageable === void 0 ? void 0 : pageable.sort,
528
141
  },
529
142
  });
530
143
  return data;
531
144
  }
532
145
  /**
533
- * ## Get List of Offers for a Product Variant
534
- * ### APICODE(PRODUCT 508)
535
- * @param {GetProductVariantOffersParameters} params - Parameters for retrieving offers of a product variant.
536
- * #### productIdentifier - `string` | <strong style={{ color: 'red'}}>(required)</strong>
537
- * #### productIdType - `string` | <strong style={{ color: 'red'}}>(required)</strong> (e.g., "sku", "id", or "externalId")
538
- * #### currency - `string`
146
+ * 📄 Fetches offers for a specific product variant.
539
147
  *
540
- * @returns {Promise<GetProductVariantOffersResponse>} - The response with the product variant offers
148
+ * Retrieves the list of offers available for a product variant identified by SKU, ID, or external ID.
541
149
  *
542
- * @example
543
- * ### Input
544
- * ```typescript
545
- * const response = await getProductVariantOffers({
546
- * productIdentifier: 'sku-12345',
150
+ * 🛠 **Endpoint**: `GET /v1/shop/product-variants/{productIdentifier}/offers`
151
+ *
152
+ * | Parameter | Type | Required | Description |
153
+ * |-----------------------|-------------|------------|---------------------------------------------------------------|
154
+ * | `productIdentifier` | `string` | ✅ | Unique identifier for the product variant (e.g., SKU, ID). |
155
+ * | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
156
+ * | `currency` | `string` | ✅ | Currency in which offers should be returned (e.g., `"USD"`). |
157
+ *
158
+ * 📤 **Returns**:
159
+ * A `Promise<GetProductVariantOffersResponse>` containing a list of offers for the product variant.
160
+ *
161
+ * 🛠 **Example usage**:
162
+ * ```ts
163
+ * const offers = await getProductVariantOffers({
164
+ * productIdentifier: 'sku123',
547
165
  * productIdType: 'sku',
548
- * currency: 'EUR'
166
+ * currency: 'USD',
549
167
  * });
168
+ *
169
+ * console.log(offers);
550
170
  * ```
551
171
  *
552
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
172
+ * **Example Response**:
553
173
  * ```json
554
- * [
555
- * {
556
- * "estimatedDeliveryDates": [
557
- * {
558
- * "code": "string",
559
- * "deliveryTimeRange": {
560
- * "earliestDeliveryDate": "2025-01-06T14:37:05.142Z",
561
- * "latestDeliveryDate": "2025-01-06T14:37:05.142Z"
562
- * },
563
- * "label": "string",
564
- * "shippingPriceUnit": 0,
565
- * "shippingZone": {
566
- * "code": "string",
567
- * "label": "string"
568
- * }
569
- * }
570
- * ],
571
- * "offerInventory": {
572
- * "brand": "string",
174
+ * {
175
+ * "offers": [
176
+ * {
177
+ * "id": "offer1",
178
+ * "price": 19.99,
573
179
  * "currency": "USD",
574
- * "customFieldValues": [
575
- * {
576
- * "customField": {
577
- * "externalId": "string",
578
- * "id": "string",
579
- * "name": {
580
- * "additionalProp1": "string",
581
- * "additionalProp2": "string",
582
- * "additionalProp3": "string"
583
- * },
584
- * "type": "LONG_TEXT"
585
- * },
586
- * "value": {}
587
- * }
588
- * ],
589
- * "externalSource": "MIRAKL",
590
- * "id": "string",
591
- * "leadTimeToShip": 0,
592
- * "maxOrderQuantity": 0,
593
- * "minOrderQuantity": 0,
594
- * "minShippingPrice": 0,
595
- * "minShippingPriceAdditional": 0,
596
- * "minShippingType": "string",
597
- * "minShippingZone": "string",
598
- * "minStockAlert": 0,
599
- * "packingType": "BOX",
600
- * "productUnit": "string",
601
- * "quantityPerItem": 0,
602
- * "status": "ACTIVE",
603
- * "stock": 0,
604
- * "variant": {
605
- * "attributeValues": [
606
- * {
607
- * "attribute": {
608
- * "externalId": "string",
609
- * "id": "string",
610
- * "name": {
611
- * "additionalProp1": "string",
612
- * "additionalProp2": "string",
613
- * "additionalProp3": "string"
614
- * },
615
- * "type": "LONG_TEXT"
616
- * },
617
- * "value": {}
618
- * }
619
- * ],
620
- * "description": "string",
621
- * "ean": "string",
622
- * "externalId": "string",
623
- * "id": "string",
624
- * "info": {
625
- * "description": "string",
626
- * "ean": "string",
627
- * "mpn": "string",
628
- * "name": "string",
629
- * "sku": "string"
630
- * },
631
- * "mpn": "string",
632
- * "name": "string",
633
- * "productMediaInfoDTO": {
634
- * "isMain": true,
635
- * "urls": [
636
- * {
637
- * "formatType": "string",
638
- * "heightInPx": 0,
639
- * "sizeType": "string",
640
- * "url": "string",
641
- * "widthInPx": 0
642
- * }
643
- * ]
644
- * },
645
- * "productPictures": [
646
- * {
647
- * "isMain": true,
648
- * "urls": [
649
- * {
650
- * "formatType": "string",
651
- * "heightInPx": 0,
652
- * "sizeType": "string",
653
- * "url": "string",
654
- * "widthInPx": 0
655
- * }
656
- * ]
657
- * }
658
- * ],
659
- * "skuProduct": "string",
660
- * "skuVariant": "string",
661
- * "status": "NEW"
662
- * }
180
+ * "availability": "In Stock",
181
+ * "seller": "Seller A"
663
182
  * },
664
- * "offerPrices": [
665
- * {
666
- * "customerAccountId": "string",
667
- * "customerTagId": "string",
668
- * "externalId": "string",
669
- * "id": "string",
670
- * "itemPerPack": 0,
671
- * "offerPriceType": "PUBLIC",
672
- * "priceRanges": [
673
- * {
674
- * "discountPrice": {
675
- * "itemPrice": 0,
676
- * "itemPriceTTC": 0,
677
- * "unitPrice": 0,
678
- * "unitPriceTTC": 0
679
- * },
680
- * "price": {
681
- * "itemPrice": 0,
682
- * "itemPriceTTC": 0,
683
- * "unitPrice": 0,
684
- * "unitPriceTTC": 0
685
- * },
686
- * "quantity": 0
687
- * }
688
- * ]
689
- * }
690
- * ],
691
- * "supplier": {
692
- * "customFieldValues": [
693
- * {
694
- * "customField": {
695
- * "externalId": "string",
696
- * "externalSource": "MIRAKL",
697
- * "faceted": true,
698
- * "id": "string",
699
- * "indexable": true,
700
- * "mandatory": true,
701
- * "name": {
702
- * "additionalProp1": "string",
703
- * "additionalProp2": "string",
704
- * "additionalProp3": "string"
705
- * },
706
- * "role": "PRODUCT_TAX_RATE",
707
- * "sealedTarget": "string",
708
- * "searchable": true,
709
- * "sortable": true,
710
- * "status": "ACTIVE"
711
- * },
712
- * "value": {}
713
- * }
714
- * ],
715
- * "externalId": "string",
716
- * "id": "string",
717
- * "name": "string",
718
- * "returnPolicy": "string",
719
- * "supplierRating": "string"
183
+ * {
184
+ * "id": "offer2",
185
+ * "price": 17.99,
186
+ * "currency": "USD",
187
+ * "availability": "Limited Stock",
188
+ * "seller": "Seller B"
720
189
  * }
721
- * }
722
- * ]
190
+ * ]
191
+ * }
723
192
  * ```
724
193
  */
725
194
  async function getProductVariantOffers({ productIdentifier, productIdType, currency, }) {
@@ -735,73 +204,26 @@ async function getProductVariantOffers({ productIdentifier, productIdType, curre
735
204
  return data;
736
205
  }
737
206
  /**
738
- * ## Get Suppliers of a Product Variant
739
- * ### APICODE(PRODUCT 507)
740
- * @param {GetProductVariantSuppliersParameters} params - Parameters for retrieving the suppliers of a product variant.
741
- * #### productVariantId - `string` | <strong style={{ color: 'red'}}>(required)</strong>
207
+ * 📄 Fetches suppliers associated with a product variant.
742
208
  *
743
- * @returns {Promise<GetProductVariantSuppliersResponse>} - The response with the product variant suppliers
209
+ * Retrieves a list of suppliers for a given product variant.
744
210
  *
745
- * @example
746
- * ### Input
747
- * ```typescript
748
- * const response = await getProductVariantSuppliers({
749
- * productVariantId: 'variant-12345'
211
+ * 🛠 **Endpoint**: `GET /v1/shop/product-variants/{productVariantId}/suppliers`
212
+ *
213
+ * | Parameter | Type | Required | Description |
214
+ * |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
215
+ * | `productVariantId` | `string` | ✅ | ID of the product variant. |
216
+ *
217
+ * 📤 **Returns**:
218
+ * A `Promise<GetProductVariantSuppliersResponse>` containing the list of suppliers.
219
+ *
220
+ * 🛠 **Example usage**:
221
+ * ```ts
222
+ * const suppliers = await getProductVariantSuppliers({
223
+ * productVariantId: 'variant123',
750
224
  * });
751
- * ```
752
225
  *
753
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
754
- * ```json
755
- * [
756
- * {
757
- * "additionalImageLink": [
758
- * "string"
759
- * ],
760
- * "banner": "string",
761
- * "createdAt": "2025-01-06T14:43:34.185Z",
762
- * "customFieldValues": [
763
- * {
764
- * "customField": {
765
- * "externalId": "string",
766
- * "externalSource": "MIRAKL",
767
- * "faceted": true,
768
- * "id": "string",
769
- * "indexable": true,
770
- * "mandatory": true,
771
- * "name": {
772
- * "additionalProp1": "string",
773
- * "additionalProp2": "string",
774
- * "additionalProp3": "string"
775
- * },
776
- * "role": "PRODUCT_TAX_RATE",
777
- * "sealedTarget": "string",
778
- * "searchable": true,
779
- * "sortable": true,
780
- * "status": "ACTIVE"
781
- * },
782
- * "value": {}
783
- * }
784
- * ],
785
- * "description": "string",
786
- * "evaluationCount": 0,
787
- * "externalId": "string",
788
- * "externalSource": "MIRAKL",
789
- * "id": "string",
790
- * "isDefault": true,
791
- * "logo": "string",
792
- * "name": "string",
793
- * "paymentDueDate": {
794
- * "paymentDueDateDelay": 0,
795
- * "paymentDueDateMode": "SIMPLE"
796
- * },
797
- * "returnPolicy": "string",
798
- * "supplierRating": "string",
799
- * "supplierStatus": "ACTIVE",
800
- * "totalOffers": 0,
801
- * "totalOrders": 0,
802
- * "updatedAt": "2025-01-06T14:43:34.185Z"
803
- * }
804
- * ]
226
+ * console.log(suppliers);
805
227
  * ```
806
228
  */
807
229
  async function getProductVariantSuppliers({ productVariantId, }) {
@@ -813,91 +235,30 @@ async function getProductVariantSuppliers({ productVariantId, }) {
813
235
  return data;
814
236
  }
815
237
  /**
816
- * ## Get a Product by SKU, ID, or External ID
817
- * ### APICODE(PRODUCT 500)
818
- * @param {GetProductParameters} params - Parameters for retrieving a product.
819
- * #### productIdentifier - `string` | <strong style={{ color: 'red'}}>(required)</strong>
820
- * #### productIdType - `"sku" | "id" | "externalId"` | <strong style={{ color: 'red'}}>(required)</strong>
821
- * #### locale - `string`
238
+ * 📄 Fetches details for a specific product.
822
239
  *
823
- * @returns {Promise<Product>}
240
+ * Retrieves information about a product identified by SKU, ID, or external ID.
824
241
  *
825
- * @example
826
- * ### Input
827
- * ```typescript
828
- * const response = await getProduct({
829
- * productIdentifier: "product-12345",
830
- * productIdType: "sku",
831
- * locale: "en-US"
242
+ * 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}`
243
+ *
244
+ * | Parameter | Type | Required | Description |
245
+ * |-----------------------|-------------|------------|---------------------------------------------------------------|
246
+ * | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
247
+ * | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
248
+ * | `locale` | `string` | ✅ | Locale for the product details (e.g., `"en_US"`). |
249
+ *
250
+ * 📤 **Returns**:
251
+ * A `Promise<GetProductsListResponse>` containing the product details.
252
+ *
253
+ * 🛠 **Example usage**:
254
+ * ```ts
255
+ * const product = await getProduct({
256
+ * productIdentifier: 'sku123',
257
+ * productIdType: 'sku',
258
+ * locale: 'en_US',
832
259
  * });
833
- * ```
834
260
  *
835
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
836
- * ```json
837
- * {
838
- * "attributeValues": [
839
- * {
840
- * "attribute": {
841
- * "externalId": "string",
842
- * "id": "string",
843
- * "name": {
844
- * "additionalProp1": "string",
845
- * "additionalProp2": "string",
846
- * "additionalProp3": "string"
847
- * },
848
- * "type": "LONG_TEXT"
849
- * },
850
- * "value": {}
851
- * }
852
- * ],
853
- * "classificationCategory": {
854
- * "externalId": "string",
855
- * "externalSource": "MIRAKL",
856
- * "id": "string",
857
- * "name": "string"
858
- * },
859
- * "externalId": "string",
860
- * "externalSource": "MIRAKL",
861
- * "id": "string",
862
- * "info": {
863
- * "brand": "string",
864
- * "description": "string",
865
- * "name": "string",
866
- * "sku": "string",
867
- * "unit": {
868
- * "id": "string",
869
- * "type": "ITEM",
870
- * "unit": "string"
871
- * }
872
- * },
873
- * "productPictures": [
874
- * {
875
- * "isMain": true,
876
- * "urls": [
877
- * {
878
- * "formatType": "string",
879
- * "heightInPx": 0,
880
- * "sizeType": "string",
881
- * "url": "string",
882
- * "widthInPx": 0
883
- * }
884
- * ]
885
- * }
886
- * ],
887
- * "productStatus": "NEW",
888
- * "productUnit": {
889
- * "id": "string",
890
- * "type": "ITEM",
891
- * "unit": "string"
892
- * },
893
- * "sku": "string",
894
- * "tags": [
895
- * {
896
- * "id": "string",
897
- * "name": "string"
898
- * }
899
- * ]
900
- * }
261
+ * console.log(product);
901
262
  * ```
902
263
  */
903
264
  async function getProduct({ productIdentifier, productIdType, locale, }) {
@@ -913,203 +274,28 @@ async function getProduct({ productIdentifier, productIdType, locale, }) {
913
274
  return data;
914
275
  }
915
276
  /**
916
- * ## Get Offers of a Product by SKU, ID, or External ID
917
- * @deprecated This method is deprecated and replaced by APICODE(PRODUCT 509). Please update your implementation to use the new API.
918
- *
919
- * ### Deprecated Function
920
- * Fetches the list of offers for a given product based on its identifier.
921
- * ### APICODE(PRODUCT 502)
922
-
923
- * @param {GetProductOffersParameters} params - Parameters for retrieving product offers.
924
- * #### productIdentifier - `string` | <strong style={{ color: 'red'}}>required</strong>
925
- * #### productIdType - `"sku" | "id" | "externalId"` | <strong style={{ color: 'red'}}>required</strong>
926
- * #### locale - `string`
927
- * #### currency - `string`
928
- *
929
- * @returns {Promise<GetProductOffersResponse>} A promise that resolves to the response from the API.
930
- *
931
- * @example
932
- * ### Input
277
+ * 📄 Fetches product offers by SKU, ID, or external ID.
278
+ *
279
+ * 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/offers`
280
+ *
281
+ * | Parameter | Type | Required | Description |
282
+ * |---------------------|--------------|----------|-------------------------------------------------|
283
+ * | `productIdentifier` | `string` | ✅ | The unique identifier of the product. |
284
+ * | `productIdType` | `string` | ✅ | The type of the identifier (`sku`, `id`, etc.).|
285
+ * | `currency` | `string` | | The currency for the offer details. |
286
+ *
287
+ * 📤 **Returns**:
288
+ * A `Promise` resolving to a `GetProductVariantOffersResponse` containing the offers.
289
+ *
290
+ * 🛠 **Example usage**:
933
291
  * ```typescript
934
- * const response = await getProductOffers({
935
- * productIdentifier: "product-12345",
936
- * productIdType: "sku",
937
- * locale: "en-US",
938
- * currency: "USD"
292
+ * const offers = await getProductVariantOffers({
293
+ * productIdentifier: 'sku123',
294
+ * productIdType: 'sku',
295
+ * currency: 'USD',
939
296
  * });
297
+ * console.log(offers);
940
298
  * ```
941
- *
942
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
943
- * ```json
944
- * [
945
- * {
946
- * "estimatedDeliveryDates": [
947
- * {
948
- * "code": "string",
949
- * "deliveryTimeRange": {
950
- * "earliestDeliveryDate": "2025-01-06T15:57:23.302Z",
951
- * "latestDeliveryDate": "2025-01-06T15:57:23.302Z"
952
- * },
953
- * "label": "string",
954
- * "shippingPriceUnit": 0,
955
- * "shippingZone": {
956
- * "code": "string",
957
- * "label": "string"
958
- * }
959
- * }
960
- * ],
961
- * "offerInventory": {
962
- * "brand": "string",
963
- * "currency": "USD",
964
- * "customFieldValues": [
965
- * {
966
- * "customField": {
967
- * "externalId": "string",
968
- * "id": "string",
969
- * "name": {
970
- * "additionalProp1": "string",
971
- * "additionalProp2": "string",
972
- * "additionalProp3": "string"
973
- * },
974
- * "type": "LONG_TEXT"
975
- * },
976
- * "value": {}
977
- * }
978
- * ],
979
- * "externalSource": "MIRAKL",
980
- * "id": "string",
981
- * "leadTimeToShip": 0,
982
- * "maxOrderQuantity": 0,
983
- * "minOrderQuantity": 0,
984
- * "minShippingPrice": 0,
985
- * "minShippingPriceAdditional": 0,
986
- * "minShippingType": "string",
987
- * "minShippingZone": "string",
988
- * "minStockAlert": 0,
989
- * "packingType": "BOX",
990
- * "productUnit": "string",
991
- * "quantityPerItem": 0,
992
- * "status": "ACTIVE",
993
- * "stock": 0,
994
- * "variant": {
995
- * "attributeValues": [
996
- * {
997
- * "attribute": {
998
- * "externalId": "string",
999
- * "id": "string",
1000
- * "name": {
1001
- * "additionalProp1": "string",
1002
- * "additionalProp2": "string",
1003
- * "additionalProp3": "string"
1004
- * },
1005
- * "type": "LONG_TEXT"
1006
- * },
1007
- * "value": {}
1008
- * }
1009
- * ],
1010
- * "description": "string",
1011
- * "ean": "string",
1012
- * "externalId": "string",
1013
- * "id": "string",
1014
- * "info": {
1015
- * "description": "string",
1016
- * "ean": "string",
1017
- * "mpn": "string",
1018
- * "name": "string",
1019
- * "sku": "string"
1020
- * },
1021
- * "mpn": "string",
1022
- * "name": "string",
1023
- * "productMediaInfoDTO": {
1024
- * "isMain": true,
1025
- * "urls": [
1026
- * {
1027
- * "formatType": "string",
1028
- * "heightInPx": 0,
1029
- * "sizeType": "string",
1030
- * "url": "string",
1031
- * "widthInPx": 0
1032
- * }
1033
- * ]
1034
- * },
1035
- * "productPictures": [
1036
- * {
1037
- * "isMain": true,
1038
- * "urls": [
1039
- * {
1040
- * "formatType": "string",
1041
- * "heightInPx": 0,
1042
- * "sizeType": "string",
1043
- * "url": "string",
1044
- * "widthInPx": 0
1045
- * }
1046
- * ]
1047
- * }
1048
- * ],
1049
- * "skuProduct": "string",
1050
- * "skuVariant": "string",
1051
- * "status": "NEW"
1052
- * }
1053
- * },
1054
- * "offerPrices": [
1055
- * {
1056
- * "customerAccountId": "string",
1057
- * "customerTagId": "string",
1058
- * "externalId": "string",
1059
- * "id": "string",
1060
- * "itemPerPack": 0,
1061
- * "offerPriceType": "PUBLIC",
1062
- * "priceRanges": [
1063
- * {
1064
- * "discountPrice": {
1065
- * "itemPrice": 0,
1066
- * "itemPriceTTC": 0,
1067
- * "unitPrice": 0,
1068
- * "unitPriceTTC": 0
1069
- * },
1070
- * "price": {
1071
- * "itemPrice": 0,
1072
- * "itemPriceTTC": 0,
1073
- * "unitPrice": 0,
1074
- * "unitPriceTTC": 0
1075
- * },
1076
- * "quantity": 0
1077
- * }
1078
- * ]
1079
- * }
1080
- * ],
1081
- * "supplier": {
1082
- * "customFieldValues": [
1083
- * {
1084
- * "customField": {
1085
- * "externalId": "string",
1086
- * "externalSource": "MIRAKL",
1087
- * "faceted": true,
1088
- * "id": "string",
1089
- * "indexable": true,
1090
- * "mandatory": true,
1091
- * "name": {
1092
- * "additionalProp1": "string",
1093
- * "additionalProp2": "string",
1094
- * "additionalProp3": "string"
1095
- * },
1096
- * "role": "PRODUCT_TAX_RATE",
1097
- * "sealedTarget": "string",
1098
- * "searchable": true,
1099
- * "sortable": true,
1100
- * "status": "ACTIVE"
1101
- * },
1102
- * "value": {}
1103
- * }
1104
- * ],
1105
- * "externalId": "string",
1106
- * "id": "string",
1107
- * "name": "string",
1108
- * "returnPolicy": "string",
1109
- * "supplierRating": "string"
1110
- * }
1111
- * }
1112
- * ]
1113
299
  */
1114
300
  async function getProductOffers({ productIdentifier, productIdType, locale, currency, }) {
1115
301
  (0, parameters_validation_1.required)({ productIdentifier, productIdType });
@@ -1125,217 +311,34 @@ async function getProductOffers({ productIdentifier, productIdType, locale, curr
1125
311
  return data;
1126
312
  }
1127
313
  /**
1128
- * ## Get Paginated Offers of a Product by SKU, ID, or External ID
1129
- * ### APICODE(PRODUCT 509 - REPLACES PRODUCT 502)
1130
- * @param {GetProductPaginatedOffersParameters} params - Parameters for retrieving paginated offers.
1131
- * #### productIdentifier - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1132
- * #### productIdType - `string` | <strong style={{ color: 'red' }}>(required)</strong> (e.g., "sku", "id", or "externalId")
1133
- * #### currency - `string`
1134
- * #### locale - `string`
1135
- * #### withoutPrices - `boolean`
1136
- * #### pageable - `object`
1137
- *
1138
- * @returns {Promise<GetProductPaginatedOffersResponse>} - The response with paginated offers.
1139
- *
1140
- * @example
1141
- * ### Input
1142
- * ```typescript
1143
- * const response = await getProductPaginatedOffers({
1144
- * productIdentifier: 'sku-67890',
1145
- * productIdType: 'sku',
1146
- * currency: 'USD',
1147
- * locale: 'en-US',
1148
- * withoutPrices: false,
1149
- * pageable: {
1150
- * page: 0,
1151
- * size: 10,
1152
- * sort: 'price,asc'
1153
- * }
1154
- * });
1155
- * ```
314
+ * 📄 Fetches related products for a specific product.
1156
315
  *
1157
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
1158
- * ```json
1159
- * {
1160
- * "content": [
1161
- * {
1162
- * "estimatedDeliveryDates": [
1163
- * {
1164
- * "code": "string",
1165
- * "deliveryTimeRange": {
1166
- * "earliestDeliveryDate": "2025-01-06T16:33:58.524Z",
1167
- * "latestDeliveryDate": "2025-01-06T16:33:58.525Z"
1168
- * },
1169
- * "label": "string",
1170
- * "shippingPriceUnit": 0,
1171
- * "shippingZone": {
1172
- * "code": "string",
1173
- * "label": "string"
1174
- * }
1175
- * }
1176
- * ],
1177
- * "offerInventory": {
1178
- * "brand": "string",
1179
- * "currency": "USD",
1180
- * "stock": 0,
1181
- * "variant": {
1182
- * "description": "string",
1183
- * "sku": "string",
1184
- * "name": "string"
1185
- * }
1186
- * },
1187
- * "offerPrices": [
1188
- * {
1189
- * "priceRanges": [
1190
- * {
1191
- * "price": {
1192
- * "unitPrice": 100,
1193
- * "itemPrice": 100
1194
- * },
1195
- * "quantity": 1
1196
- * }
1197
- * ]
1198
- * }
1199
- * ],
1200
- * "supplier": {
1201
- * "id": "string",
1202
- * "name": "string",
1203
- * "supplierRating": "5/5"
1204
- * }
1205
- * }
1206
- * ],
1207
- * "empty": false,
1208
- * "first": true,
1209
- * "last": false,
1210
- * "number": 0,
1211
- * "size": 10,
1212
- * "totalElements": 100,
1213
- * "totalPages": 10
1214
- * }
1215
- * ```
1216
- */
1217
- async function getProductPaginatedOffers({ productIdentifier, productIdType, currency, locale, withoutPrices, pageable, }) {
1218
- (0, parameters_validation_1.required)({ productIdentifier, productIdType });
1219
- const { data } = await (0, fetch_instance_1.enhancedFetch)({
1220
- method: "GET",
1221
- path: `/v1/shop/products/${productIdentifier}/paginated-offers`,
1222
- params: {
1223
- productIdType,
1224
- currency,
1225
- locale,
1226
- withoutPrices,
1227
- page: pageable === null || pageable === void 0 ? void 0 : pageable.page,
1228
- size: pageable === null || pageable === void 0 ? void 0 : pageable.size,
1229
- sort: pageable === null || pageable === void 0 ? void 0 : pageable.sort,
1230
- },
1231
- });
1232
- return data;
1233
- }
1234
- /**
1235
- * ## Get Related Products by SKU, ID, or External ID
1236
- * ### APICODE(PRODUCT 503)
1237
- * @param {GetRelatedProductsParameters} params - Parameters for retrieving related products.
1238
- * #### productIdentifier - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1239
- * #### productIdType - `string` | <strong style={{ color: 'red' }}>(required)</strong> (e.g., "sku", "id", or "externalId")
1240
- * #### locale - `string`
1241
- * #### currency - `string
1242
- * #### pageable - `object`
1243
- *
1244
- * @returns {Promise<GetRelatedProductsResponse>} - The response with related products.
1245
- *
1246
- * @example
1247
- * ### Input
1248
- * ```typescript
1249
- * const response = await getRelatedProducts({
1250
- * productIdentifier: 'sku-12345',
316
+ * Retrieves a paginated list of related products identified by SKU, ID, or external ID.
317
+ *
318
+ * 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/related-products`
319
+ *
320
+ * | Parameter | Type | Required | Description |
321
+ * |-----------------------|-------------|------------|---------------------------------------------------------------|
322
+ * | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
323
+ * | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
324
+ * | `locale` | `string` | ✅ | Locale for the related products (e.g., `"en_US"`). |
325
+ * | `currency` | `string` | ✅ | Currency for the related products (e.g., `"USD"`). |
326
+ * | `pageable` | `object` | ❌ | Pagination details: `page`, `size`, `sort`. |
327
+ *
328
+ * 📤 **Returns**:
329
+ * A `Promise<GetRelatedProductsParameters>` containing related products.
330
+ *
331
+ * 🛠 **Example usage**:
332
+ * ```ts
333
+ * const relatedProducts = await getRelatedProducts({
334
+ * productIdentifier: 'sku123',
1251
335
  * productIdType: 'sku',
1252
- * locale: 'fr-FR',
336
+ * locale: 'en_US',
1253
337
  * currency: 'USD',
1254
- * pageable: {
1255
- * page: 0,
1256
- * size: 10,
1257
- * sort: 'name,asc'
1258
- * }
338
+ * pageable: { page: 1, size: 10 },
1259
339
  * });
1260
- * ```
1261
340
  *
1262
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
1263
- * ```json
1264
- * {
1265
- * "aggregations": [
1266
- * {
1267
- * "buckets": [
1268
- * {
1269
- * "count": 0,
1270
- * "externalId": "string",
1271
- * "id": "string",
1272
- * "key": "string",
1273
- * "name": "string",
1274
- * "values": ["string"]
1275
- * }
1276
- * ],
1277
- * "type": "string"
1278
- * }
1279
- * ],
1280
- * "productThumbnails": {
1281
- * "content": [
1282
- * {
1283
- * "bestOffer": {
1284
- * "offerInventory": {
1285
- * "brand": "string",
1286
- * "currency": "USD",
1287
- * "stock": 10,
1288
- * "variant": {
1289
- * "description": "string",
1290
- * "sku": "string",
1291
- * "name": "string"
1292
- * }
1293
- * },
1294
- * "offerPrice": {
1295
- * "priceRanges": [
1296
- * {
1297
- * "price": {
1298
- * "unitPrice": 100,
1299
- * "itemPrice": 100
1300
- * },
1301
- * "quantity": 1
1302
- * }
1303
- * ]
1304
- * }
1305
- * },
1306
- * "product": {
1307
- * "info": {
1308
- * "brand": "string",
1309
- * "name": "string",
1310
- * "sku": "string"
1311
- * },
1312
- * "productPictures": [
1313
- * {
1314
- * "urls": [
1315
- * {
1316
- * "url": "string",
1317
- * "widthInPx": 100,
1318
- * "heightInPx": 100
1319
- * }
1320
- * ]
1321
- * }
1322
- * ]
1323
- * },
1324
- * "productReviewRatings": {
1325
- * "countRating": 10,
1326
- * "rating": 4.5
1327
- * }
1328
- * }
1329
- * ],
1330
- * "empty": false,
1331
- * "first": true,
1332
- * "last": false,
1333
- * "number": 0,
1334
- * "size": 10,
1335
- * "totalElements": 100,
1336
- * "totalPages": 10
1337
- * }
1338
- * }
341
+ * console.log(relatedProducts);
1339
342
  * ```
1340
343
  */
1341
344
  async function getRelatedProducts({ productIdentifier, productIdType, locale, currency, pageable, }) {
@@ -1355,107 +358,28 @@ async function getRelatedProducts({ productIdentifier, productIdType, locale, cu
1355
358
  return data;
1356
359
  }
1357
360
  /**
1358
- * ## Get Product Reviews by SKU, ID, or External ID
1359
- * ### APICODE(PRODUCT 504)
1360
- * @param {GetProductReviewsParameters} params - Parameters for retrieving product reviews.
1361
- * #### productIdentifier - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1362
- * #### productIdType - `string` | <strong style={{ color: 'red' }}>(required)</strong> (e.g., "sku", "id", or "externalId")
361
+ * 📄 Fetches reviews for a specific product.
1363
362
  *
1364
- * @returns {Promise<GetProductReviewsResponse>} - The response with product reviews.
363
+ * Retrieves a list of reviews for a product identified by SKU, ID, or external ID.
1365
364
  *
1366
- * @example
1367
- * ### Input
1368
- * ```typescript
1369
- * const response = await getProductReviews({
1370
- * productIdentifier: 'sku-12345',
365
+ * 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/reviews`
366
+ *
367
+ * | Parameter | Type | Required | Description |
368
+ * |-----------------------|-------------|------------|---------------------------------------------------------------|
369
+ * | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
370
+ * | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
371
+ *
372
+ * 📤 **Returns**:
373
+ * A `Promise<GetProductReviewsResponse>` containing the reviews.
374
+ *
375
+ * 🛠 **Example usage**:
376
+ * ```ts
377
+ * const reviews = await getProductReviews({
378
+ * productIdentifier: 'sku123',
1371
379
  * productIdType: 'sku',
1372
380
  * });
1373
- * ```
1374
381
  *
1375
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
1376
- * ```json
1377
- * [
1378
- * {
1379
- * "productReview": {
1380
- * "message": "string",
1381
- * "rating": 0
1382
- * },
1383
- * "user": {
1384
- * "customerUserId": "string",
1385
- * "email": "string",
1386
- * "firstName": "string",
1387
- * "lastName": "string"
1388
- * }
1389
- * }
1390
- * ]
1391
- * ```
1392
- *
1393
- * ### Response - <strong style={{ color: 'red' }}>404</strong> - Not Found
1394
- * ```json
1395
- * {
1396
- * "content": {},
1397
- * "errors": [
1398
- * {
1399
- * "cause": {
1400
- * "localizedMessage": "string",
1401
- * "message": "string",
1402
- * "stackTrace": [
1403
- * {
1404
- * "classLoaderName": "string",
1405
- * "className": "string",
1406
- * "fileName": "string",
1407
- * "lineNumber": 0,
1408
- * "methodName": "string",
1409
- * "moduleName": "string",
1410
- * "moduleVersion": "string",
1411
- * "nativeMethod": true
1412
- * }
1413
- * ]
1414
- * },
1415
- * "code": "string",
1416
- * "detail": "string",
1417
- * "localizedMessage": "string",
1418
- * "message": "string",
1419
- * "stackTrace": [
1420
- * {
1421
- * "classLoaderName": "string",
1422
- * "className": "string",
1423
- * "fileName": "string",
1424
- * "lineNumber": 0,
1425
- * "methodName": "string",
1426
- * "moduleName": "string",
1427
- * "moduleVersion": "string",
1428
- * "nativeMethod": true
1429
- * }
1430
- * ],
1431
- * "suppressed": [
1432
- * {
1433
- * "localizedMessage": "string",
1434
- * "message": "string",
1435
- * "stackTrace": [
1436
- * {
1437
- * "classLoaderName": "string",
1438
- * "className": "string",
1439
- * "fileName": "string",
1440
- * "lineNumber": 0,
1441
- * "methodName": "string",
1442
- * "moduleName": "string",
1443
- * "moduleVersion": "string",
1444
- * "nativeMethod": true
1445
- * }
1446
- * ]
1447
- * }
1448
- * ]
1449
- * }
1450
- * ],
1451
- * "warnings": [
1452
- * {
1453
- * "code": "string",
1454
- * "field": "string",
1455
- * "message": "string"
1456
- * }
1457
- * ]
1458
- * }
382
+ * console.log(reviews);
1459
383
  * ```
1460
384
  */
1461
385
  async function getProductReviews({ productIdentifier, productIdType, }) {
@@ -1470,97 +394,28 @@ async function getProductReviews({ productIdentifier, productIdType, }) {
1470
394
  return data;
1471
395
  }
1472
396
  /**
1473
- * ## Get Stat Reviews of a Product by SKU, ID, or External ID
1474
- * ### APICODE(PRODUCT 505)
1475
- * @param {GetProductStatReviewsParameters} params - Parameters for retrieving statistical reviews of a product.
1476
- * #### productIdentifier - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1477
- * #### productIdType - `string` | <strong style={{ color: 'red' }}>(required)</strong> (e.g., "sku", "id", or "externalId")
397
+ * 📄 Fetches statistical review data for a specific product.
1478
398
  *
1479
- * @returns {Promise<GetProductStatReviewsResponse>} - The response with statistical reviews.
399
+ * Retrieves aggregate review statistics for a product identified by SKU, ID, or external ID.
1480
400
  *
1481
- * @example
1482
- * ### Input
1483
- * ```typescript
1484
- * const response = await getProductStatReviews({
1485
- * productIdentifier: 'sku-12345',
401
+ * 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/stat-reviews`
402
+ *
403
+ * | Parameter | Type | Required | Description |
404
+ * |-----------------------|-------------|------------|---------------------------------------------------------------|
405
+ * | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
406
+ * | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
407
+ *
408
+ * 📤 **Returns**:
409
+ * A `Promise<GetProductStatReviewsResponse>` containing review statistics.
410
+ *
411
+ * 🛠 **Example usage**:
412
+ * ```ts
413
+ * const stats = await getProductStatReviews({
414
+ * productIdentifier: 'sku123',
1486
415
  * productIdType: 'sku',
1487
416
  * });
1488
- * ```
1489
- *
1490
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
1491
- * ```json
1492
- * {
1493
- * "countRating": 0,
1494
- * "rating": 0
1495
- * }
1496
- * ```
1497
417
  *
1498
- * ### Response - <strong style={{ color: 'red' }}>404</strong> - Not Found
1499
- * ```json
1500
- * {
1501
- * "content": {},
1502
- * "errors": [
1503
- * {
1504
- * "cause": {
1505
- * "localizedMessage": "string",
1506
- * "message": "string",
1507
- * "stackTrace": [
1508
- * {
1509
- * "classLoaderName": "string",
1510
- * "className": "string",
1511
- * "fileName": "string",
1512
- * "lineNumber": 0,
1513
- * "methodName": "string",
1514
- * "moduleName": "string",
1515
- * "moduleVersion": "string",
1516
- * "nativeMethod": true
1517
- * }
1518
- * ]
1519
- * },
1520
- * "code": "string",
1521
- * "detail": "string",
1522
- * "localizedMessage": "string",
1523
- * "message": "string",
1524
- * "stackTrace": [
1525
- * {
1526
- * "classLoaderName": "string",
1527
- * "className": "string",
1528
- * "fileName": "string",
1529
- * "lineNumber": 0,
1530
- * "methodName": "string",
1531
- * "moduleName": "string",
1532
- * "moduleVersion": "string",
1533
- * "nativeMethod": true
1534
- * }
1535
- * ],
1536
- * "suppressed": [
1537
- * {
1538
- * "localizedMessage": "string",
1539
- * "message": "string",
1540
- * "stackTrace": [
1541
- * {
1542
- * "classLoaderName": "string",
1543
- * "className": "string",
1544
- * "fileName": "string",
1545
- * "lineNumber": 0,
1546
- * "methodName": "string",
1547
- * "moduleName": "string",
1548
- * "moduleVersion": "string",
1549
- * "nativeMethod": true
1550
- * }
1551
- * ]
1552
- * }
1553
- * ]
1554
- * }
1555
- * ],
1556
- * "warnings": [
1557
- * {
1558
- * "code": "string",
1559
- * "field": "string",
1560
- * "message": "string"
1561
- * }
1562
- * ]
1563
- * }
418
+ * console.log(stats);
1564
419
  * ```
1565
420
  */
1566
421
  async function getProductStatReviews({ productIdentifier, productIdType, }) {
@@ -1575,110 +430,30 @@ async function getProductStatReviews({ productIdentifier, productIdType, }) {
1575
430
  return data;
1576
431
  }
1577
432
  /**
1578
- * ## Get Attributes of a Product Variant by SKU, ID, or External ID
1579
- * ### APICODE(PRODUCT 501)
1580
- * @param {GetProductVariantAttributesParameters} params - Parameters for retrieving attributes of a product variant.
1581
- * #### productIdentifier - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1582
- * #### productIdType - `string` | <strong style={{ color: 'red' }}>(required)</strong> (e.g., "sku", "id", or "externalId")
1583
- * #### locale - `string`
433
+ * 📄 Fetches attributes for a product variant.
1584
434
  *
1585
- * @returns {Promise<GetProductVariantAttributesResponse>} - The response with attributes of a product variant.
435
+ * Retrieves attributes for a product variant identified by SKU, ID, or external ID.
1586
436
  *
1587
- * @example
1588
- * ### Input
1589
- * ```typescript
1590
- * const response = await getProductVariantAttributes({
1591
- * productIdentifier: 'sku-12345',
437
+ * 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/variant-attributes`
438
+ *
439
+ * | Parameter | Type | Required | Description |
440
+ * |-----------------------|-------------|------------|---------------------------------------------------------------|
441
+ * | `productIdentifier` | `string` | ✅ | Unique identifier for the product variant (e.g., SKU, ID). |
442
+ * | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
443
+ * | `locale` | `string` | ✅ | Locale for the attributes (e.g., `"en_US"`). |
444
+ *
445
+ * 📤 **Returns**:
446
+ * A `Promise<GetProductVariantAttributesResponse>` containing variant attributes.
447
+ *
448
+ * 🛠 **Example usage**:
449
+ * ```ts
450
+ * const attributes = await getProductVariantAttributes({
451
+ * productIdentifier: 'sku123',
1592
452
  * productIdType: 'sku',
1593
- * locale: 'fr-FR',
453
+ * locale: 'en_US',
1594
454
  * });
1595
- * ```
1596
- *
1597
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
1598
- * ```json
1599
- * [
1600
- * {
1601
- * "externalId": "string",
1602
- * "id": "string",
1603
- * "name": {
1604
- * "additionalProp1": "string",
1605
- * "additionalProp2": "string",
1606
- * "additionalProp3": "string"
1607
- * },
1608
- * "type": "LONG_TEXT",
1609
- * "values": [
1610
- * {}
1611
- * ]
1612
- * }
1613
- * ]
1614
- * ```
1615
455
  *
1616
- * ### Response - <strong style={{ color: 'red' }}>404</strong> - Not Found
1617
- * ```json
1618
- * {
1619
- * "content": {},
1620
- * "errors": [
1621
- * {
1622
- * "cause": {
1623
- * "localizedMessage": "string",
1624
- * "message": "string",
1625
- * "stackTrace": [
1626
- * {
1627
- * "classLoaderName": "string",
1628
- * "className": "string",
1629
- * "fileName": "string",
1630
- * "lineNumber": 0,
1631
- * "methodName": "string",
1632
- * "moduleName": "string",
1633
- * "moduleVersion": "string",
1634
- * "nativeMethod": true
1635
- * }
1636
- * ]
1637
- * },
1638
- * "code": "string",
1639
- * "detail": "string",
1640
- * "localizedMessage": "string",
1641
- * "message": "string",
1642
- * "stackTrace": [
1643
- * {
1644
- * "classLoaderName": "string",
1645
- * "className": "string",
1646
- * "fileName": "string",
1647
- * "lineNumber": 0,
1648
- * "methodName": "string",
1649
- * "moduleName": "string",
1650
- * "moduleVersion": "string",
1651
- * "nativeMethod": true
1652
- * }
1653
- * ],
1654
- * "suppressed": [
1655
- * {
1656
- * "localizedMessage": "string",
1657
- * "message": "string",
1658
- * "stackTrace": [
1659
- * {
1660
- * "classLoaderName": "string",
1661
- * "className": "string",
1662
- * "fileName": "string",
1663
- * "lineNumber": 0,
1664
- * "methodName": "string",
1665
- * "moduleName": "string",
1666
- * "moduleVersion": "string",
1667
- * "nativeMethod": true
1668
- * }
1669
- * ]
1670
- * }
1671
- * ]
1672
- * }
1673
- * ],
1674
- * "warnings": [
1675
- * {
1676
- * "code": "string",
1677
- * "field": "string",
1678
- * "message": "string"
1679
- * }
1680
- * ]
1681
- * }
456
+ * console.log(attributes);
1682
457
  * ```
1683
458
  */
1684
459
  async function getProductVariantAttributes({ productIdentifier, productIdType, locale, }) {
@@ -1694,107 +469,30 @@ async function getProductVariantAttributes({ productIdentifier, productIdType, l
1694
469
  return data;
1695
470
  }
1696
471
  /**
1697
- * ## Create a Review for a Product
1698
- * ### APICODE(PRODUCT 153)
1699
- * @param {CreateProductReviewParameters} params - Parameters for creating a review for a product.
1700
- * #### message - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1701
- * #### productSku - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1702
- * #### rating - `number` | <strong style={{ color: 'red' }}>(required)</strong>
472
+ * 📄 Creates a review for a product.
1703
473
  *
1704
- * @returns {Promise<CreateProductReviewResponse>} - The response with the created product review.
474
+ * Submits a review for a specific product based on its SKU.
1705
475
  *
1706
- * @example
1707
- * ### Input
1708
- * ```typescript
1709
- * const response = await createProductReview({
476
+ * 🛠 **Endpoint**: `POST /v1/shop/reviews`
477
+ *
478
+ * | Parameter | Type | Required | Description |
479
+ * |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
480
+ * | `message` | `string` | ✅ | Review content. |
481
+ * | `productSku` | `string` | ✅ | SKU of the product to review. |
482
+ * | `rating` | `number` | ✅ | Rating (e.g., 1 to 5). |
483
+ *
484
+ * 📤 **Returns**:
485
+ * A `Promise<CreateProductReviewResponse>` indicating the result of the operation.
486
+ *
487
+ * 🛠 **Example usage**:
488
+ * ```ts
489
+ * const review = await createProductReview({
1710
490
  * message: 'Great product!',
1711
- * productSku: 'sku-12345',
491
+ * productSku: 'sku123',
1712
492
  * rating: 5,
1713
493
  * });
1714
- * ```
1715
494
  *
1716
- * ### Response - <strong style={{ color: 'green' }}>201</strong> - Created
1717
- * ```json
1718
- * {
1719
- * "productReview": {
1720
- * "message": "string",
1721
- * "rating": 0
1722
- * },
1723
- * "user": {
1724
- * "customerUserId": "string",
1725
- * "email": "string",
1726
- * "firstName": "string",
1727
- * "lastName": "string"
1728
- * }
1729
- * }
1730
- * ```
1731
- *
1732
- * ### Response - <strong style={{ color: 'red' }}>400</strong> - Bad Request
1733
- * ```json
1734
- * {
1735
- * "content": {},
1736
- * "errors": [
1737
- * {
1738
- * "cause": {
1739
- * "localizedMessage": "string",
1740
- * "message": "string",
1741
- * "stackTrace": [
1742
- * {
1743
- * "classLoaderName": "string",
1744
- * "className": "string",
1745
- * "fileName": "string",
1746
- * "lineNumber": 0,
1747
- * "methodName": "string",
1748
- * "moduleName": "string",
1749
- * "moduleVersion": "string",
1750
- * "nativeMethod": true
1751
- * }
1752
- * ]
1753
- * },
1754
- * "code": "string",
1755
- * "detail": "string",
1756
- * "localizedMessage": "string",
1757
- * "message": "string",
1758
- * "stackTrace": [
1759
- * {
1760
- * "classLoaderName": "string",
1761
- * "className": "string",
1762
- * "fileName": "string",
1763
- * "lineNumber": 0,
1764
- * "methodName": "string",
1765
- * "moduleName": "string",
1766
- * "moduleVersion": "string",
1767
- * "nativeMethod": true
1768
- * }
1769
- * ],
1770
- * "suppressed": [
1771
- * {
1772
- * "localizedMessage": "string",
1773
- * "message": "string",
1774
- * "stackTrace": [
1775
- * {
1776
- * "classLoaderName": "string",
1777
- * "className": "string",
1778
- * "fileName": "string",
1779
- * "lineNumber": 0,
1780
- * "methodName": "string",
1781
- * "moduleName": "string",
1782
- * "moduleVersion": "string",
1783
- * "nativeMethod": true
1784
- * }
1785
- * ]
1786
- * }
1787
- * ]
1788
- * }
1789
- * ],
1790
- * "warnings": [
1791
- * {
1792
- * "code": "string",
1793
- * "field": "string",
1794
- * "message": "string"
1795
- * }
1796
- * ]
1797
- * }
495
+ * console.log(review);
1798
496
  * ```
1799
497
  */
1800
498
  async function createProductReview({ message, productSku, rating, }) {
@@ -1811,167 +509,30 @@ async function createProductReview({ message, productSku, rating, }) {
1811
509
  return data;
1812
510
  }
1813
511
  /**
1814
- * ## Update a Review for a Product
1815
- * ### APICODE(PRODUCT 204)
1816
- * @param {UpdateProductReviewParameters} params - Parameters for updating a product review.
1817
- * #### productReviewId - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1818
- * #### message - `string` | <strong style={{ color: 'red' }}>(required)</strong>
1819
- * #### rating - `number` | <strong style={{ color: 'red' }}>(required)</strong>
512
+ * 📄 Updates an existing review for a product.
1820
513
  *
1821
- * @returns {Promise<UpdateProductReviewResponse>} - The response for updating a product review.
514
+ * Modifies the content and/or rating of an existing review for a specific product.
1822
515
  *
1823
- * @example
1824
- * ### Input
1825
- * ```typescript
1826
- * const response = await updateProductReview({
1827
- * productReviewId: 'review-12345',
1828
- * message: 'Updated review message!',
1829
- * rating: 5,
1830
- * });
1831
- * ```
516
+ * 🛠 **Endpoint**: `PUT /v1/shop/reviews/{productReviewId}`
1832
517
  *
1833
- * ### Response - <strong style={{ color: 'green' }}>200</strong> - OK
1834
- * ```json
1835
- * {
1836
- * "message": "string",
1837
- * "rating": 0
1838
- * }
1839
- * ```
518
+ * | Parameter | Type | Required | Description |
519
+ * |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
520
+ * | `productReviewId` | `string` | ✅ | ID of the review to update. |
521
+ * | `message` | `string` | ✅ | New review content. |
522
+ * | `rating` | `number` | ✅ | New rating (e.g., 1 to 5). |
1840
523
  *
1841
- * ### Response - <strong style={{ color: 'red' }}>400</strong> - Bad Request
1842
- * ```json
1843
- * {
1844
- * "content": {},
1845
- * "errors": [
1846
- * {
1847
- * "cause": {
1848
- * "localizedMessage": "string",
1849
- * "message": "string",
1850
- * "stackTrace": [
1851
- * {
1852
- * "classLoaderName": "string",
1853
- * "className": "string",
1854
- * "fileName": "string",
1855
- * "lineNumber": 0,
1856
- * "methodName": "string",
1857
- * "moduleName": "string",
1858
- * "moduleVersion": "string",
1859
- * "nativeMethod": true
1860
- * }
1861
- * ]
1862
- * },
1863
- * "code": "string",
1864
- * "detail": "string",
1865
- * "localizedMessage": "string",
1866
- * "message": "string",
1867
- * "stackTrace": [
1868
- * {
1869
- * "classLoaderName": "string",
1870
- * "className": "string",
1871
- * "fileName": "string",
1872
- * "lineNumber": 0,
1873
- * "methodName": "string",
1874
- * "moduleName": "string",
1875
- * "moduleVersion": "string",
1876
- * "nativeMethod": true
1877
- * }
1878
- * ],
1879
- * "suppressed": [
1880
- * {
1881
- * "localizedMessage": "string",
1882
- * "message": "string",
1883
- * "stackTrace": [
1884
- * {
1885
- * "classLoaderName": "string",
1886
- * "className": "string",
1887
- * "fileName": "string",
1888
- * "lineNumber": 0,
1889
- * "methodName": "string",
1890
- * "moduleName": "string",
1891
- * "moduleVersion": "string",
1892
- * "nativeMethod": true
1893
- * }
1894
- * ]
1895
- * }
1896
- * ]
1897
- * }
1898
- * ],
1899
- * "warnings": [
1900
- * {
1901
- * "code": "string",
1902
- * "field": "string",
1903
- * "message": "string"
1904
- * }
1905
- * ]
1906
- * }
1907
- * ```
524
+ * 📤 **Returns**:
525
+ * A `Promise<UpdateProductReviewResponse>` indicating the result of the operation.
1908
526
  *
1909
- * ### Response - <strong style={{ color: 'red' }}>404</strong> - Not Found
1910
- * ```json
1911
- * {
1912
- * "content": {},
1913
- * "errors": [
1914
- * {
1915
- * "cause": {
1916
- * "localizedMessage": "string",
1917
- * "message": "string",
1918
- * "stackTrace": [
1919
- * {
1920
- * "classLoaderName": "string",
1921
- * "className": "string",
1922
- * "fileName": "string",
1923
- * "lineNumber": 0,
1924
- * "methodName": "string",
1925
- * "moduleName": "string",
1926
- * "moduleVersion": "string",
1927
- * "nativeMethod": true
1928
- * }
1929
- * ]
1930
- * },
1931
- * "code": "string",
1932
- * "detail": "string",
1933
- * "localizedMessage": "string",
1934
- * "message": "string",
1935
- * "stackTrace": [
1936
- * {
1937
- * "classLoaderName": "string",
1938
- * "className": "string",
1939
- * "fileName": "string",
1940
- * "lineNumber": 0,
1941
- * "methodName": "string",
1942
- * "moduleName": "string",
1943
- * "moduleVersion": "string",
1944
- * "nativeMethod": true
1945
- * }
1946
- * ],
1947
- * "suppressed": [
1948
- * {
1949
- * "localizedMessage": "string",
1950
- * "message": "string",
1951
- * "stackTrace": [
1952
- * {
1953
- * "classLoaderName": "string",
1954
- * "className": "string",
1955
- * "fileName": "string",
1956
- * "lineNumber": 0,
1957
- * "methodName": "string",
1958
- * "moduleName": "string",
1959
- * "moduleVersion": "string",
1960
- * "nativeMethod": true
1961
- * }
1962
- * ]
1963
- * }
1964
- * ]
1965
- * }
1966
- * ],
1967
- * "warnings": [
1968
- * {
1969
- * "code": "string",
1970
- * "field": "string",
1971
- * "message": "string"
1972
- * }
1973
- * ]
1974
- * }
527
+ * 🛠 **Example usage**:
528
+ * ```ts
529
+ * const updatedReview = await updateProductReview({
530
+ * productReviewId: 'review123',
531
+ * message: 'Updated my thoughts, still a great product!',
532
+ * rating: 4,
533
+ * });
534
+ *
535
+ * console.log(updatedReview);
1975
536
  * ```
1976
537
  */
1977
538
  async function updateProductReview({ productReviewId, message, rating, }) {
@@ -1986,3 +547,48 @@ async function updateProductReview({ productReviewId, message, rating, }) {
1986
547
  });
1987
548
  return data;
1988
549
  }
550
+ /**
551
+ * 📄 Fetches paginated offers for a product.
552
+ *
553
+ * Retrieves offers for a product identified by SKU, ID, or external ID, with pagination support.
554
+ *
555
+ * 🛠 **Endpoint**: `GET /v1/shop/products/{productIdentifier}/paginated-offers`
556
+ *
557
+ * | Parameter | Type | Required | Description |
558
+ * |-----------------------|-------------|------------|---------------------------------------------------------------|
559
+ * | `productIdentifier` | `string` | ✅ | Unique identifier for the product (e.g., SKU, ID). |
560
+ * | `productIdType` | `string` | ✅ | The type of identifier: `"sku"`, `"id"`, or `"externalId"`. |
561
+ * | `currency` | `string` | ✅ | Currency for the offers (e.g., `"USD"`). |
562
+ * | `locale` | `string` | ✅ | Locale for the offers (e.g., `"en_US"`). |
563
+ * | `withoutPrices` | `boolean` | ❌ | Whether to exclude prices from the response. |
564
+ * | `pageable` | `object` | ❌ | Pagination details: `page`, `size`, `sort`. |
565
+ *
566
+ * 📤 **Returns**:
567
+ * A `Promise<GetProductPaginatedOffersResponse>` containing paginated offers.
568
+ *
569
+ * 🛠 **Example usage**:
570
+ * ```ts
571
+ * const offers = await getProductPaginatedOffers({
572
+ * productIdentifier: 'sku123',
573
+ * productIdType: 'sku',
574
+ * currency: 'USD',
575
+ * locale: 'en_US',
576
+ * pageable: { page: 1, size
577
+ */
578
+ async function getProductPaginatedOffers({ productIdentifier, productIdType, currency, locale, withoutPrices, pageable, }) {
579
+ (0, parameters_validation_1.required)({ productIdentifier, productIdType });
580
+ const { data } = await (0, fetch_instance_1.enhancedFetch)({
581
+ method: "GET",
582
+ path: `/v1/shop/products/${productIdentifier}/paginated-offers`,
583
+ params: {
584
+ productIdType,
585
+ currency,
586
+ locale,
587
+ withoutPrices,
588
+ page: pageable === null || pageable === void 0 ? void 0 : pageable.page,
589
+ size: pageable === null || pageable === void 0 ? void 0 : pageable.size,
590
+ sort: pageable === null || pageable === void 0 ? void 0 : pageable.sort,
591
+ },
592
+ });
593
+ return data;
594
+ }