@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.
Files changed (137) hide show
  1. package/README.md +178 -36
  2. package/lib/fetch.js +13 -0
  3. package/lib/fetch.js.map +1 -1
  4. package/lib/managers/add-on-deal.manager.d.ts +140 -0
  5. package/lib/managers/add-on-deal.manager.js +240 -0
  6. package/lib/managers/add-on-deal.manager.js.map +1 -0
  7. package/lib/managers/ads.manager.d.ts +217 -1
  8. package/lib/managers/ads.manager.js +312 -0
  9. package/lib/managers/ads.manager.js.map +1 -1
  10. package/lib/managers/bundle-deal.manager.d.ts +106 -0
  11. package/lib/managers/bundle-deal.manager.js +178 -0
  12. package/lib/managers/bundle-deal.manager.js.map +1 -0
  13. package/lib/managers/discount.manager.d.ts +102 -0
  14. package/lib/managers/discount.manager.js +167 -0
  15. package/lib/managers/discount.manager.js.map +1 -0
  16. package/lib/managers/fbs.manager.d.ts +115 -0
  17. package/lib/managers/fbs.manager.js +145 -0
  18. package/lib/managers/fbs.manager.js.map +1 -0
  19. package/lib/managers/first-mile.manager.d.ts +150 -0
  20. package/lib/managers/first-mile.manager.js +264 -0
  21. package/lib/managers/first-mile.manager.js.map +1 -0
  22. package/lib/managers/follow-prize.manager.d.ts +108 -0
  23. package/lib/managers/follow-prize.manager.js +152 -0
  24. package/lib/managers/follow-prize.manager.js.map +1 -0
  25. package/lib/managers/global-product.manager.d.ts +664 -0
  26. package/lib/managers/global-product.manager.js +904 -0
  27. package/lib/managers/global-product.manager.js.map +1 -0
  28. package/lib/managers/index.d.ts +17 -1
  29. package/lib/managers/index.js +17 -1
  30. package/lib/managers/index.js.map +1 -1
  31. package/lib/managers/livestream.manager.d.ts +377 -0
  32. package/lib/managers/livestream.manager.js +529 -0
  33. package/lib/managers/livestream.manager.js.map +1 -0
  34. package/lib/managers/logistics.manager.d.ts +267 -1
  35. package/lib/managers/logistics.manager.js +544 -0
  36. package/lib/managers/logistics.manager.js.map +1 -1
  37. package/lib/managers/media-space.manager.d.ts +179 -0
  38. package/lib/managers/media-space.manager.js +220 -0
  39. package/lib/managers/media-space.manager.js.map +1 -0
  40. package/lib/managers/media.manager.d.ts +226 -0
  41. package/lib/managers/media.manager.js +274 -0
  42. package/lib/managers/media.manager.js.map +1 -0
  43. package/lib/managers/merchant.manager.d.ts +100 -0
  44. package/lib/managers/merchant.manager.js +144 -0
  45. package/lib/managers/merchant.manager.js.map +1 -0
  46. package/lib/managers/order.manager.d.ts +213 -1
  47. package/lib/managers/order.manager.js +305 -0
  48. package/lib/managers/order.manager.js.map +1 -1
  49. package/lib/managers/payment.manager.d.ts +186 -1
  50. package/lib/managers/payment.manager.js +288 -0
  51. package/lib/managers/payment.manager.js.map +1 -1
  52. package/lib/managers/product.manager.d.ts +346 -1
  53. package/lib/managers/product.manager.js +718 -0
  54. package/lib/managers/product.manager.js.map +1 -1
  55. package/lib/managers/returns.manager.d.ts +200 -0
  56. package/lib/managers/returns.manager.js +300 -0
  57. package/lib/managers/returns.manager.js.map +1 -0
  58. package/lib/managers/sbs.manager.d.ts +112 -0
  59. package/lib/managers/sbs.manager.js +149 -0
  60. package/lib/managers/sbs.manager.js.map +1 -0
  61. package/lib/managers/shop-category.manager.d.ts +207 -0
  62. package/lib/managers/shop-category.manager.js +258 -0
  63. package/lib/managers/shop-category.manager.js.map +1 -0
  64. package/lib/managers/shop-flash-sale.manager.d.ts +242 -0
  65. package/lib/managers/shop-flash-sale.manager.js +321 -0
  66. package/lib/managers/shop-flash-sale.manager.js.map +1 -0
  67. package/lib/managers/shop.manager.d.ts +173 -0
  68. package/lib/managers/shop.manager.js +217 -0
  69. package/lib/managers/shop.manager.js.map +1 -0
  70. package/lib/managers/top-picks.manager.d.ts +62 -0
  71. package/lib/managers/top-picks.manager.js +91 -0
  72. package/lib/managers/top-picks.manager.js.map +1 -0
  73. package/lib/schemas/add-on-deal.d.ts +390 -0
  74. package/lib/schemas/add-on-deal.js +45 -0
  75. package/lib/schemas/add-on-deal.js.map +1 -0
  76. package/lib/schemas/ads.d.ts +437 -0
  77. package/lib/schemas/bundle-deal.d.ts +300 -0
  78. package/lib/schemas/bundle-deal.js +27 -0
  79. package/lib/schemas/bundle-deal.js.map +1 -0
  80. package/lib/schemas/discount.d.ts +334 -0
  81. package/lib/schemas/discount.js +15 -0
  82. package/lib/schemas/discount.js.map +1 -0
  83. package/lib/schemas/fbs.d.ts +117 -0
  84. package/lib/schemas/fbs.js +2 -0
  85. package/lib/schemas/fbs.js.map +1 -0
  86. package/lib/schemas/first-mile.d.ts +551 -0
  87. package/lib/schemas/first-mile.js +2 -0
  88. package/lib/schemas/first-mile.js.map +1 -0
  89. package/lib/schemas/follow-prize.d.ts +198 -0
  90. package/lib/schemas/follow-prize.js +27 -0
  91. package/lib/schemas/follow-prize.js.map +1 -0
  92. package/lib/schemas/global-product.d.ts +1127 -0
  93. package/lib/schemas/global-product.js +2 -0
  94. package/lib/schemas/global-product.js.map +1 -0
  95. package/lib/schemas/index.d.ts +13 -0
  96. package/lib/schemas/index.js +17 -0
  97. package/lib/schemas/index.js.map +1 -1
  98. package/lib/schemas/livestream.d.ts +649 -0
  99. package/lib/schemas/livestream.js +2 -0
  100. package/lib/schemas/livestream.js.map +1 -0
  101. package/lib/schemas/logistics.d.ts +979 -0
  102. package/lib/schemas/logistics.js +13 -0
  103. package/lib/schemas/logistics.js.map +1 -1
  104. package/lib/schemas/media-space.d.ts +189 -0
  105. package/lib/schemas/media-space.js +2 -0
  106. package/lib/schemas/media-space.js.map +1 -0
  107. package/lib/schemas/media.d.ts +230 -0
  108. package/lib/schemas/media.js +2 -0
  109. package/lib/schemas/media.js.map +1 -0
  110. package/lib/schemas/merchant.d.ts +236 -0
  111. package/lib/schemas/merchant.js +2 -0
  112. package/lib/schemas/merchant.js.map +1 -0
  113. package/lib/schemas/order.d.ts +431 -0
  114. package/lib/schemas/payment.d.ts +397 -0
  115. package/lib/schemas/product.d.ts +1157 -0
  116. package/lib/schemas/returns.d.ts +632 -0
  117. package/lib/schemas/returns.js +63 -0
  118. package/lib/schemas/returns.js.map +1 -0
  119. package/lib/schemas/sbs.d.ts +484 -0
  120. package/lib/schemas/sbs.js +2 -0
  121. package/lib/schemas/sbs.js.map +1 -0
  122. package/lib/schemas/shop-category.d.ts +176 -0
  123. package/lib/schemas/shop-category.js +2 -0
  124. package/lib/schemas/shop-category.js.map +1 -0
  125. package/lib/schemas/shop-flash-sale.d.ts +473 -0
  126. package/lib/schemas/shop-flash-sale.js +43 -0
  127. package/lib/schemas/shop-flash-sale.js.map +1 -0
  128. package/lib/schemas/shop.d.ts +250 -0
  129. package/lib/schemas/shop.js +2 -0
  130. package/lib/schemas/shop.js.map +1 -0
  131. package/lib/schemas/top-picks.d.ts +99 -0
  132. package/lib/schemas/top-picks.js +2 -0
  133. package/lib/schemas/top-picks.js.map +1 -0
  134. package/lib/sdk.d.ts +34 -0
  135. package/lib/sdk.js +34 -0
  136. package/lib/sdk.js.map +1 -1
  137. package/package.json +7 -4
