@congminh1254/shopee-sdk 0.10.0 → 1.1.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 +172 -36
- package/lib/fetch.js +6 -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/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/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/lib/version.d.ts +1 -0
- package/lib/version.js +3 -0
- package/lib/version.js.map +1 -0
- package/package.json +4 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-on-deal.manager.js","sourceRoot":"","sources":["../../src/managers/add-on-deal.manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA+BhD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C,YAAY,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,YAAY,CAAC,MAA0B;QAC3C,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,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,oBAAoB,CACxB,MAAkC;QAElC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,wCAAwC,EACxC;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,mBAAmB,CACvB,MAAiC;QAEjC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,C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;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,uBAAuB,CAC3B,MAAqC;QAErC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,2CAA2C,EAC3C;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,sBAAsB,CAC1B,MAAoC;QAEpC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,KAAK,CACtC,IAAI,CAAC,MAAM,EACX,0CAA0C,EAC1C;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;SACb,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ShopeeConfig } from "../sdk.js";
|
|
2
2
|
import { BaseManager } from "./base.manager.js";
|
|
3
|
-
import { GetTotalBalanceResponse, GetShopToggleInfoResponse, GetRecommendedKeywordListParams, GetRecommendedKeywordListResponse, GetRecommendedItemListResponse, GetAllCpcAdsHourlyPerformanceParams, GetAllCpcAdsHourlyPerformanceResponse, GetAllCpcAdsDailyPerformanceParams, GetAllCpcAdsDailyPerformanceResponse, GetProductCampaignDailyPerformanceParams, GetProductCampaignDailyPerformanceResponse, GetProductCampaignHourlyPerformanceParams, GetProductCampaignHourlyPerformanceResponse, GetProductLevelCampaignIdListParams, GetProductLevelCampaignIdListResponse, GetProductLevelCampaignSettingInfoParams, GetProductLevelCampaignSettingInfoResponse, GetProductRecommendedRoiTargetParams, GetProductRecommendedRoiTargetResponse } from "../schemas/ads.js";
|
|
3
|
+
import { GetTotalBalanceResponse, GetShopToggleInfoResponse, GetRecommendedKeywordListParams, GetRecommendedKeywordListResponse, GetRecommendedItemListResponse, GetAllCpcAdsHourlyPerformanceParams, GetAllCpcAdsHourlyPerformanceResponse, GetAllCpcAdsDailyPerformanceParams, GetAllCpcAdsDailyPerformanceResponse, GetProductCampaignDailyPerformanceParams, GetProductCampaignDailyPerformanceResponse, GetProductCampaignHourlyPerformanceParams, GetProductCampaignHourlyPerformanceResponse, GetProductLevelCampaignIdListParams, GetProductLevelCampaignIdListResponse, GetProductLevelCampaignSettingInfoParams, GetProductLevelCampaignSettingInfoResponse, GetProductRecommendedRoiTargetParams, GetProductRecommendedRoiTargetResponse, CheckCreateGmsProductCampaignEligibilityResponse, CreateAutoProductAdsParams, CreateAutoProductAdsResponse, CreateGmsProductCampaignParams, CreateGmsProductCampaignResponse, CreateManualProductAdsParams, CreateManualProductAdsResponse, EditAutoProductAdsParams, EditAutoProductAdsResponse, EditGmsItemProductCampaignParams, EditGmsItemProductCampaignResponse, EditGmsProductCampaignParams, EditGmsProductCampaignResponse, EditManualProductAdKeywordsParams, EditManualProductAdKeywordsResponse, EditManualProductAdsParams, EditManualProductAdsResponse, GetAdsFacilShopRateResponse, GetCreateProductAdBudgetSuggestionParams, GetCreateProductAdBudgetSuggestionResponse, GetGmsCampaignPerformanceParams, GetGmsCampaignPerformanceResponse, GetGmsItemPerformanceParams, GetGmsItemPerformanceResponse, ListGmsUserDeletedItemParams, ListGmsUserDeletedItemResponse } from "../schemas/ads.js";
|
|
4
4
|
export declare class AdsManager extends BaseManager {
|
|
5
5
|
constructor(config: ShopeeConfig);
|
|
6
6
|
/**
|
|
@@ -270,4 +270,220 @@ export declare class AdsManager extends BaseManager {
|
|
|
270
270
|
* based on competitive marketplace data.
|
|
271
271
|
*/
|
|
272
272
|
getProductRecommendedRoiTarget(params: GetProductRecommendedRoiTargetParams): Promise<GetProductRecommendedRoiTargetResponse>;
|
|
273
|
+
/**
|
|
274
|
+
* Check the seller's eligibility in creating a GMS campaign
|
|
275
|
+
* @returns {Promise<CheckCreateGmsProductCampaignEligibilityResponse>} Response containing eligibility status
|
|
276
|
+
*
|
|
277
|
+
* This API is used to check if the seller is eligible to create a GMS (Gross Merchandise Sales) Campaign.
|
|
278
|
+
* The response indicates eligibility and provides a reason if the seller is not eligible.
|
|
279
|
+
*
|
|
280
|
+
* Possible reasons for ineligibility:
|
|
281
|
+
* - active_campaign: There is already an existing GMS Campaign that is active
|
|
282
|
+
* - not_whitelisted: The seller is not whitelisted to sz_shop_gmv_max_feature
|
|
283
|
+
* - not_have_enough_sku: The seller does not have enough valid items in the shop
|
|
284
|
+
* - exclusive_with_other_campaign: Seller is whitelisted to sz_ads_auto_boost
|
|
285
|
+
*/
|
|
286
|
+
checkCreateGmsProductCampaignEligibility(): Promise<CheckCreateGmsProductCampaignEligibilityResponse>;
|
|
287
|
+
/**
|
|
288
|
+
* Create Auto Product Ads
|
|
289
|
+
* @param {CreateAutoProductAdsParams} params Request parameters
|
|
290
|
+
* @param {string} params.reference_id A random string used to prevent duplicate ads
|
|
291
|
+
* @param {number} params.budget The budget set for the Auto Product Ads
|
|
292
|
+
* @param {string} params.start_date Start date of the campaign (DD-MM-YYYY format)
|
|
293
|
+
* @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format). Leave empty for unlimited duration
|
|
294
|
+
* @returns {Promise<CreateAutoProductAdsResponse>} Response containing the created campaign ID
|
|
295
|
+
*
|
|
296
|
+
* This API is used to create Auto Product Ads. Auto Product Ads automatically promote
|
|
297
|
+
* products based on their performance and potential.
|
|
298
|
+
*
|
|
299
|
+
* Important notes:
|
|
300
|
+
* - reference_id prevents duplicate ad creation. If an ad is created successfully,
|
|
301
|
+
* subsequent requests using the same reference_id will fail
|
|
302
|
+
* - For unlimited campaign duration, pass today's date as start_date and leave end_date empty
|
|
303
|
+
*/
|
|
304
|
+
createAutoProductAds(params: CreateAutoProductAdsParams): Promise<CreateAutoProductAdsResponse>;
|
|
305
|
+
/**
|
|
306
|
+
* Create a GMS product campaign
|
|
307
|
+
* @param {CreateGmsProductCampaignParams} params Request parameters
|
|
308
|
+
* @param {string} params.start_date Start date of Campaign (DD-MM-YYYY format). Cannot be earlier than today.
|
|
309
|
+
* @param {string} [params.end_date] End date of Campaign (DD-MM-YYYY format). Do not fill if no end date.
|
|
310
|
+
* @param {number} params.daily_budget Daily budget for Campaign
|
|
311
|
+
* @param {string} [params.reference_id] A random string used to prevent duplicate ads
|
|
312
|
+
* @param {number} [params.roas_target] ROAS target (0 or undefined for GMV Max Auto Bidding, >0 for Custom ROAS)
|
|
313
|
+
* @returns {Promise<CreateGmsProductCampaignResponse>} Response containing the created campaign ID
|
|
314
|
+
*
|
|
315
|
+
* This API is used to create a GMS (Gross Merchandise Sales) Campaign.
|
|
316
|
+
*
|
|
317
|
+
* ROAS Target behavior:
|
|
318
|
+
* - No input or 0: GMV Max Auto Bidding (Shop)
|
|
319
|
+
* - Greater than 0: GMV Max Custom ROAS (Shop)
|
|
320
|
+
* - Value is rounded to 1 decimal place (e.g., 10.123456 becomes 10.1)
|
|
321
|
+
*/
|
|
322
|
+
createGmsProductCampaign(params: CreateGmsProductCampaignParams): Promise<CreateGmsProductCampaignResponse>;
|
|
323
|
+
/**
|
|
324
|
+
* Create Manual Selection Product Ads
|
|
325
|
+
* @param {CreateManualProductAdsParams} params Request parameters
|
|
326
|
+
* @param {string} params.reference_id A random string used to prevent duplicate ads
|
|
327
|
+
* @param {number} params.budget The budget set for the Manual Product Ads
|
|
328
|
+
* @param {string} params.start_date Start date of the campaign (DD-MM-YYYY format)
|
|
329
|
+
* @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format). Leave empty for unlimited duration
|
|
330
|
+
* @param {string} params.bidding_method Bidding method: "auto" or "manual"
|
|
331
|
+
* @param {number} params.item_id Product ID
|
|
332
|
+
* @param {number} [params.roas_target] ROAS target for campaigns with auto bidding. If 0, GMV Max / ROI feature is not enabled
|
|
333
|
+
* @param {Array} [params.selected_keywords] Selected keywords, required for manual bidding mode
|
|
334
|
+
* @param {Array} [params.discovery_ads_locations] Location settings for manual bidding method
|
|
335
|
+
* @param {boolean} [params.enhanced_cpc] Enhanced CPC functionality toggle
|
|
336
|
+
* @param {string} [params.smart_creative_setting] Smart Creative setting: "", "default", "on", or "off"
|
|
337
|
+
* @returns {Promise<CreateManualProductAdsResponse>} Response containing the created campaign ID
|
|
338
|
+
*
|
|
339
|
+
* This API is used to create Manual Selection Product Ads, which allow you to manually
|
|
340
|
+
* select products, keywords, and bidding strategies for your advertising campaigns.
|
|
341
|
+
*
|
|
342
|
+
* For manual bidding mode, you must specify selected_keywords and/or discovery_ads_locations.
|
|
343
|
+
* For auto bidding mode, you can set the roas_target parameter.
|
|
344
|
+
*/
|
|
345
|
+
createManualProductAds(params: CreateManualProductAdsParams): Promise<CreateManualProductAdsResponse>;
|
|
346
|
+
/**
|
|
347
|
+
* Edit Auto Product Ads
|
|
348
|
+
* @param {EditAutoProductAdsParams} params Request parameters
|
|
349
|
+
* @param {string} params.reference_id A random string used to prevent duplicate ads
|
|
350
|
+
* @param {number} params.campaign_id The unique identifier for the campaign
|
|
351
|
+
* @param {string} params.edit_action The update action: "status", "budget", or "duration"
|
|
352
|
+
* @param {number} [params.budget] The budget set for the Auto Product Ads
|
|
353
|
+
* @param {string} [params.start_date] Start date of the campaign (DD-MM-YYYY format)
|
|
354
|
+
* @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format)
|
|
355
|
+
* @returns {Promise<EditAutoProductAdsResponse>} Response containing the campaign ID
|
|
356
|
+
*
|
|
357
|
+
* This API is used to edit existing Auto Product Ads.
|
|
358
|
+
* You can update the campaign status, budget, or duration based on the edit_action parameter.
|
|
359
|
+
*/
|
|
360
|
+
editAutoProductAds(params: EditAutoProductAdsParams): Promise<EditAutoProductAdsResponse>;
|
|
361
|
+
/**
|
|
362
|
+
* Add/remove items to/from the GMS Campaign
|
|
363
|
+
* @param {EditGmsItemProductCampaignParams} params Request parameters
|
|
364
|
+
* @param {number} [params.campaign_id] The GMS Campaign ID
|
|
365
|
+
* @param {string} params.edit_action The action to perform: "add" or "remove"
|
|
366
|
+
* @param {number[]} params.item_id_list Item IDs to add/remove (minimum 1, maximum 30)
|
|
367
|
+
* @returns {Promise<EditGmsItemProductCampaignResponse>} Response containing the campaign ID
|
|
368
|
+
*
|
|
369
|
+
* This API is used to add or remove items from a GMS Campaign.
|
|
370
|
+
* You can add or remove between 1 and 30 items per request.
|
|
371
|
+
*/
|
|
372
|
+
editGmsItemProductCampaign(params: EditGmsItemProductCampaignParams): Promise<EditGmsItemProductCampaignResponse>;
|
|
373
|
+
/**
|
|
374
|
+
* Edit a GMS product campaign
|
|
375
|
+
* @param {EditGmsProductCampaignParams} params Request parameters
|
|
376
|
+
* @param {number} params.campaign_id The GMS Campaign ID
|
|
377
|
+
* @param {string} params.edit_action The action to perform
|
|
378
|
+
* @param {number} [params.daily_budget] Daily budget for Campaign
|
|
379
|
+
* @param {string} [params.start_date] Start date of Campaign (DD-MM-YYYY format)
|
|
380
|
+
* @param {string} [params.end_date] End date of Campaign (DD-MM-YYYY format)
|
|
381
|
+
* @param {number} [params.roas_target] ROAS target for the campaign
|
|
382
|
+
* @returns {Promise<EditGmsProductCampaignResponse>} Response containing the campaign ID
|
|
383
|
+
*
|
|
384
|
+
* This API is used to edit existing GMS Campaign settings such as budget,
|
|
385
|
+
* campaign duration, and ROAS target.
|
|
386
|
+
*/
|
|
387
|
+
editGmsProductCampaign(params: EditGmsProductCampaignParams): Promise<EditGmsProductCampaignResponse>;
|
|
388
|
+
/**
|
|
389
|
+
* Edit Manual Selection Product Ad Keywords
|
|
390
|
+
* @param {EditManualProductAdKeywordsParams} params Request parameters
|
|
391
|
+
* @param {string} params.reference_id A random string used to prevent duplicate ads
|
|
392
|
+
* @param {number} params.campaign_id The unique identifier for the campaign
|
|
393
|
+
* @param {string} params.edit_action The action to perform: "add", "edit", or "delete"
|
|
394
|
+
* @param {Array} [params.selected_keywords] Selected keywords to add, edit, or delete
|
|
395
|
+
* @returns {Promise<EditManualProductAdKeywordsResponse>} Response containing the campaign ID
|
|
396
|
+
*
|
|
397
|
+
* This API is used to edit keywords for Manual Selection Product Ads.
|
|
398
|
+
* You can add new keywords, edit existing keywords, or delete keywords.
|
|
399
|
+
*/
|
|
400
|
+
editManualProductAdKeywords(params: EditManualProductAdKeywordsParams): Promise<EditManualProductAdKeywordsResponse>;
|
|
401
|
+
/**
|
|
402
|
+
* Edit Manual Selection Product Ads
|
|
403
|
+
* @param {EditManualProductAdsParams} params Request parameters
|
|
404
|
+
* @param {string} params.reference_id A random string used to prevent duplicate ads
|
|
405
|
+
* @param {number} params.campaign_id The unique identifier for the campaign
|
|
406
|
+
* @param {string} params.edit_action The update action
|
|
407
|
+
* @param {number} [params.budget] The budget set for the Manual Product Ads
|
|
408
|
+
* @param {string} [params.start_date] Start date of the campaign (DD-MM-YYYY format)
|
|
409
|
+
* @param {string} [params.end_date] End date of the campaign (DD-MM-YYYY format)
|
|
410
|
+
* @param {number} [params.roas_target] ROAS target for campaigns with auto bidding
|
|
411
|
+
* @param {Array} [params.discovery_ads_locations] Location settings for manual bidding method
|
|
412
|
+
* @param {boolean} [params.enhanced_cpc] Enhanced CPC functionality toggle
|
|
413
|
+
* @param {string} [params.smart_creative_setting] Smart Creative setting
|
|
414
|
+
* @returns {Promise<EditManualProductAdsResponse>} Response containing the campaign ID
|
|
415
|
+
*
|
|
416
|
+
* This API is used to edit existing Manual Selection Product Ads.
|
|
417
|
+
* You can update various campaign settings including budget, duration, bidding settings,
|
|
418
|
+
* and ad placement locations.
|
|
419
|
+
*/
|
|
420
|
+
editManualProductAds(params: EditManualProductAdsParams): Promise<EditManualProductAdsResponse>;
|
|
421
|
+
/**
|
|
422
|
+
* Get shop rate for Ads Facil Program
|
|
423
|
+
* @returns {Promise<GetAdsFacilShopRateResponse>} Response containing the shop rate
|
|
424
|
+
*
|
|
425
|
+
* This API is used to get the shop rate for the Ads Facil Program,
|
|
426
|
+
* which is a special advertising program available in certain regions.
|
|
427
|
+
*/
|
|
428
|
+
getAdsFacilShopRate(): Promise<GetAdsFacilShopRateResponse>;
|
|
429
|
+
/**
|
|
430
|
+
* Get budget suggestion for product ads creation
|
|
431
|
+
* @param {GetCreateProductAdBudgetSuggestionParams} params Request parameters
|
|
432
|
+
* @param {string} params.reference_id A random string used to prevent duplicate ads
|
|
433
|
+
* @param {string} params.product_selection Product selection: "auto" or "manual"
|
|
434
|
+
* @param {string} params.campaign_placement Campaign placement: "search", "discovery", or "all"
|
|
435
|
+
* @param {string} params.bidding_method Bidding method: "auto" or "manual"
|
|
436
|
+
* @param {string} [params.enhanced_cpc] Enhanced CPC toggle: "true" or "false"
|
|
437
|
+
* @param {string} [params.discovery_ads_location_names] Comma-separated location values
|
|
438
|
+
* @param {number} [params.roas_target] ROAS target for campaigns with auto bidding
|
|
439
|
+
* @param {number} [params.item_id] Product ID (mandatory for manual product selection)
|
|
440
|
+
* @returns {Promise<GetCreateProductAdBudgetSuggestionResponse>} Response containing budget suggestions
|
|
441
|
+
*
|
|
442
|
+
* This API is used to get budget suggestions before creating product ads.
|
|
443
|
+
* The suggestions include minimum, maximum, and recommended budget values
|
|
444
|
+
* based on the campaign parameters.
|
|
445
|
+
*/
|
|
446
|
+
getCreateProductAdBudgetSuggestion(params: GetCreateProductAdBudgetSuggestionParams): Promise<GetCreateProductAdBudgetSuggestionResponse>;
|
|
447
|
+
/**
|
|
448
|
+
* Get GMS Campaign performance
|
|
449
|
+
* @param {GetGmsCampaignPerformanceParams} params Request parameters
|
|
450
|
+
* @param {number} [params.campaign_id] The GMS Campaign ID
|
|
451
|
+
* @param {string} params.start_date Start date (DD-MM-YYYY format). Maximum 3 months duration, earliest 6 months ago
|
|
452
|
+
* @param {string} params.end_date End date (DD-MM-YYYY format). Maximum 3 months duration
|
|
453
|
+
* @returns {Promise<GetGmsCampaignPerformanceResponse>} Response containing campaign performance data
|
|
454
|
+
*
|
|
455
|
+
* This API is used to get performance data for a GMS Campaign.
|
|
456
|
+
* The date range can span up to 3 months and go back up to 6 months from today.
|
|
457
|
+
*
|
|
458
|
+
* Performance metrics include impressions, clicks, CTR, expense, GMV, ROAS, and orders.
|
|
459
|
+
*/
|
|
460
|
+
getGmsCampaignPerformance(params: GetGmsCampaignPerformanceParams): Promise<GetGmsCampaignPerformanceResponse>;
|
|
461
|
+
/**
|
|
462
|
+
* Get GMS Item performance
|
|
463
|
+
* @param {GetGmsItemPerformanceParams} params Request parameters
|
|
464
|
+
* @param {number} [params.campaign_id] The GMS Campaign ID
|
|
465
|
+
* @param {string} params.start_date Start date (DD-MM-YYYY format). Maximum 3 months duration, earliest 6 months ago
|
|
466
|
+
* @param {string} params.end_date End date (DD-MM-YYYY format). Maximum 3 months duration
|
|
467
|
+
* @param {number} [params.offset] Pagination offset (default: 0)
|
|
468
|
+
* @param {number} [params.limit] Maximum number of records to show (default: 50, max: 100)
|
|
469
|
+
* @returns {Promise<GetGmsItemPerformanceResponse>} Response containing item performance data
|
|
470
|
+
*
|
|
471
|
+
* This API is used to get performance data for items in a GMS Campaign.
|
|
472
|
+
* The response is sorted by item_id and only items with performance data are returned.
|
|
473
|
+
*
|
|
474
|
+
* The date range can span up to 3 months and go back up to 6 months from today.
|
|
475
|
+
* Results are paginated with offset and limit parameters.
|
|
476
|
+
*/
|
|
477
|
+
getGmsItemPerformance(params: GetGmsItemPerformanceParams): Promise<GetGmsItemPerformanceResponse>;
|
|
478
|
+
/**
|
|
479
|
+
* List GMS items that have been removed from the Campaign by seller
|
|
480
|
+
* @param {ListGmsUserDeletedItemParams} [params] Request parameters
|
|
481
|
+
* @param {number} [params.offset] Pagination offset (default: 0)
|
|
482
|
+
* @param {number} [params.limit] Maximum number of records to show (default: 50, max: 100)
|
|
483
|
+
* @returns {Promise<ListGmsUserDeletedItemResponse>} Response containing deleted item IDs
|
|
484
|
+
*
|
|
485
|
+
* This API is used to list items that have been removed from a GMS Campaign by the seller.
|
|
486
|
+
* Results are paginated with offset and limit parameters.
|
|
487
|
+
*/
|
|
488
|
+
listGmsUserDeletedItem(params?: ListGmsUserDeletedItemParams): Promise<ListGmsUserDeletedItemResponse>;
|
|
273
489
|
}
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"ads.manager.js","sourceRoot":"","sources":["../../src/managers/ads.manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAgDhD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,UAAW,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