@congminh1254/shopee-sdk 1.3.0 → 1.4.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/lib/managers/ams.manager.d.ts +332 -0
- package/lib/managers/ams.manager.js +601 -0
- package/lib/managers/ams.manager.js.map +1 -0
- package/lib/managers/index.d.ts +1 -0
- package/lib/managers/index.js +1 -0
- package/lib/managers/index.js.map +1 -1
- package/lib/schemas/account-health.d.ts +67 -0
- package/lib/schemas/account-health.js.map +1 -1
- package/lib/schemas/ams.d.ts +1037 -0
- package/lib/schemas/ams.js +2 -0
- package/lib/schemas/ams.js.map +1 -0
- package/lib/schemas/index.d.ts +1 -0
- package/lib/schemas/index.js +1 -0
- package/lib/schemas/index.js.map +1 -1
- package/lib/schemas/order.d.ts +24 -0
- package/lib/schemas/order.js.map +1 -1
- package/lib/sdk.d.ts +2 -0
- package/lib/sdk.js +2 -0
- package/lib/sdk.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { ShopeeConfig } from "../sdk.js";
|
|
2
|
+
import { BaseManager } from "./base.manager.js";
|
|
3
|
+
import { AddAllProductsToOpenCampaignParams, AddAllProductsToOpenCampaignResponse, BatchAddProductsToOpenCampaignParams, BatchAddProductsToOpenCampaignResponse, BatchEditProductsOpenCampaignSettingParams, BatchEditProductsOpenCampaignSettingResponse, BatchGetProductsSuggestedRateParams, BatchGetProductsSuggestedRateResponse, BatchRemoveProductsOpenCampaignSettingParams, BatchRemoveProductsOpenCampaignSettingResponse, CreateNewTargetedCampaignParams, CreateNewTargetedCampaignResponse, EditAffiliateListOfTargetedCampaignParams, EditAffiliateListOfTargetedCampaignResponse, EditAllProductsOpenCampaignSettingParams, EditAllProductsOpenCampaignSettingResponse, EditProductListOfTargetedCampaignParams, EditProductListOfTargetedCampaignResponse, GetAffiliatePerformanceParams, GetAffiliatePerformanceResponse, GetAutoAddNewProductToggleStatusResponse, GetCampaignKeyMetricsPerformanceParams, GetCampaignKeyMetricsPerformanceResponse, GetContentPerformanceParams, GetContentPerformanceResponse, GetConversionReportParams, GetConversionReportResponse, GetManagedAffiliateListParams, GetManagedAffiliateListResponse, GetOpenCampaignAddedProductParams, GetOpenCampaignAddedProductResponse, GetOpenCampaignBatchTaskResultParams, GetOpenCampaignBatchTaskResultResponse, GetOpenCampaignNotAddedProductParams, GetOpenCampaignNotAddedProductResponse, GetOpenCampaignPerformanceParams, GetOpenCampaignPerformanceResponse, GetOptimizationSuggestionProductParams, GetOptimizationSuggestionProductResponse, GetPerformanceDataUpdateTimeParams, GetPerformanceDataUpdateTimeResponse, GetProductPerformanceParams, GetProductPerformanceResponse, GetRecommendedAffiliateListParams, GetRecommendedAffiliateListResponse, AmsGetShopPerformanceParams, AmsGetShopPerformanceResponse, GetShopSuggestedRateResponse, GetTargetedCampaignAddableProductListParams, GetTargetedCampaignAddableProductListResponse, GetTargetedCampaignListParams, GetTargetedCampaignListResponse, GetTargetedCampaignPerformanceParams, GetTargetedCampaignPerformanceResponse, GetTargetedCampaignSettingsParams, GetTargetedCampaignSettingsResponse, GetValidationListResponse, GetValidationReportParams, GetValidationReportResponse, QueryAffiliateListParams, QueryAffiliateListResponse, RemoveAllProductsOpenCampaignSettingResponse, TerminateTargetedCampaignParams, TerminateTargetedCampaignResponse, UpdateAutoAddNewProductSettingParams, UpdateAutoAddNewProductSettingResponse, UpdateBasicInfoOfTargetedCampaignParams, UpdateBasicInfoOfTargetedCampaignResponse } from "../schemas/ams.js";
|
|
4
|
+
/**
|
|
5
|
+
* AMS (Affiliate Marketing Solution) Manager
|
|
6
|
+
*
|
|
7
|
+
* This manager provides methods for managing affiliate marketing campaigns,
|
|
8
|
+
* including open campaigns, targeted campaigns, performance tracking, and affiliate management.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AmsManager extends BaseManager {
|
|
11
|
+
constructor(config: ShopeeConfig);
|
|
12
|
+
/**
|
|
13
|
+
* Add all products to open campaign
|
|
14
|
+
*
|
|
15
|
+
* Use this API to add all shop products to the open campaign with specified commission rate and period.
|
|
16
|
+
*
|
|
17
|
+
* @param params - Parameters for adding all products
|
|
18
|
+
* @returns Promise with task ID for checking batch task result
|
|
19
|
+
*/
|
|
20
|
+
addAllProductsToOpenCampaign(params: AddAllProductsToOpenCampaignParams): Promise<AddAllProductsToOpenCampaignResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Batch add products to open campaign
|
|
23
|
+
*
|
|
24
|
+
* Use this API to add specific products to the open campaign.
|
|
25
|
+
*
|
|
26
|
+
* @param params - Parameters including item IDs, commission rate, and period
|
|
27
|
+
* @returns Promise with task ID for checking batch task result
|
|
28
|
+
*/
|
|
29
|
+
batchAddProductsToOpenCampaign(params: BatchAddProductsToOpenCampaignParams): Promise<BatchAddProductsToOpenCampaignResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Batch edit products open campaign setting
|
|
32
|
+
*
|
|
33
|
+
* Use this API to edit settings for multiple products in the open campaign.
|
|
34
|
+
*
|
|
35
|
+
* @param params - Parameters including campaign IDs and new settings
|
|
36
|
+
* @returns Promise with task ID for checking batch task result
|
|
37
|
+
*/
|
|
38
|
+
batchEditProductsOpenCampaignSetting(params: BatchEditProductsOpenCampaignSettingParams): Promise<BatchEditProductsOpenCampaignSettingResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Batch get products suggested rate
|
|
41
|
+
*
|
|
42
|
+
* Use this API to get suggested commission rates for multiple products.
|
|
43
|
+
*
|
|
44
|
+
* @param params - Parameters with item ID list
|
|
45
|
+
* @returns Promise with suggested rates for each item
|
|
46
|
+
*/
|
|
47
|
+
batchGetProductsSuggestedRate(params: BatchGetProductsSuggestedRateParams): Promise<BatchGetProductsSuggestedRateResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Batch remove products open campaign setting
|
|
50
|
+
*
|
|
51
|
+
* Use this API to remove multiple products from the open campaign.
|
|
52
|
+
*
|
|
53
|
+
* @param params - Parameters with campaign IDs to remove
|
|
54
|
+
* @returns Promise with task ID for checking batch task result
|
|
55
|
+
*/
|
|
56
|
+
batchRemoveProductsOpenCampaignSetting(params: BatchRemoveProductsOpenCampaignSettingParams): Promise<BatchRemoveProductsOpenCampaignSettingResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Edit all products open campaign setting
|
|
59
|
+
*
|
|
60
|
+
* Use this API to edit settings for all products in the open campaign.
|
|
61
|
+
*
|
|
62
|
+
* @param params - Parameters with new commission rate and period
|
|
63
|
+
* @returns Promise with task ID for checking batch task result
|
|
64
|
+
*/
|
|
65
|
+
editAllProductsOpenCampaignSetting(params: EditAllProductsOpenCampaignSettingParams): Promise<EditAllProductsOpenCampaignSettingResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* Get open campaign added product list
|
|
68
|
+
*
|
|
69
|
+
* Use this API to get the list of products added to the open campaign.
|
|
70
|
+
*
|
|
71
|
+
* @param params - Pagination and search parameters
|
|
72
|
+
* @returns Promise with list of added products
|
|
73
|
+
*/
|
|
74
|
+
getOpenCampaignAddedProduct(params: GetOpenCampaignAddedProductParams): Promise<GetOpenCampaignAddedProductResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Get open campaign batch task result
|
|
77
|
+
*
|
|
78
|
+
* Use this API to check the status and result of a batch operation.
|
|
79
|
+
*
|
|
80
|
+
* @param params - Parameters with task ID
|
|
81
|
+
* @returns Promise with task status and results
|
|
82
|
+
*/
|
|
83
|
+
getOpenCampaignBatchTaskResult(params: GetOpenCampaignBatchTaskResultParams): Promise<GetOpenCampaignBatchTaskResultResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Get open campaign not added product list
|
|
86
|
+
*
|
|
87
|
+
* Use this API to get products that are not yet added to the open campaign.
|
|
88
|
+
*
|
|
89
|
+
* @param params - Pagination and search parameters
|
|
90
|
+
* @returns Promise with list of not added products
|
|
91
|
+
*/
|
|
92
|
+
getOpenCampaignNotAddedProduct(params: GetOpenCampaignNotAddedProductParams): Promise<GetOpenCampaignNotAddedProductResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* Get open campaign performance
|
|
95
|
+
*
|
|
96
|
+
* Use this API to get performance data for the open campaign.
|
|
97
|
+
*
|
|
98
|
+
* @param params - Period type, date range, and pagination parameters
|
|
99
|
+
* @returns Promise with performance data
|
|
100
|
+
*/
|
|
101
|
+
getOpenCampaignPerformance(params: GetOpenCampaignPerformanceParams): Promise<GetOpenCampaignPerformanceResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* Remove all products from open campaign
|
|
104
|
+
*
|
|
105
|
+
* Use this API to remove all products from the open campaign.
|
|
106
|
+
*
|
|
107
|
+
* @returns Promise with task ID for checking batch task result
|
|
108
|
+
*/
|
|
109
|
+
removeAllProductsOpenCampaignSetting(): Promise<RemoveAllProductsOpenCampaignSettingResponse>;
|
|
110
|
+
/**
|
|
111
|
+
* Create a new targeted campaign
|
|
112
|
+
*
|
|
113
|
+
* Use this API to create a targeted campaign with specific products and affiliates.
|
|
114
|
+
*
|
|
115
|
+
* @param params - Campaign details including name, period, items, and affiliates
|
|
116
|
+
* @returns Promise with created campaign ID and any failed items/affiliates
|
|
117
|
+
*/
|
|
118
|
+
createNewTargetedCampaign(params: CreateNewTargetedCampaignParams): Promise<CreateNewTargetedCampaignResponse>;
|
|
119
|
+
/**
|
|
120
|
+
* Edit affiliate list of targeted campaign
|
|
121
|
+
*
|
|
122
|
+
* Use this API to add or remove affiliates from a targeted campaign.
|
|
123
|
+
*
|
|
124
|
+
* @param params - Campaign ID, edit type (add/remove), and affiliate list
|
|
125
|
+
* @returns Promise with campaign ID and any failed affiliates
|
|
126
|
+
*/
|
|
127
|
+
editAffiliateListOfTargetedCampaign(params: EditAffiliateListOfTargetedCampaignParams): Promise<EditAffiliateListOfTargetedCampaignResponse>;
|
|
128
|
+
/**
|
|
129
|
+
* Edit product list of targeted campaign
|
|
130
|
+
*
|
|
131
|
+
* Use this API to add, remove, or edit products in a targeted campaign.
|
|
132
|
+
*
|
|
133
|
+
* @param params - Campaign ID, edit type (add/remove/edit), and item list
|
|
134
|
+
* @returns Promise with campaign ID and any failed items
|
|
135
|
+
*/
|
|
136
|
+
editProductListOfTargetedCampaign(params: EditProductListOfTargetedCampaignParams): Promise<EditProductListOfTargetedCampaignResponse>;
|
|
137
|
+
/**
|
|
138
|
+
* Get targeted campaign addable product list
|
|
139
|
+
*
|
|
140
|
+
* Use this API to get products that can be added to targeted campaigns.
|
|
141
|
+
*
|
|
142
|
+
* @param params - Pagination and search parameters
|
|
143
|
+
* @returns Promise with list of addable products
|
|
144
|
+
*/
|
|
145
|
+
getTargetedCampaignAddableProductList(params: GetTargetedCampaignAddableProductListParams): Promise<GetTargetedCampaignAddableProductListResponse>;
|
|
146
|
+
/**
|
|
147
|
+
* Get targeted campaign list
|
|
148
|
+
*
|
|
149
|
+
* Use this API to get a list of targeted campaigns with optional filters.
|
|
150
|
+
*
|
|
151
|
+
* @param params - Pagination and filter parameters
|
|
152
|
+
* @returns Promise with list of campaigns
|
|
153
|
+
*/
|
|
154
|
+
getTargetedCampaignList(params?: GetTargetedCampaignListParams): Promise<GetTargetedCampaignListResponse>;
|
|
155
|
+
/**
|
|
156
|
+
* Get targeted campaign performance
|
|
157
|
+
*
|
|
158
|
+
* Use this API to get performance data for targeted campaigns.
|
|
159
|
+
*
|
|
160
|
+
* @param params - Period type, date range, and pagination parameters
|
|
161
|
+
* @returns Promise with campaign performance data
|
|
162
|
+
*/
|
|
163
|
+
getTargetedCampaignPerformance(params: GetTargetedCampaignPerformanceParams): Promise<GetTargetedCampaignPerformanceResponse>;
|
|
164
|
+
/**
|
|
165
|
+
* Get targeted campaign settings
|
|
166
|
+
*
|
|
167
|
+
* Use this API to get detailed settings of a specific targeted campaign.
|
|
168
|
+
*
|
|
169
|
+
* @param params - Campaign ID
|
|
170
|
+
* @returns Promise with campaign settings including items and affiliates
|
|
171
|
+
*/
|
|
172
|
+
getTargetedCampaignSettings(params: GetTargetedCampaignSettingsParams): Promise<GetTargetedCampaignSettingsResponse>;
|
|
173
|
+
/**
|
|
174
|
+
* Terminate targeted campaign
|
|
175
|
+
*
|
|
176
|
+
* Use this API to terminate an active targeted campaign.
|
|
177
|
+
*
|
|
178
|
+
* @param params - Campaign ID to terminate
|
|
179
|
+
* @returns Promise with terminated campaign ID
|
|
180
|
+
*/
|
|
181
|
+
terminateTargetedCampaign(params: TerminateTargetedCampaignParams): Promise<TerminateTargetedCampaignResponse>;
|
|
182
|
+
/**
|
|
183
|
+
* Update basic info of targeted campaign
|
|
184
|
+
*
|
|
185
|
+
* Use this API to update basic information of a targeted campaign.
|
|
186
|
+
*
|
|
187
|
+
* @param params - Campaign ID and fields to update
|
|
188
|
+
* @returns Promise with updated campaign ID
|
|
189
|
+
*/
|
|
190
|
+
updateBasicInfoOfTargetedCampaign(params: UpdateBasicInfoOfTargetedCampaignParams): Promise<UpdateBasicInfoOfTargetedCampaignResponse>;
|
|
191
|
+
/**
|
|
192
|
+
* Get affiliate performance
|
|
193
|
+
*
|
|
194
|
+
* Use this API to get performance data by affiliate.
|
|
195
|
+
*
|
|
196
|
+
* @param params - Period type, date range, and pagination parameters
|
|
197
|
+
* @returns Promise with affiliate performance data
|
|
198
|
+
*/
|
|
199
|
+
getAffiliatePerformance(params: GetAffiliatePerformanceParams): Promise<GetAffiliatePerformanceResponse>;
|
|
200
|
+
/**
|
|
201
|
+
* Get auto add new product toggle status
|
|
202
|
+
*
|
|
203
|
+
* Use this API to check if auto-add new product feature is enabled.
|
|
204
|
+
*
|
|
205
|
+
* @returns Promise with toggle status and commission rate
|
|
206
|
+
*/
|
|
207
|
+
getAutoAddNewProductToggleStatus(): Promise<GetAutoAddNewProductToggleStatusResponse>;
|
|
208
|
+
/**
|
|
209
|
+
* Get campaign key metrics performance
|
|
210
|
+
*
|
|
211
|
+
* Use this API to get overall key metrics for campaigns.
|
|
212
|
+
*
|
|
213
|
+
* @param params - Period type and date range
|
|
214
|
+
* @returns Promise with aggregated performance metrics
|
|
215
|
+
*/
|
|
216
|
+
getCampaignKeyMetricsPerformance(params: GetCampaignKeyMetricsPerformanceParams): Promise<GetCampaignKeyMetricsPerformanceResponse>;
|
|
217
|
+
/**
|
|
218
|
+
* Get content performance
|
|
219
|
+
*
|
|
220
|
+
* Use this API to get performance data by content.
|
|
221
|
+
*
|
|
222
|
+
* @param params - Period type, date range, and pagination parameters
|
|
223
|
+
* @returns Promise with content performance data
|
|
224
|
+
*/
|
|
225
|
+
getContentPerformance(params: GetContentPerformanceParams): Promise<GetContentPerformanceResponse>;
|
|
226
|
+
/**
|
|
227
|
+
* Get conversion report
|
|
228
|
+
*
|
|
229
|
+
* Use this API to get detailed conversion data with optional filters.
|
|
230
|
+
*
|
|
231
|
+
* @param params - Pagination and filter parameters
|
|
232
|
+
* @returns Promise with conversion report data
|
|
233
|
+
*/
|
|
234
|
+
getConversionReport(params?: GetConversionReportParams): Promise<GetConversionReportResponse>;
|
|
235
|
+
/**
|
|
236
|
+
* Get managed affiliate list
|
|
237
|
+
*
|
|
238
|
+
* Use this API to get the list of affiliates managed by the shop.
|
|
239
|
+
*
|
|
240
|
+
* @param params - Pagination parameters
|
|
241
|
+
* @returns Promise with list of managed affiliates
|
|
242
|
+
*/
|
|
243
|
+
getManagedAffiliateList(params?: GetManagedAffiliateListParams): Promise<GetManagedAffiliateListResponse>;
|
|
244
|
+
/**
|
|
245
|
+
* Get optimization suggestion product
|
|
246
|
+
*
|
|
247
|
+
* Use this API to get products with optimization suggestions.
|
|
248
|
+
*
|
|
249
|
+
* @param params - Pagination and filter parameters
|
|
250
|
+
* @returns Promise with products and their suggested optimizations
|
|
251
|
+
*/
|
|
252
|
+
getOptimizationSuggestionProduct(params?: GetOptimizationSuggestionProductParams): Promise<GetOptimizationSuggestionProductResponse>;
|
|
253
|
+
/**
|
|
254
|
+
* Get performance data update time
|
|
255
|
+
*
|
|
256
|
+
* Use this API to get the latest data date for performance data.
|
|
257
|
+
*
|
|
258
|
+
* @param params - Marker type (e.g., AmsMarker)
|
|
259
|
+
* @returns Promise with latest data date
|
|
260
|
+
*/
|
|
261
|
+
getPerformanceDataUpdateTime(params: GetPerformanceDataUpdateTimeParams): Promise<GetPerformanceDataUpdateTimeResponse>;
|
|
262
|
+
/**
|
|
263
|
+
* Get product performance
|
|
264
|
+
*
|
|
265
|
+
* Use this API to get performance data by product.
|
|
266
|
+
*
|
|
267
|
+
* @param params - Period type, date range, and pagination parameters
|
|
268
|
+
* @returns Promise with product performance data
|
|
269
|
+
*/
|
|
270
|
+
getProductPerformance(params: GetProductPerformanceParams): Promise<GetProductPerformanceResponse>;
|
|
271
|
+
/**
|
|
272
|
+
* Get recommended affiliate list
|
|
273
|
+
*
|
|
274
|
+
* Use this API to get a list of recommended affiliates for the shop.
|
|
275
|
+
*
|
|
276
|
+
* @param params - Page size parameter
|
|
277
|
+
* @returns Promise with list of recommended affiliates
|
|
278
|
+
*/
|
|
279
|
+
getRecommendedAffiliateList(params?: GetRecommendedAffiliateListParams): Promise<GetRecommendedAffiliateListResponse>;
|
|
280
|
+
/**
|
|
281
|
+
* Get shop performance
|
|
282
|
+
*
|
|
283
|
+
* Use this API to retrieve overall key metrics for all channels or specific channels.
|
|
284
|
+
*
|
|
285
|
+
* @param params - Period type, date range, order type, and channel
|
|
286
|
+
* @returns Promise with shop-level performance metrics
|
|
287
|
+
*/
|
|
288
|
+
getShopPerformance(params: AmsGetShopPerformanceParams): Promise<AmsGetShopPerformanceResponse>;
|
|
289
|
+
/**
|
|
290
|
+
* Get shop suggested rate
|
|
291
|
+
*
|
|
292
|
+
* Use this API to get the suggested commission rate for the shop.
|
|
293
|
+
*
|
|
294
|
+
* @returns Promise with suggested rate and rate range
|
|
295
|
+
*/
|
|
296
|
+
getShopSuggestedRate(): Promise<GetShopSuggestedRateResponse>;
|
|
297
|
+
/**
|
|
298
|
+
* Get validation list
|
|
299
|
+
*
|
|
300
|
+
* Use this API to get the list of validation periods.
|
|
301
|
+
*
|
|
302
|
+
* @returns Promise with list of validation periods
|
|
303
|
+
*/
|
|
304
|
+
getValidationList(): Promise<GetValidationListResponse>;
|
|
305
|
+
/**
|
|
306
|
+
* Get validation report
|
|
307
|
+
*
|
|
308
|
+
* Use this API to get detailed validation report data.
|
|
309
|
+
*
|
|
310
|
+
* @param params - Pagination and filter parameters
|
|
311
|
+
* @returns Promise with validation report data
|
|
312
|
+
*/
|
|
313
|
+
getValidationReport(params?: GetValidationReportParams): Promise<GetValidationReportResponse>;
|
|
314
|
+
/**
|
|
315
|
+
* Query affiliate list
|
|
316
|
+
*
|
|
317
|
+
* Use this API to search for affiliates by ID or name.
|
|
318
|
+
*
|
|
319
|
+
* @param params - Query type (id/name) and search criteria
|
|
320
|
+
* @returns Promise with matching affiliates
|
|
321
|
+
*/
|
|
322
|
+
queryAffiliateList(params: QueryAffiliateListParams): Promise<QueryAffiliateListResponse>;
|
|
323
|
+
/**
|
|
324
|
+
* Update auto add new product setting
|
|
325
|
+
*
|
|
326
|
+
* Use this API to enable/disable and configure auto-add new product feature.
|
|
327
|
+
*
|
|
328
|
+
* @param params - Toggle status and commission rate
|
|
329
|
+
* @returns Promise with empty response on success
|
|
330
|
+
*/
|
|
331
|
+
updateAutoAddNewProductSetting(params: UpdateAutoAddNewProductSettingParams): Promise<UpdateAutoAddNewProductSettingResponse>;
|
|
332
|
+
}
|