@@ -345,5 +345,317 @@ export class AdsManager extends BaseManager {
345
345
  });
346
346
  return response;
347
347
  }
348
+ /**
349
+ * Check the seller's eligibility in creating a GMS campaign
350
+ * @returns {Promise<CheckCreateGmsProductCampaignEligibilityResponse>} Response containing eligibility status
351
+ *
352
+ * This API is used to check if the seller is eligible to create a GMS (Gross Merchandise Sales) Campaign.
353
+ * The response indicates eligibility and provides a reason if the seller is not eligible.
354
+ *
355
+ * Possible reasons for ineligibility:
356
+ * - active_campaign: There is already an existing GMS Campaign that is active
357
+ * - not_whitelisted: The seller is not whitelisted to sz_shop_gmv_max_feature
358
+ * - not_have_enough_sku: The seller does not have enough valid items in the shop
359
+ * - exclusive_with_other_campaign: Seller is whitelisted to sz_ads_auto_boost
360
+ */
361
+ async checkCreateGmsProductCampaignEligibility() {
362
+ const response = await ShopeeFetch.fetch(this.config, "/ads/check_create_gms_product_campaign_eligibility", {
363
+ method: "GET",
364
+ auth: true,
365
+ });
366
+ return response;
367
+ }
368
+ /**
369
+ * Create Auto Product Ads
370
+ * @param {CreateAutoProductAdsParams} params Request parameters
371
+ * @param {string} params.reference_id A random string used to prevent duplicate ads
372
+ * @param {number} params.budget The budget set for the Auto Product Ads
373
+ * @param {string} params.start_date Start date of the campaign (DD-MM-YYYY format)
374
+ * @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format). Leave empty for unlimited duration
375
+ * @returns {Promise<CreateAutoProductAdsResponse>} Response containing the created campaign ID
376
+ *
377
+ * This API is used to create Auto Product Ads. Auto Product Ads automatically promote
378
+ * products based on their performance and potential.
379
+ *
380
+ * Important notes:
381
+ * - reference_id prevents duplicate ad creation. If an ad is created successfully,
382
+ * subsequent requests using the same reference_id will fail
383
+ * - For unlimited campaign duration, pass today's date as start_date and leave end_date empty
384
+ */
385
+ async createAutoProductAds(params) {
386
+ const response = await ShopeeFetch.fetch(this.config, "/ads/create_auto_product_ads", {
387
+ method: "POST",
388
+ auth: true,
389
+ body: params,
390
+ });
391
+ return response;
392
+ }
393
+ /**
394
+ * Create a GMS product campaign
395
+ * @param {CreateGmsProductCampaignParams} params Request parameters
396
+ * @param {string} params.start_date Start date of Campaign (DD-MM-YYYY format). Cannot be earlier than today.
397
+ * @param {string} [params.end_date] End date of Campaign (DD-MM-YYYY format). Do not fill if no end date.
398
+ * @param {number} params.daily_budget Daily budget for Campaign
399
+ * @param {string} [params.reference_id] A random string used to prevent duplicate ads
400
+ * @param {number} [params.roas_target] ROAS target (0 or undefined for GMV Max Auto Bidding, >0 for Custom ROAS)
401
+ * @returns {Promise<CreateGmsProductCampaignResponse>} Response containing the created campaign ID
402
+ *
403
+ * This API is used to create a GMS (Gross Merchandise Sales) Campaign.
404
+ *
405
+ * ROAS Target behavior:
406
+ * - No input or 0: GMV Max Auto Bidding (Shop)
407
+ * - Greater than 0: GMV Max Custom ROAS (Shop)
408
+ * - Value is rounded to 1 decimal place (e.g., 10.123456 becomes 10.1)
409
+ */
410
+ async createGmsProductCampaign(params) {
411
+ const response = await ShopeeFetch.fetch(this.config, "/ads/create_gms_product_campaign", {
412
+ method: "POST",
413
+ auth: true,
414
+ body: params,
415
+ });
416
+ return response;
417
+ }
418
+ /**
419
+ * Create Manual Selection Product Ads
420
+ * @param {CreateManualProductAdsParams} params Request parameters
421
+ * @param {string} params.reference_id A random string used to prevent duplicate ads
422
+ * @param {number} params.budget The budget set for the Manual Product Ads
423
+ * @param {string} params.start_date Start date of the campaign (DD-MM-YYYY format)
424
+ * @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format). Leave empty for unlimited duration
425
+ * @param {string} params.bidding_method Bidding method: "auto" or "manual"
426
+ * @param {number} params.item_id Product ID
427
+ * @param {number} [params.roas_target] ROAS target for campaigns with auto bidding. If 0, GMV Max / ROI feature is not enabled
428
+ * @param {Array} [params.selected_keywords] Selected keywords, required for manual bidding mode
429
+ * @param {Array} [params.discovery_ads_locations] Location settings for manual bidding method
430
+ * @param {boolean} [params.enhanced_cpc] Enhanced CPC functionality toggle
431
+ * @param {string} [params.smart_creative_setting] Smart Creative setting: "", "default", "on", or "off"
432
+ * @returns {Promise<CreateManualProductAdsResponse>} Response containing the created campaign ID
433
+ *
434
+ * This API is used to create Manual Selection Product Ads, which allow you to manually
435
+ * select products, keywords, and bidding strategies for your advertising campaigns.
436
+ *
437
+ * For manual bidding mode, you must specify selected_keywords and/or discovery_ads_locations.
438
+ * For auto bidding mode, you can set the roas_target parameter.
439
+ */
440
+ async createManualProductAds(params) {
441
+ const response = await ShopeeFetch.fetch(this.config, "/ads/create_manual_product_ads", {
442
+ method: "POST",
443
+ auth: true,
444
+ body: params,
445
+ });
446
+ return response;
447
+ }
448
+ /**
449
+ * Edit Auto Product Ads
450
+ * @param {EditAutoProductAdsParams} params Request parameters
451
+ * @param {string} params.reference_id A random string used to prevent duplicate ads
452
+ * @param {number} params.campaign_id The unique identifier for the campaign
453
+ * @param {string} params.edit_action The update action: "status", "budget", or "duration"
454
+ * @param {number} [params.budget] The budget set for the Auto Product Ads
455
+ * @param {string} [params.start_date] Start date of the campaign (DD-MM-YYYY format)
456
+ * @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format)
457
+ * @returns {Promise<EditAutoProductAdsResponse>} Response containing the campaign ID
458
+ *
459
+ * This API is used to edit existing Auto Product Ads.
460
+ * You can update the campaign status, budget, or duration based on the edit_action parameter.
461
+ */
462
+ async editAutoProductAds(params) {
463
+ const response = await ShopeeFetch.fetch(this.config, "/ads/edit_auto_product_ads", {
464
+ method: "POST",
465
+ auth: true,
466
+ body: params,
467
+ });
468
+ return response;
469
+ }
470
+ /**
471
+ * Add/remove items to/from the GMS Campaign
472
+ * @param {EditGmsItemProductCampaignParams} params Request parameters
473
+ * @param {number} [params.campaign_id] The GMS Campaign ID
474
+ * @param {string} params.edit_action The action to perform: "add" or "remove"
475
+ * @param {number[]} params.item_id_list Item IDs to add/remove (minimum 1, maximum 30)
476
+ * @returns {Promise<EditGmsItemProductCampaignResponse>} Response containing the campaign ID
477
+ *
478
+ * This API is used to add or remove items from a GMS Campaign.
479
+ * You can add or remove between 1 and 30 items per request.
480
+ */
481
+ async editGmsItemProductCampaign(params) {
482
+ const response = await ShopeeFetch.fetch(this.config, "/ads/edit_gms_item_product_campaign", {
483
+ method: "POST",
484
+ auth: true,
485
+ body: params,
486
+ });
487
+ return response;
488
+ }
489
+ /**
490
+ * Edit a GMS product campaign
491
+ * @param {EditGmsProductCampaignParams} params Request parameters
492
+ * @param {number} params.campaign_id The GMS Campaign ID
493
+ * @param {string} params.edit_action The action to perform
494
+ * @param {number} [params.daily_budget] Daily budget for Campaign
495
+ * @param {string} [params.start_date] Start date of Campaign (DD-MM-YYYY format)
496
+ * @param {string} [params.end_date] End date of Campaign (DD-MM-YYYY format)
497
+ * @param {number} [params.roas_target] ROAS target for the campaign
498
+ * @returns {Promise<EditGmsProductCampaignResponse>} Response containing the campaign ID
499
+ *
500
+ * This API is used to edit existing GMS Campaign settings such as budget,
501
+ * campaign duration, and ROAS target.
502
+ */
503
+ async editGmsProductCampaign(params) {
504
+ const response = await ShopeeFetch.fetch(this.config, "/ads/edit_gms_product_campaign", {
505
+ method: "POST",
506
+ auth: true,
507
+ body: params,
508
+ });
509
+ return response;
510
+ }
511
+ /**
512
+ * Edit Manual Selection Product Ad Keywords
513
+ * @param {EditManualProductAdKeywordsParams} params Request parameters
514
+ * @param {string} params.reference_id A random string used to prevent duplicate ads
515
+ * @param {number} params.campaign_id The unique identifier for the campaign
516
+ * @param {string} params.edit_action The action to perform: "add", "edit", or "delete"
517
+ * @param {Array} [params.selected_keywords] Selected keywords to add, edit, or delete
518
+ * @returns {Promise<EditManualProductAdKeywordsResponse>} Response containing the campaign ID
519
+ *
520
+ * This API is used to edit keywords for Manual Selection Product Ads.
521
+ * You can add new keywords, edit existing keywords, or delete keywords.
522
+ */
523
+ async editManualProductAdKeywords(params) {
524
+ const response = await ShopeeFetch.fetch(this.config, "/ads/edit_manual_product_ad_keywords", {
525
+ method: "POST",
526
+ auth: true,
527
+ body: params,
528
+ });
529
+ return response;
530
+ }
531
+ /**
532
+ * Edit Manual Selection Product Ads
533
+ * @param {EditManualProductAdsParams} params Request parameters
534
+ * @param {string} params.reference_id A random string used to prevent duplicate ads
535
+ * @param {number} params.campaign_id The unique identifier for the campaign
536
+ * @param {string} params.edit_action The update action
537
+ * @param {number} [params.budget] The budget set for the Manual Product Ads
538
+ * @param {string} [params.start_date] Start date of the campaign (DD-MM-YYYY format)
539
+ * @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format)
540
+ * @param {number} [params.roas_target] ROAS target for campaigns with auto bidding
541
+ * @param {Array} [params.discovery_ads_locations] Location settings for manual bidding method
542
+ * @param {boolean} [params.enhanced_cpc] Enhanced CPC functionality toggle
543
+ * @param {string} [params.smart_creative_setting] Smart Creative setting
544
+ * @returns {Promise<EditManualProductAdsResponse>} Response containing the campaign ID
545
+ *
546
+ * This API is used to edit existing Manual Selection Product Ads.
547
+ * You can update various campaign settings including budget, duration, bidding settings,
548
+ * and ad placement locations.
549
+ */
550
+ async editManualProductAds(params) {
551
+ const response = await ShopeeFetch.fetch(this.config, "/ads/edit_manual_product_ads", {
552
+ method: "POST",
553
+ auth: true,
554
+ body: params,
555
+ });
556
+ return response;
557
+ }
558
+ /**
559
+ * Get shop rate for Ads Facil Program
560
+ * @returns {Promise<GetAdsFacilShopRateResponse>} Response containing the shop rate
561
+ *
562
+ * This API is used to get the shop rate for the Ads Facil Program,
563
+ * which is a special advertising program available in certain regions.
564
+ */
565
+ async getAdsFacilShopRate() {
566
+ const response = await ShopeeFetch.fetch(this.config, "/ads/get_ads_facil_shop_rate", {
567
+ method: "GET",
568
+ auth: true,
569
+ });
570
+ return response;
571
+ }
572
+ /**
573
+ * Get budget suggestion for product ads creation
574
+ * @param {GetCreateProductAdBudgetSuggestionParams} params Request parameters
575
+ * @param {string} params.reference_id A random string used to prevent duplicate ads
576
+ * @param {string} params.product_selection Product selection: "auto" or "manual"
577
+ * @param {string} params.campaign_placement Campaign placement: "search", "discovery", or "all"
578
+ * @param {string} params.bidding_method Bidding method: "auto" or "manual"
579
+ * @param {string} [params.enhanced_cpc] Enhanced CPC toggle: "true" or "false"
580
+ * @param {string} [params.discovery_ads_location_names] Comma-separated location values
581
+ * @param {number} [params.roas_target] ROAS target for campaigns with auto bidding
582
+ * @param {number} [params.item_id] Product ID (mandatory for manual product selection)
583
+ * @returns {Promise<GetCreateProductAdBudgetSuggestionResponse>} Response containing budget suggestions
584
+ *
585
+ * This API is used to get budget suggestions before creating product ads.
586
+ * The suggestions include minimum, maximum, and recommended budget values
587
+ * based on the campaign parameters.
588
+ */
589
+ async getCreateProductAdBudgetSuggestion(params) {
590
+ const response = await ShopeeFetch.fetch(this.config, "/ads/get_create_product_ad_budget_suggestion", {
591
+ method: "GET",
592
+ auth: true,
593
+ params,
594
+ });
595
+ return response;
596
+ }
597
+ /**
598
+ * Get GMS Campaign performance
599
+ * @param {GetGmsCampaignPerformanceParams} params Request parameters
600
+ * @param {number} [params.campaign_id] The GMS Campaign ID
601
+ * @param {string} params.start_date Start date (DD-MM-YYYY format). Maximum 3 months duration, earliest 6 months ago
602
+ * @param {string} params.end_date End date (DD-MM-YYYY format). Maximum 3 months duration
603
+ * @returns {Promise<GetGmsCampaignPerformanceResponse>} Response containing campaign performance data
604
+ *
605
+ * This API is used to get performance data for a GMS Campaign.
606
+ * The date range can span up to 3 months and go back up to 6 months from today.
607
+ *
608
+ * Performance metrics include impressions, clicks, CTR, expense, GMV, ROAS, and orders.
609
+ */
610
+ async getGmsCampaignPerformance(params) {
611
+ const response = await ShopeeFetch.fetch(this.config, "/ads/get_gms_campaign_performance", {
612
+ method: "POST",
613
+ auth: true,
614
+ body: params,
615
+ });
616
+ return response;
617
+ }
618
+ /**
619
+ * Get GMS Item performance
620
+ * @param {GetGmsItemPerformanceParams} params Request parameters
621
+ * @param {number} [params.campaign_id] The GMS Campaign ID
622
+ * @param {string} params.start_date Start date (DD-MM-YYYY format). Maximum 3 months duration, earliest 6 months ago
623
+ * @param {string} params.end_date End date (DD-MM-YYYY format). Maximum 3 months duration
624
+ * @param {number} [params.offset] Pagination offset (default: 0)
625
+ * @param {number} [params.limit] Maximum number of records to show (default: 50, max: 100)
626
+ * @returns {Promise<GetGmsItemPerformanceResponse>} Response containing item performance data
627
+ *
628
+ * This API is used to get performance data for items in a GMS Campaign.
629
+ * The response is sorted by item_id and only items with performance data are returned.
630
+ *
631
+ * The date range can span up to 3 months and go back up to 6 months from today.
632
+ * Results are paginated with offset and limit parameters.
633
+ */
634
+ async getGmsItemPerformance(params) {
635
+ const response = await ShopeeFetch.fetch(this.config, "/ads/get_gms_item_performance", {
636
+ method: "POST",
637
+ auth: true,
638
+ body: params,
639
+ });
640
+ return response;
641
+ }
642
+ /**
643
+ * List GMS items that have been removed from the Campaign by seller
644
+ * @param {ListGmsUserDeletedItemParams} [params] Request parameters
645
+ * @param {number} [params.offset] Pagination offset (default: 0)
646
+ * @param {number} [params.limit] Maximum number of records to show (default: 50, max: 100)
647
+ * @returns {Promise<ListGmsUserDeletedItemResponse>} Response containing deleted item IDs
648
+ *
649
+ * This API is used to list items that have been removed from a GMS Campaign by the seller.
650
+ * Results are paginated with offset and limit parameters.
651
+ */
652
+ async listGmsUserDeletedItem(params) {
653
+ const response = await ShopeeFetch.fetch(this.config, "/ads/list_gms_user_deleted_item", {
654
+ method: "POST",
655
+ auth: true,
656
+ body: params || {},
657
+ });
658
+ return response;
659
+ }
348
660
  }
