@congminh1254/shopee-sdk 0.9.0 → 1.0.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 +178 -36
- package/lib/fetch.js +13 -0
- package/lib/fetch.js.map +1 -1
- package/lib/managers/add-on-deal.manager.d.ts +140 -0
- package/lib/managers/add-on-deal.manager.js +240 -0
- package/lib/managers/add-on-deal.manager.js.map +1 -0
- package/lib/managers/ads.manager.d.ts +217 -1
- package/lib/managers/ads.manager.js +312 -0
- package/lib/managers/ads.manager.js.map +1 -1
- package/lib/managers/bundle-deal.manager.d.ts +106 -0
- package/lib/managers/bundle-deal.manager.js +178 -0
- package/lib/managers/bundle-deal.manager.js.map +1 -0
- package/lib/managers/discount.manager.d.ts +102 -0
- package/lib/managers/discount.manager.js +167 -0
- package/lib/managers/discount.manager.js.map +1 -0
- package/lib/managers/fbs.manager.d.ts +115 -0
- package/lib/managers/fbs.manager.js +145 -0
- package/lib/managers/fbs.manager.js.map +1 -0
- package/lib/managers/first-mile.manager.d.ts +150 -0
- package/lib/managers/first-mile.manager.js +264 -0
- package/lib/managers/first-mile.manager.js.map +1 -0
- package/lib/managers/follow-prize.manager.d.ts +108 -0
- package/lib/managers/follow-prize.manager.js +152 -0
- package/lib/managers/follow-prize.manager.js.map +1 -0
- package/lib/managers/global-product.manager.d.ts +664 -0
- package/lib/managers/global-product.manager.js +904 -0
- package/lib/managers/global-product.manager.js.map +1 -0
- package/lib/managers/index.d.ts +17 -1
- package/lib/managers/index.js +17 -1
- package/lib/managers/index.js.map +1 -1
- package/lib/managers/livestream.manager.d.ts +377 -0
- package/lib/managers/livestream.manager.js +529 -0
- package/lib/managers/livestream.manager.js.map +1 -0
- package/lib/managers/logistics.manager.d.ts +267 -1
- package/lib/managers/logistics.manager.js +544 -0
- package/lib/managers/logistics.manager.js.map +1 -1
- package/lib/managers/media-space.manager.d.ts +179 -0
- package/lib/managers/media-space.manager.js +220 -0
- package/lib/managers/media-space.manager.js.map +1 -0
- package/lib/managers/media.manager.d.ts +226 -0
- package/lib/managers/media.manager.js +274 -0
- package/lib/managers/media.manager.js.map +1 -0
- package/lib/managers/merchant.manager.d.ts +100 -0
- package/lib/managers/merchant.manager.js +144 -0
- package/lib/managers/merchant.manager.js.map +1 -0
- package/lib/managers/order.manager.d.ts +213 -1
- package/lib/managers/order.manager.js +305 -0
- package/lib/managers/order.manager.js.map +1 -1
- package/lib/managers/payment.manager.d.ts +186 -1
- package/lib/managers/payment.manager.js +288 -0
- package/lib/managers/payment.manager.js.map +1 -1
- package/lib/managers/product.manager.d.ts +346 -1
- package/lib/managers/product.manager.js +718 -0
- package/lib/managers/product.manager.js.map +1 -1
- package/lib/managers/returns.manager.d.ts +200 -0
- package/lib/managers/returns.manager.js +300 -0
- package/lib/managers/returns.manager.js.map +1 -0
- package/lib/managers/sbs.manager.d.ts +112 -0
- package/lib/managers/sbs.manager.js +149 -0
- package/lib/managers/sbs.manager.js.map +1 -0
- package/lib/managers/shop-category.manager.d.ts +207 -0
- package/lib/managers/shop-category.manager.js +258 -0
- package/lib/managers/shop-category.manager.js.map +1 -0
- package/lib/managers/shop-flash-sale.manager.d.ts +242 -0
- package/lib/managers/shop-flash-sale.manager.js +321 -0
- package/lib/managers/shop-flash-sale.manager.js.map +1 -0
- package/lib/managers/shop.manager.d.ts +173 -0
- package/lib/managers/shop.manager.js +217 -0
- package/lib/managers/shop.manager.js.map +1 -0
- package/lib/managers/top-picks.manager.d.ts +62 -0
- package/lib/managers/top-picks.manager.js +91 -0
- package/lib/managers/top-picks.manager.js.map +1 -0
- package/lib/schemas/add-on-deal.d.ts +390 -0
- package/lib/schemas/add-on-deal.js +45 -0
- package/lib/schemas/add-on-deal.js.map +1 -0
- package/lib/schemas/ads.d.ts +437 -0
- package/lib/schemas/bundle-deal.d.ts +300 -0
- package/lib/schemas/bundle-deal.js +27 -0
- package/lib/schemas/bundle-deal.js.map +1 -0
- package/lib/schemas/discount.d.ts +334 -0
- package/lib/schemas/discount.js +15 -0
- package/lib/schemas/discount.js.map +1 -0
- package/lib/schemas/fbs.d.ts +117 -0
- package/lib/schemas/fbs.js +2 -0
- package/lib/schemas/fbs.js.map +1 -0
- package/lib/schemas/first-mile.d.ts +551 -0
- package/lib/schemas/first-mile.js +2 -0
- package/lib/schemas/first-mile.js.map +1 -0
- package/lib/schemas/follow-prize.d.ts +198 -0
- package/lib/schemas/follow-prize.js +27 -0
- package/lib/schemas/follow-prize.js.map +1 -0
- package/lib/schemas/global-product.d.ts +1127 -0
- package/lib/schemas/global-product.js +2 -0
- package/lib/schemas/global-product.js.map +1 -0
- package/lib/schemas/index.d.ts +13 -0
- package/lib/schemas/index.js +17 -0
- package/lib/schemas/index.js.map +1 -1
- package/lib/schemas/livestream.d.ts +649 -0
- package/lib/schemas/livestream.js +2 -0
- package/lib/schemas/livestream.js.map +1 -0
- package/lib/schemas/logistics.d.ts +979 -0
- package/lib/schemas/logistics.js +13 -0
- package/lib/schemas/logistics.js.map +1 -1
- package/lib/schemas/media-space.d.ts +189 -0
- package/lib/schemas/media-space.js +2 -0
- package/lib/schemas/media-space.js.map +1 -0
- package/lib/schemas/media.d.ts +230 -0
- package/lib/schemas/media.js +2 -0
- package/lib/schemas/media.js.map +1 -0
- package/lib/schemas/merchant.d.ts +236 -0
- package/lib/schemas/merchant.js +2 -0
- package/lib/schemas/merchant.js.map +1 -0
- package/lib/schemas/order.d.ts +431 -0
- package/lib/schemas/payment.d.ts +397 -0
- package/lib/schemas/product.d.ts +1157 -0
- package/lib/schemas/returns.d.ts +632 -0
- package/lib/schemas/returns.js +63 -0
- package/lib/schemas/returns.js.map +1 -0
- package/lib/schemas/sbs.d.ts +484 -0
- package/lib/schemas/sbs.js +2 -0
- package/lib/schemas/sbs.js.map +1 -0
- package/lib/schemas/shop-category.d.ts +176 -0
- package/lib/schemas/shop-category.js +2 -0
- package/lib/schemas/shop-category.js.map +1 -0
- package/lib/schemas/shop-flash-sale.d.ts +473 -0
- package/lib/schemas/shop-flash-sale.js +43 -0
- package/lib/schemas/shop-flash-sale.js.map +1 -0
- package/lib/schemas/shop.d.ts +250 -0
- package/lib/schemas/shop.js +2 -0
- package/lib/schemas/shop.js.map +1 -0
- package/lib/schemas/top-picks.d.ts +99 -0
- package/lib/schemas/top-picks.js +2 -0
- package/lib/schemas/top-picks.js.map +1 -0
- package/lib/sdk.d.ts +34 -0
- package/lib/sdk.js +34 -0
- package/lib/sdk.js.map +1 -1
- package/package.json +7 -4
|
@@ -169,5 +169,723 @@ export class ProductManager extends BaseManager {
|
|
|
169
169
|
});
|
|
170
170
|
return response;
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Update price of items
|
|
174
|
+
*
|
|
175
|
+
* Use this API to update item price. Can update up to 50 models in one call.
|
|
176
|
+
*
|
|
177
|
+
* @param params - Parameters for updating price
|
|
178
|
+
* @param params.item_id - The ID of the item
|
|
179
|
+
* @param params.price_list - List of prices to update (1-50 items). Each item contains:
|
|
180
|
+
* - model_id: Model ID (use 0 for items without models)
|
|
181
|
+
* - original_price: New original price
|
|
182
|
+
*
|
|
183
|
+
* @returns A promise that resolves to the update price response containing:
|
|
184
|
+
* - success_list: List of successfully updated prices
|
|
185
|
+
* - failure_list: List of failed updates with reasons
|
|
186
|
+
*
|
|
187
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
188
|
+
* - error_item_not_found: Item_id is not found
|
|
189
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
190
|
+
* - error_param: Invalid parameters
|
|
191
|
+
*/
|
|
192
|
+
async updatePrice(params) {
|
|
193
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/update_price", {
|
|
194
|
+
method: "POST",
|
|
195
|
+
auth: true,
|
|
196
|
+
body: params,
|
|
197
|
+
});
|
|
198
|
+
return response;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Update stock of items
|
|
202
|
+
*
|
|
203
|
+
* Use this API to update item stock. Can update up to 50 models in one call.
|
|
204
|
+
* This API updates only "seller_stock".
|
|
205
|
+
*
|
|
206
|
+
* @param params - Parameters for updating stock
|
|
207
|
+
* @param params.item_id - The ID of the item
|
|
208
|
+
* @param params.stock_list - List of stock updates (1-50 items). Each item contains:
|
|
209
|
+
* - model_id: Model ID (use 0 for items without models)
|
|
210
|
+
* - seller_stock: Array of seller stock updates with location_id and stock amount
|
|
211
|
+
*
|
|
212
|
+
* @returns A promise that resolves to the update stock response containing:
|
|
213
|
+
* - success_list: List of successfully updated stock
|
|
214
|
+
* - failure_list: List of failed updates with reasons
|
|
215
|
+
*
|
|
216
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
217
|
+
* - error_item_not_found: Item_id is not found
|
|
218
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
219
|
+
* - error_param: Invalid parameters
|
|
220
|
+
*/
|
|
221
|
+
async updateStock(params) {
|
|
222
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/update_stock", {
|
|
223
|
+
method: "POST",
|
|
224
|
+
auth: true,
|
|
225
|
+
body: params,
|
|
226
|
+
});
|
|
227
|
+
return response;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Delete a product item
|
|
231
|
+
*
|
|
232
|
+
* Use this API to delete a product item.
|
|
233
|
+
*
|
|
234
|
+
* @param params - Parameters for deleting item
|
|
235
|
+
* @param params.item_id - The ID of the item to delete
|
|
236
|
+
*
|
|
237
|
+
* @returns A promise that resolves to the delete response
|
|
238
|
+
*
|
|
239
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
240
|
+
* - error_item_not_found: Item_id is not found
|
|
241
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
242
|
+
* - error_cannot_delete_item: Delete item failed
|
|
243
|
+
*/
|
|
244
|
+
async deleteItem(params) {
|
|
245
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/delete_item", {
|
|
246
|
+
method: "POST",
|
|
247
|
+
auth: true,
|
|
248
|
+
body: params,
|
|
249
|
+
});
|
|
250
|
+
return response;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Unlist or list items
|
|
254
|
+
*
|
|
255
|
+
* Use this API to unlist or list items. Can process up to 50 items in one call.
|
|
256
|
+
*
|
|
257
|
+
* @param params - Parameters for unlisting/listing items
|
|
258
|
+
* @param params.item_list - List of items to unlist/list (1-50 items). Each item contains:
|
|
259
|
+
* - item_id: Shopee's unique identifier for an item
|
|
260
|
+
* - unlist: true to unlist, false to list
|
|
261
|
+
*
|
|
262
|
+
* @returns A promise that resolves to the unlist response containing:
|
|
263
|
+
* - result: List of operation results with success status and error messages
|
|
264
|
+
*
|
|
265
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
266
|
+
* - error_item_not_found: Item_id is not found
|
|
267
|
+
* - error_param_shop_id_not_found: Shop_id is not found
|
|
268
|
+
* - error_param: Invalid parameters
|
|
269
|
+
*/
|
|
270
|
+
async unlistItem(params) {
|
|
271
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/unlist_item", {
|
|
272
|
+
method: "POST",
|
|
273
|
+
auth: true,
|
|
274
|
+
body: params,
|
|
275
|
+
});
|
|
276
|
+
return response;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Get category tree
|
|
280
|
+
*
|
|
281
|
+
* Use this API to get category tree data.
|
|
282
|
+
*
|
|
283
|
+
* @param params - Parameters for getting categories
|
|
284
|
+
* @param params.language - Language for category names (optional)
|
|
285
|
+
*
|
|
286
|
+
* @returns A promise that resolves to the category response containing:
|
|
287
|
+
* - category_list: List of categories with id, parent_id, name, and has_children
|
|
288
|
+
*
|
|
289
|
+
* @throws {Error} When the API request fails or returns an error:
|
|
290
|
+
* - error_param: Invalid parameters
|
|
291
|
+
*/
|
|
292
|
+
async getCategory(params) {
|
|
293
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_category", {
|
|
294
|
+
method: "GET",
|
|
295
|
+
auth: true,
|
|
296
|
+
params: params || {},
|
|
297
|
+
});
|
|
298
|
+
return response;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Add a new item
|
|
302
|
+
*
|
|
303
|
+
* Use this API to add a new product item to the shop.
|
|
304
|
+
*
|
|
305
|
+
* @param params - Parameters for adding item
|
|
306
|
+
* @returns Promise resolving to add item response with item_id
|
|
307
|
+
*/
|
|
308
|
+
async addItem(params) {
|
|
309
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/add_item", {
|
|
310
|
+
method: "POST",
|
|
311
|
+
auth: true,
|
|
312
|
+
body: params,
|
|
313
|
+
});
|
|
314
|
+
return response;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Update an existing item
|
|
318
|
+
*
|
|
319
|
+
* Use this API to update an existing product item.
|
|
320
|
+
*
|
|
321
|
+
* @param params - Parameters for updating item
|
|
322
|
+
* @returns Promise resolving to update item response
|
|
323
|
+
*/
|
|
324
|
+
async updateItem(params) {
|
|
325
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/update_item", {
|
|
326
|
+
method: "POST",
|
|
327
|
+
auth: true,
|
|
328
|
+
body: params,
|
|
329
|
+
});
|
|
330
|
+
return response;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Add models/variations to an item
|
|
334
|
+
*
|
|
335
|
+
* Use this API to add product models/variations.
|
|
336
|
+
*
|
|
337
|
+
* @param params - Parameters for adding models
|
|
338
|
+
* @returns Promise resolving to add model response with model IDs
|
|
339
|
+
*/
|
|
340
|
+
async addModel(params) {
|
|
341
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/add_model", {
|
|
342
|
+
method: "POST",
|
|
343
|
+
auth: true,
|
|
344
|
+
body: params,
|
|
345
|
+
});
|
|
346
|
+
return response;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Update models/variations
|
|
350
|
+
*
|
|
351
|
+
* Use this API to update product models/variations.
|
|
352
|
+
*
|
|
353
|
+
* @param params - Parameters for updating models
|
|
354
|
+
* @returns Promise resolving to update model response
|
|
355
|
+
*/
|
|
356
|
+
async updateModel(params) {
|
|
357
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/update_model", {
|
|
358
|
+
method: "POST",
|
|
359
|
+
auth: true,
|
|
360
|
+
body: params,
|
|
361
|
+
});
|
|
362
|
+
return response;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Delete models/variations
|
|
366
|
+
*
|
|
367
|
+
* Use this API to delete product models/variations.
|
|
368
|
+
*
|
|
369
|
+
* @param params - Parameters for deleting models
|
|
370
|
+
* @returns Promise resolving to delete model response
|
|
371
|
+
*/
|
|
372
|
+
async deleteModel(params) {
|
|
373
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/delete_model", {
|
|
374
|
+
method: "POST",
|
|
375
|
+
auth: true,
|
|
376
|
+
body: params,
|
|
377
|
+
});
|
|
378
|
+
return response;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Initialize tier variations
|
|
382
|
+
*
|
|
383
|
+
* Use this API to initialize tier variations for an item.
|
|
384
|
+
*
|
|
385
|
+
* @param params - Parameters for initializing tier variations
|
|
386
|
+
* @returns Promise resolving to init tier variation response
|
|
387
|
+
*/
|
|
388
|
+
async initTierVariation(params) {
|
|
389
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/init_tier_variation", {
|
|
390
|
+
method: "POST",
|
|
391
|
+
auth: true,
|
|
392
|
+
body: params,
|
|
393
|
+
});
|
|
394
|
+
return response;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Update tier variations
|
|
398
|
+
*
|
|
399
|
+
* Use this API to update tier variations for an item.
|
|
400
|
+
*
|
|
401
|
+
* @param params - Parameters for updating tier variations
|
|
402
|
+
* @returns Promise resolving to update tier variation response
|
|
403
|
+
*/
|
|
404
|
+
async updateTierVariation(params) {
|
|
405
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/update_tier_variation", {
|
|
406
|
+
method: "POST",
|
|
407
|
+
auth: true,
|
|
408
|
+
body: params,
|
|
409
|
+
});
|
|
410
|
+
return response;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Search items
|
|
414
|
+
*
|
|
415
|
+
* Use this API to search for items in the shop.
|
|
416
|
+
*
|
|
417
|
+
* @param params - Parameters for searching items
|
|
418
|
+
* @returns Promise resolving to search item response
|
|
419
|
+
*/
|
|
420
|
+
async searchItem(params) {
|
|
421
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/search_item", {
|
|
422
|
+
method: "GET",
|
|
423
|
+
auth: true,
|
|
424
|
+
params,
|
|
425
|
+
});
|
|
426
|
+
return response;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Get item extra info
|
|
430
|
+
*
|
|
431
|
+
* Use this API to get extra information (sales, views, likes) for items.
|
|
432
|
+
*
|
|
433
|
+
* @param params - Parameters for getting item extra info
|
|
434
|
+
* @returns Promise resolving to item extra info response
|
|
435
|
+
*/
|
|
436
|
+
async getItemExtraInfo(params) {
|
|
437
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_item_extra_info", {
|
|
438
|
+
method: "GET",
|
|
439
|
+
auth: true,
|
|
440
|
+
params: {
|
|
441
|
+
...params,
|
|
442
|
+
item_id_list: params.item_id_list.join(","),
|
|
443
|
+
},
|
|
444
|
+
});
|
|
445
|
+
return response;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Get attribute tree
|
|
449
|
+
*
|
|
450
|
+
* Use this API to get the attribute tree for a category.
|
|
451
|
+
*
|
|
452
|
+
* @param params - Parameters for getting attribute tree
|
|
453
|
+
* @returns Promise resolving to attribute tree response
|
|
454
|
+
*/
|
|
455
|
+
async getAttributeTree(params) {
|
|
456
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_attribute_tree", {
|
|
457
|
+
method: "GET",
|
|
458
|
+
auth: true,
|
|
459
|
+
params,
|
|
460
|
+
});
|
|
461
|
+
return response;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Get brand list
|
|
465
|
+
*
|
|
466
|
+
* Use this API to get the list of brands for a category.
|
|
467
|
+
*
|
|
468
|
+
* @param params - Parameters for getting brand list
|
|
469
|
+
* @returns Promise resolving to brand list response
|
|
470
|
+
*/
|
|
471
|
+
async getBrandList(params) {
|
|
472
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_brand_list", {
|
|
473
|
+
method: "GET",
|
|
474
|
+
auth: true,
|
|
475
|
+
params,
|
|
476
|
+
});
|
|
477
|
+
return response;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Register a brand
|
|
481
|
+
*
|
|
482
|
+
* Use this API to register a new brand.
|
|
483
|
+
*
|
|
484
|
+
* @param params - Parameters for registering brand
|
|
485
|
+
* @returns Promise resolving to register brand response
|
|
486
|
+
*/
|
|
487
|
+
async registerBrand(params) {
|
|
488
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/register_brand", {
|
|
489
|
+
method: "POST",
|
|
490
|
+
auth: true,
|
|
491
|
+
body: params,
|
|
492
|
+
});
|
|
493
|
+
return response;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Get category recommendation
|
|
497
|
+
*
|
|
498
|
+
* Use this API to get category recommendations based on item name.
|
|
499
|
+
*
|
|
500
|
+
* @param params - Parameters for category recommendation
|
|
501
|
+
* @returns Promise resolving to category recommendation response
|
|
502
|
+
*/
|
|
503
|
+
async categoryRecommend(params) {
|
|
504
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/category_recommend", {
|
|
505
|
+
method: "POST",
|
|
506
|
+
auth: true,
|
|
507
|
+
body: params,
|
|
508
|
+
});
|
|
509
|
+
return response;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Get item limits
|
|
513
|
+
*
|
|
514
|
+
* Use this API to get item limits for a category.
|
|
515
|
+
*
|
|
516
|
+
* @param params - Parameters for getting item limits
|
|
517
|
+
* @returns Promise resolving to item limit response
|
|
518
|
+
*/
|
|
519
|
+
async getItemLimit(params) {
|
|
520
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_item_limit", {
|
|
521
|
+
method: "GET",
|
|
522
|
+
auth: true,
|
|
523
|
+
params,
|
|
524
|
+
});
|
|
525
|
+
return response;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Get item promotion
|
|
529
|
+
*
|
|
530
|
+
* Use this API to get promotion information for items.
|
|
531
|
+
*
|
|
532
|
+
* @param params - Parameters for getting item promotion
|
|
533
|
+
* @returns Promise resolving to item promotion response
|
|
534
|
+
*/
|
|
535
|
+
async getItemPromotion(params) {
|
|
536
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_item_promotion", {
|
|
537
|
+
method: "GET",
|
|
538
|
+
auth: true,
|
|
539
|
+
params: {
|
|
540
|
+
...params,
|
|
541
|
+
item_id_list: params.item_id_list.join(","),
|
|
542
|
+
},
|
|
543
|
+
});
|
|
544
|
+
return response;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Boost items
|
|
548
|
+
*
|
|
549
|
+
* Use this API to boost items for better visibility.
|
|
550
|
+
*
|
|
551
|
+
* @param params - Parameters for boosting items
|
|
552
|
+
* @returns Promise resolving to boost item response
|
|
553
|
+
*/
|
|
554
|
+
async boostItem(params) {
|
|
555
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/boost_item", {
|
|
556
|
+
method: "POST",
|
|
557
|
+
auth: true,
|
|
558
|
+
body: params,
|
|
559
|
+
});
|
|
560
|
+
return response;
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Get boosted item list
|
|
564
|
+
*
|
|
565
|
+
* Use this API to get the list of boosted items.
|
|
566
|
+
*
|
|
567
|
+
* @returns Promise resolving to boosted list response
|
|
568
|
+
*/
|
|
569
|
+
async getBoostedList() {
|
|
570
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_boosted_list", {
|
|
571
|
+
method: "GET",
|
|
572
|
+
auth: true,
|
|
573
|
+
params: {},
|
|
574
|
+
});
|
|
575
|
+
return response;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Get variations
|
|
579
|
+
*
|
|
580
|
+
* Use this API to get variation information for an item.
|
|
581
|
+
*
|
|
582
|
+
* @param params - Parameters for getting variations
|
|
583
|
+
* @returns Promise resolving to variations response
|
|
584
|
+
*/
|
|
585
|
+
async getVariations(params) {
|
|
586
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_variations", {
|
|
587
|
+
method: "GET",
|
|
588
|
+
auth: true,
|
|
589
|
+
params,
|
|
590
|
+
});
|
|
591
|
+
return response;
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Get recommended attributes
|
|
595
|
+
*
|
|
596
|
+
* Use this API to get recommended attributes for a category.
|
|
597
|
+
*
|
|
598
|
+
* @param params - Parameters for getting recommended attributes
|
|
599
|
+
* @returns Promise resolving to recommended attributes response
|
|
600
|
+
*/
|
|
601
|
+
async getRecommendAttribute(params) {
|
|
602
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_recommend_attribute", {
|
|
603
|
+
method: "GET",
|
|
604
|
+
auth: true,
|
|
605
|
+
params,
|
|
606
|
+
});
|
|
607
|
+
return response;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Search attribute values
|
|
611
|
+
*
|
|
612
|
+
* Use this API to search for attribute values.
|
|
613
|
+
*
|
|
614
|
+
* @param params - Parameters for searching attribute values
|
|
615
|
+
* @returns Promise resolving to attribute value list response
|
|
616
|
+
*/
|
|
617
|
+
async searchAttributeValueList(params) {
|
|
618
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/search_attribute_value_list", {
|
|
619
|
+
method: "GET",
|
|
620
|
+
auth: true,
|
|
621
|
+
params,
|
|
622
|
+
});
|
|
623
|
+
return response;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Get main item list
|
|
627
|
+
*
|
|
628
|
+
* Use this API to get the main item list.
|
|
629
|
+
*
|
|
630
|
+
* @param params - Parameters for getting main item list
|
|
631
|
+
* @returns Promise resolving to main item list response
|
|
632
|
+
*/
|
|
633
|
+
async getMainItemList(params) {
|
|
634
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_main_item_list", {
|
|
635
|
+
method: "GET",
|
|
636
|
+
auth: true,
|
|
637
|
+
params: params || {},
|
|
638
|
+
});
|
|
639
|
+
return response;
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* Get item violation info
|
|
643
|
+
*
|
|
644
|
+
* Use this API to get violation information for items.
|
|
645
|
+
*
|
|
646
|
+
* @param params - Parameters for getting item violation info
|
|
647
|
+
* @returns Promise resolving to item violation info response
|
|
648
|
+
*/
|
|
649
|
+
async getItemViolationInfo(params) {
|
|
650
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_item_violation_info", {
|
|
651
|
+
method: "GET",
|
|
652
|
+
auth: true,
|
|
653
|
+
params: {
|
|
654
|
+
...params,
|
|
655
|
+
item_id_list: params.item_id_list.join(","),
|
|
656
|
+
},
|
|
657
|
+
});
|
|
658
|
+
return response;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Get weight recommendation
|
|
662
|
+
*
|
|
663
|
+
* Use this API to get weight recommendations for an item.
|
|
664
|
+
*
|
|
665
|
+
* @param params - Parameters for getting weight recommendation
|
|
666
|
+
* @returns Promise resolving to weight recommendation response
|
|
667
|
+
*/
|
|
668
|
+
async getWeightRecommendation(params) {
|
|
669
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_weight_recommendation", {
|
|
670
|
+
method: "GET",
|
|
671
|
+
auth: true,
|
|
672
|
+
params,
|
|
673
|
+
});
|
|
674
|
+
return response;
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Get direct item list
|
|
678
|
+
*
|
|
679
|
+
* Use this API to get the direct item list.
|
|
680
|
+
*
|
|
681
|
+
* @param params - Parameters for getting direct item list
|
|
682
|
+
* @returns Promise resolving to direct item list response
|
|
683
|
+
*/
|
|
684
|
+
async getDirectItemList(params) {
|
|
685
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_direct_item_list", {
|
|
686
|
+
method: "GET",
|
|
687
|
+
auth: true,
|
|
688
|
+
params: params || {},
|
|
689
|
+
});
|
|
690
|
+
return response;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Get item content diagnosis result
|
|
694
|
+
*
|
|
695
|
+
* Use this API to get content diagnosis results for items.
|
|
696
|
+
*
|
|
697
|
+
* @param params - Parameters for getting content diagnosis result
|
|
698
|
+
* @returns Promise resolving to content diagnosis result response
|
|
699
|
+
*/
|
|
700
|
+
async getItemContentDiagnosisResult(params) {
|
|
701
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_item_content_diagnosis_result", {
|
|
702
|
+
method: "GET",
|
|
703
|
+
auth: true,
|
|
704
|
+
params: {
|
|
705
|
+
...params,
|
|
706
|
+
item_id_list: params.item_id_list.join(","),
|
|
707
|
+
},
|
|
708
|
+
});
|
|
709
|
+
return response;
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Get item list by content diagnosis
|
|
713
|
+
*
|
|
714
|
+
* Use this API to get items filtered by content diagnosis status.
|
|
715
|
+
*
|
|
716
|
+
* @param params - Parameters for getting item list by content diagnosis
|
|
717
|
+
* @returns Promise resolving to item list by content diagnosis response
|
|
718
|
+
*/
|
|
719
|
+
async getItemListByContentDiagnosis(params) {
|
|
720
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_item_list_by_content_diagnosis", {
|
|
721
|
+
method: "GET",
|
|
722
|
+
auth: true,
|
|
723
|
+
params,
|
|
724
|
+
});
|
|
725
|
+
return response;
|
|
726
|
+
}
|
|
727
|
+
// Kit Item Management
|
|
728
|
+
async addKitItem(params) {
|
|
729
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/add_kit_item", {
|
|
730
|
+
method: "POST",
|
|
731
|
+
auth: true,
|
|
732
|
+
body: params,
|
|
733
|
+
});
|
|
734
|
+
return response;
|
|
735
|
+
}
|
|
736
|
+
async updateKitItem(params) {
|
|
737
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/update_kit_item", {
|
|
738
|
+
method: "POST",
|
|
739
|
+
auth: true,
|
|
740
|
+
body: params,
|
|
741
|
+
});
|
|
742
|
+
return response;
|
|
743
|
+
}
|
|
744
|
+
async getKitItemInfo(params) {
|
|
745
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_kit_item_info", {
|
|
746
|
+
method: "GET",
|
|
747
|
+
auth: true,
|
|
748
|
+
params: {
|
|
749
|
+
...params,
|
|
750
|
+
item_id_list: params.item_id_list.join(","),
|
|
751
|
+
},
|
|
752
|
+
});
|
|
753
|
+
return response;
|
|
754
|
+
}
|
|
755
|
+
async getKitItemLimit(params) {
|
|
756
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_kit_item_limit", {
|
|
757
|
+
method: "GET",
|
|
758
|
+
auth: true,
|
|
759
|
+
params,
|
|
760
|
+
});
|
|
761
|
+
return response;
|
|
762
|
+
}
|
|
763
|
+
async generateKitImage(params) {
|
|
764
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/generate_kit_image", {
|
|
765
|
+
method: "POST",
|
|
766
|
+
auth: true,
|
|
767
|
+
body: params,
|
|
768
|
+
});
|
|
769
|
+
return response;
|
|
770
|
+
}
|
|
771
|
+
// SSP Management
|
|
772
|
+
async addSspItem(params) {
|
|
773
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/add_ssp_item", {
|
|
774
|
+
method: "POST",
|
|
775
|
+
auth: true,
|
|
776
|
+
body: params,
|
|
777
|
+
});
|
|
778
|
+
return response;
|
|
779
|
+
}
|
|
780
|
+
async getSspInfo(params) {
|
|
781
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_ssp_info", {
|
|
782
|
+
method: "GET",
|
|
783
|
+
auth: true,
|
|
784
|
+
params,
|
|
785
|
+
});
|
|
786
|
+
return response;
|
|
787
|
+
}
|
|
788
|
+
async getSspList(params) {
|
|
789
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_ssp_list", {
|
|
790
|
+
method: "GET",
|
|
791
|
+
auth: true,
|
|
792
|
+
params: params || {},
|
|
793
|
+
});
|
|
794
|
+
return response;
|
|
795
|
+
}
|
|
796
|
+
async linkSsp(params) {
|
|
797
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/link_ssp", {
|
|
798
|
+
method: "POST",
|
|
799
|
+
auth: true,
|
|
800
|
+
body: params,
|
|
801
|
+
});
|
|
802
|
+
return response;
|
|
803
|
+
}
|
|
804
|
+
async unlinkSsp(params) {
|
|
805
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/unlink_ssp", {
|
|
806
|
+
method: "POST",
|
|
807
|
+
auth: true,
|
|
808
|
+
body: params,
|
|
809
|
+
});
|
|
810
|
+
return response;
|
|
811
|
+
}
|
|
812
|
+
async updateSipItemPrice(params) {
|
|
813
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/update_sip_item_price", {
|
|
814
|
+
method: "POST",
|
|
815
|
+
auth: true,
|
|
816
|
+
body: params,
|
|
817
|
+
});
|
|
818
|
+
return response;
|
|
819
|
+
}
|
|
820
|
+
// Size Chart Management
|
|
821
|
+
async getSizeChartList(params) {
|
|
822
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_size_chart_list", {
|
|
823
|
+
method: "GET",
|
|
824
|
+
auth: true,
|
|
825
|
+
params: params || {},
|
|
826
|
+
});
|
|
827
|
+
return response;
|
|
828
|
+
}
|
|
829
|
+
async getSizeChartDetail(params) {
|
|
830
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_size_chart_detail", {
|
|
831
|
+
method: "GET",
|
|
832
|
+
auth: true,
|
|
833
|
+
params,
|
|
834
|
+
});
|
|
835
|
+
return response;
|
|
836
|
+
}
|
|
837
|
+
// Vehicle Compatibility
|
|
838
|
+
async getAllVehicleList(params) {
|
|
839
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_all_vehicle_list", {
|
|
840
|
+
method: "GET",
|
|
841
|
+
auth: true,
|
|
842
|
+
params: params || {},
|
|
843
|
+
});
|
|
844
|
+
return response;
|
|
845
|
+
}
|
|
846
|
+
async getVehicleListByCompatibilityDetail(params) {
|
|
847
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_vehicle_list_by_compatibility_detail", {
|
|
848
|
+
method: "GET",
|
|
849
|
+
auth: true,
|
|
850
|
+
params,
|
|
851
|
+
});
|
|
852
|
+
return response;
|
|
853
|
+
}
|
|
854
|
+
// Specialized Functions
|
|
855
|
+
async getAitemByPitemId(params) {
|
|
856
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_aitem_by_pitem_id", {
|
|
857
|
+
method: "GET",
|
|
858
|
+
auth: true,
|
|
859
|
+
params: {
|
|
860
|
+
...params,
|
|
861
|
+
pitem_id_list: params.pitem_id_list.join(","),
|
|
862
|
+
},
|
|
863
|
+
});
|
|
864
|
+
return response;
|
|
865
|
+
}
|
|
866
|
+
async getDirectShopRecommendedPrice(params) {
|
|
867
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_direct_shop_recommended_price", {
|
|
868
|
+
method: "GET",
|
|
869
|
+
auth: true,
|
|
870
|
+
params,
|
|
871
|
+
});
|
|
872
|
+
return response;
|
|
873
|
+
}
|
|
874
|
+
async getProductCertificationRule(params) {
|
|
875
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/get_product_certification_rule", {
|
|
876
|
+
method: "GET",
|
|
877
|
+
auth: true,
|
|
878
|
+
params,
|
|
879
|
+
});
|
|
880
|
+
return response;
|
|
881
|
+
}
|
|
882
|
+
async searchUnpackagedModelList(params) {
|
|
883
|
+
const response = await ShopeeFetch.fetch(this.config, "/product/search_unpackaged_model_list", {
|
|
884
|
+
method: "GET",
|
|
885
|
+
auth: true,
|
|
886
|
+
params,
|
|
887
|
+
});
|
|
888
|
+
return response;
|
|
889
|
+
}
|
|
172
890
|
}
|
|
173
891
|
//# sourceMappingURL=product.manager.js.map
|