349
661
  //# sourceMappingURL=ads.manager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ads.manager.js","sourceRoot":"","sources":["../../src/managers/ads.manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAsBhD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC,YAAY,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,eAAe;QACnB,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,wBAAwB,EACxB;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;SACX,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,iBAAiB;QACrB,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,2BAA2B,EAC3B;YACE,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;SACX,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,yBAAyB,CAC7B,MAAuC;QAEvC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK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E,IAAI;YACV,MAAM;SACP,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,yBAAyB,CAC7B,MAAuC;QAEvC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,mCAAmC,EACnC;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,qBAAqB,CACzB,MAAmC;QAEnC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,+BAA+B,EAC/B;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,sBAAsB,CAC1B,MAAqC;QAErC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,iCAAiC,EACjC;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM,IAAI,EAAE;SACnB,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
@@ -0,0 +1,106 @@
1
+ import { ShopeeConfig } from "../sdk.js";
2
+ import { BaseManager } from "./base.manager.js";
3
+ import { AddBundleDealParams, AddBundleDealResponse, AddBundleDealItemParams, AddBundleDealItemResponse, DeleteBundleDealParams, DeleteBundleDealResponse, DeleteBundleDealItemParams, DeleteBundleDealItemResponse, EndBundleDealParams, EndBundleDealResponse, GetBundleDealParams, GetBundleDealResponse, GetBundleDealItemParams, GetBundleDealItemResponse, GetBundleDealListParams, GetBundleDealListResponse, UpdateBundleDealParams, UpdateBundleDealResponse, UpdateBundleDealItemParams, UpdateBundleDealItemResponse } from "../schemas/bundle-deal.js";
4
+ export declare class BundleDealManager extends BaseManager {
5
+ constructor(config: ShopeeConfig);
6
+ /**
7
+ * Create a new bundle deal activity
8
+ * @param {AddBundleDealParams} params - Parameters for creating a new bundle deal
9
+ * @returns {Promise<AddBundleDealResponse>} The response containing the created bundle deal ID
10
+ *
11
+ * Note: A maximum of 1000 bundle deals can be created.
12
+ * The bundle deal must follow the pricing rules based on rule_type.
13
+ */
14
+ addBundleDeal(params: AddBundleDealParams): Promise<AddBundleDealResponse>;
15
+ /**
16
+ * Add items to an existing bundle deal activity
17
+ * @param {AddBundleDealItemParams} params - Parameters for adding items to a bundle deal
18
+ * @returns {Promise<AddBundleDealItemResponse>} The response containing lists of successful and failed items
19
+ *
20
+ * The response includes:
21
+ * - success_list: Array of item IDs that were successfully added
22
+ * - failed_list: Array of items that failed to be added with error details
23
+ */
24
+ addBundleDealItem(params: AddBundleDealItemParams): Promise<AddBundleDealItemResponse>;
25
+ /**
26
+ * Delete an existing bundle deal activity
27
+ * @param {DeleteBundleDealParams} params - Parameters for deleting a bundle deal
28
+ * @returns {Promise<DeleteBundleDealResponse>} The response containing the deleted bundle deal ID
29
+ *
30
+ * Note: Can only delete upcoming bundle deals that haven't started yet.
31
+ * Will return an error if attempting to delete a bundle deal that has already started.
32
+ */
33
+ deleteBundleDeal(params: DeleteBundleDealParams): Promise<DeleteBundleDealResponse>;
34
+ /**
35
+ * Delete items from an existing bundle deal activity
36
+ * @param {DeleteBundleDealItemParams} params - Parameters for deleting items from a bundle deal
37
+ * @returns {Promise<DeleteBundleDealItemResponse>} The response containing lists of successful and failed deletions
38
+ *
39
+ * The response includes:
40
+ * - success_list: Array of item IDs that were successfully deleted
41
+ * - failed_list: Array of items that failed to be deleted with error details
42
+ */
43
+ deleteBundleDealItem(params: DeleteBundleDealItemParams): Promise<DeleteBundleDealItemResponse>;
44
+ /**
45
+ * End an ongoing bundle deal activity immediately
46
+ * @param {EndBundleDealParams} params - Parameters for ending a bundle deal
47
+ * @returns {Promise<EndBundleDealResponse>} The response containing the ended bundle deal ID
48
+ *
49
+ * Note: Can only end bundle deals that are currently ongoing/active.
50
+ * Will return an error if attempting to end an upcoming or expired bundle deal.
51
+ */
52
+ endBundleDeal(params: EndBundleDealParams): Promise<EndBundleDealResponse>;
53
+ /**
54
+ * Get detailed information about a bundle deal activity
55
+ * @param {GetBundleDealParams} params - Parameters for getting bundle deal details
56
+ * @returns {Promise<GetBundleDealResponse>} The response containing comprehensive bundle deal information
57
+ *
58
+ * The response includes:
59
+ * - Basic bundle deal details (ID, name, timing, etc.)
60
+ * - Bundle deal rule configuration (type, pricing, min amount, etc.)
61
+ * - Purchase limits
62
+ * - Additional tiers if configured
63
+ */
64
+ getBundleDeal(params: GetBundleDealParams): Promise<GetBundleDealResponse>;
65
+ /**
66
+ * Get the list of items in a bundle deal
67
+ * @param {GetBundleDealItemParams} params - Parameters for getting bundle deal items
68
+ * @returns {Promise<GetBundleDealItemResponse>} The response containing the list of item IDs
69
+ *
70
+ * The response includes:
71
+ * - item_list: Array of item IDs that are part of the bundle deal
72
+ */
73
+ getBundleDealItem(params: GetBundleDealItemParams): Promise<GetBundleDealItemResponse>;
74
+ /**
75
+ * Get a list of bundle deal activities with pagination
76
+ * @param {GetBundleDealListParams} params - Parameters for retrieving bundle deal list
77
+ * @param {BundleDealTimeStatus} [params.time_status] - Filter by bundle deal status (default: ALL)
78
+ * @param {number} [params.page_no] - Page number to retrieve (default: 1)
79
+ * @param {number} [params.page_size] - Number of items per page (default: 20, max: 1000)
80
+ * @returns {Promise<GetBundleDealListResponse>} The response containing a paginated list of bundle deals
81
+ *
82
+ * The response includes:
83
+ * - bundle_deal_list: List of bundle deals with full details
84
+ * - more: Boolean indicating if there are more pages
85
+ */
86
+ getBundleDealList(params?: GetBundleDealListParams): Promise<GetBundleDealListResponse>;
87
+ /**
88
+ * Update an existing bundle deal activity
89
+ * @param {UpdateBundleDealParams} params - Parameters for updating a bundle deal
90
+ * @returns {Promise<UpdateBundleDealResponse>} The response containing the updated bundle deal information
91
+ *
92
+ * Note: For ongoing bundle deals, update capabilities may be limited.
93
+ * Only certain fields can be modified depending on the bundle deal status.
94
+ */
95
+ updateBundleDeal(params: UpdateBundleDealParams): Promise<UpdateBundleDealResponse>;
96
+ /**
97
+ * Update items in an existing bundle deal activity
98
+ * @param {UpdateBundleDealItemParams} params - Parameters for updating bundle deal items
99
+ * @returns {Promise<UpdateBundleDealItemResponse>} The response containing lists of successful and failed updates
100
+ *
101
+ * The response includes:
102
+ * - success_list: Array of item IDs that were successfully updated
103
+ * - failed_list: Array of items that failed to be updated with error details
104
+ */
105
+ updateBundleDealItem(params: UpdateBundleDealItemParams): Promise<UpdateBundleDealItemResponse>;
106
+ }
@@ -0,0 +1,178 @@
1
+ import { BaseManager } from "./base.manager.js";
2
+ import { ShopeeFetch } from "../fetch.js";
3
+ export class BundleDealManager extends BaseManager {
4
+ constructor(config) {
5
+ super(config);
6
+ }
7
+ /**
8
+ * Create a new bundle deal activity
9
+ * @param {AddBundleDealParams} params - Parameters for creating a new bundle deal
10
+ * @returns {Promise<AddBundleDealResponse>} The response containing the created bundle deal ID
11
+ *
12
+ * Note: A maximum of 1000 bundle deals can be created.
13
+ * The bundle deal must follow the pricing rules based on rule_type.
14
+ */
15
+ async addBundleDeal(params) {
16
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/add_bundle_deal", {
17
+ method: "POST",
18
+ auth: true,
19
+ body: params,
20
+ });
21
+ return response;
22
+ }
23
+ /**
24
+ * Add items to an existing bundle deal activity
25
+ * @param {AddBundleDealItemParams} params - Parameters for adding items to a bundle deal
26
+ * @returns {Promise<AddBundleDealItemResponse>} The response containing lists of successful and failed items
27
+ *
28
+ * The response includes:
29
+ * - success_list: Array of item IDs that were successfully added
30
+ * - failed_list: Array of items that failed to be added with error details
31
+ */
32
+ async addBundleDealItem(params) {
33
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/add_bundle_deal_item", {
34
+ method: "POST",
35
+ auth: true,
36
+ body: params,
37
+ });
38
+ return response;
39
+ }
40
+ /**
41
+ * Delete an existing bundle deal activity
42
+ * @param {DeleteBundleDealParams} params - Parameters for deleting a bundle deal
43
+ * @returns {Promise<DeleteBundleDealResponse>} The response containing the deleted bundle deal ID
44
+ *
45
+ * Note: Can only delete upcoming bundle deals that haven't started yet.
46
+ * Will return an error if attempting to delete a bundle deal that has already started.
47
+ */
48
+ async deleteBundleDeal(params) {
49
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/delete_bundle_deal", {
50
+ method: "POST",
51
+ auth: true,
52
+ body: params,
53
+ });
54
+ return response;
55
+ }
56
+ /**
57
+ * Delete items from an existing bundle deal activity
58
+ * @param {DeleteBundleDealItemParams} params - Parameters for deleting items from a bundle deal
59
+ * @returns {Promise<DeleteBundleDealItemResponse>} The response containing lists of successful and failed deletions
60
+ *
61
+ * The response includes:
62
+ * - success_list: Array of item IDs that were successfully deleted
63
+ * - failed_list: Array of items that failed to be deleted with error details
64
+ */
65
+ async deleteBundleDealItem(params) {
66
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/delete_bundle_deal_item", {
67
+ method: "POST",
68
+ auth: true,
69
+ body: params,
70
+ });
71
+ return response;
72
+ }
73
+ /**
74
+ * End an ongoing bundle deal activity immediately
75
+ * @param {EndBundleDealParams} params - Parameters for ending a bundle deal
76
+ * @returns {Promise<EndBundleDealResponse>} The response containing the ended bundle deal ID
77
+ *
78
+ * Note: Can only end bundle deals that are currently ongoing/active.
79
+ * Will return an error if attempting to end an upcoming or expired bundle deal.
80
+ */
81
+ async endBundleDeal(params) {
82
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/end_bundle_deal", {
83
+ method: "POST",
84
+ auth: true,
85
+ body: params,
86
+ });
87
+ return response;
88
+ }
89
+ /**
90
+ * Get detailed information about a bundle deal activity
91
+ * @param {GetBundleDealParams} params - Parameters for getting bundle deal details
92
+ * @returns {Promise<GetBundleDealResponse>} The response containing comprehensive bundle deal information
93
+ *
94
+ * The response includes:
95
+ * - Basic bundle deal details (ID, name, timing, etc.)
96
+ * - Bundle deal rule configuration (type, pricing, min amount, etc.)
97
+ * - Purchase limits
98
+ * - Additional tiers if configured
99
+ */
100
+ async getBundleDeal(params) {
101
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/get_bundle_deal", {
102
+ method: "POST",
103
+ auth: true,
104
+ body: params,
105
+ });
106
+ return response;
107
+ }
108
+ /**
109
+ * Get the list of items in a bundle deal
110
+ * @param {GetBundleDealItemParams} params - Parameters for getting bundle deal items
111
+ * @returns {Promise<GetBundleDealItemResponse>} The response containing the list of item IDs
112
+ *
113
+ * The response includes:
114
+ * - item_list: Array of item IDs that are part of the bundle deal
115
+ */
116
+ async getBundleDealItem(params) {
117
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/get_bundle_deal_item", {
118
+ method: "POST",
119
+ auth: true,
120
+ body: params,
121
+ });
122
+ return response;
123
+ }
124
+ /**
125
+ * Get a list of bundle deal activities with pagination
126
+ * @param {GetBundleDealListParams} params - Parameters for retrieving bundle deal list
127
+ * @param {BundleDealTimeStatus} [params.time_status] - Filter by bundle deal status (default: ALL)
128
+ * @param {number} [params.page_no] - Page number to retrieve (default: 1)
129
+ * @param {number} [params.page_size] - Number of items per page (default: 20, max: 1000)
130
+ * @returns {Promise<GetBundleDealListResponse>} The response containing a paginated list of bundle deals
131
+ *
132
+ * The response includes:
133
+ * - bundle_deal_list: List of bundle deals with full details
134
+ * - more: Boolean indicating if there are more pages
135
+ */
136
+ async getBundleDealList(params = {}) {
137
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/get_bundle_deal_list", {
138
+ method: "POST",
139
+ auth: true,
140
+ body: params,
141
+ });
142
+ return response;
143
+ }
144
+ /**
145
+ * Update an existing bundle deal activity
146
+ * @param {UpdateBundleDealParams} params - Parameters for updating a bundle deal
147
+ * @returns {Promise<UpdateBundleDealResponse>} The response containing the updated bundle deal information
148
+ *
149
+ * Note: For ongoing bundle deals, update capabilities may be limited.
150
+ * Only certain fields can be modified depending on the bundle deal status.
151
+ */
152
+ async updateBundleDeal(params) {
153
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/update_bundle_deal", {
154
+ method: "POST",
155
+ auth: true,
156
+ body: params,
157
+ });
158
+ return response;
159
+ }
160
+ /**
161
+ * Update items in an existing bundle deal activity
162
+ * @param {UpdateBundleDealItemParams} params - Parameters for updating bundle deal items
163
+ * @returns {Promise<UpdateBundleDealItemResponse>} The response containing lists of successful and failed updates
164
+ *
165
+ * The response includes:
166
+ * - success_list: Array of item IDs that were successfully updated
167
+ * - failed_list: Array of items that failed to be updated with error details
168
+ */
169
+ async updateBundleDealItem(params) {
170
+ const response = await ShopeeFetch.fetch(this.config, "/bundle_deal/update_bundle_deal_item", {
171
+ method: "POST",
172
+ auth: true,
173
+ body: params,
174
+ });
175
+ return response;
176
+ }
177
+ }
178
+ //# sourceMappingURL=bundle-deal.manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-deal.manager.js","sourceRoot":"","sources":["../../src/managers/bundle-deal.manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAuBhD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD,YAAY,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa,CAAC,MAA2B;QAC7C,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,8BAA8B,EAC9B;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OA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