ebay-mcp-remote-edition 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 (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +755 -0
  3. package/build/api/account-management/account.js +301 -0
  4. package/build/api/analytics-and-report/analytics.js +102 -0
  5. package/build/api/client-trading.js +96 -0
  6. package/build/api/client.js +173 -0
  7. package/build/api/communication/feedback.js +119 -0
  8. package/build/api/communication/message.js +131 -0
  9. package/build/api/communication/negotiation.js +97 -0
  10. package/build/api/communication/notification.js +373 -0
  11. package/build/api/developer/developer.js +81 -0
  12. package/build/api/index.js +109 -0
  13. package/build/api/listing-management/inventory.js +640 -0
  14. package/build/api/listing-metadata/metadata.js +485 -0
  15. package/build/api/listing-metadata/taxonomy.js +58 -0
  16. package/build/api/marketing-and-promotions/marketing.js +768 -0
  17. package/build/api/marketing-and-promotions/recommendation.js +32 -0
  18. package/build/api/order-management/dispute.js +69 -0
  19. package/build/api/order-management/fulfillment.js +89 -0
  20. package/build/api/other/compliance.js +47 -0
  21. package/build/api/other/edelivery.js +219 -0
  22. package/build/api/other/identity.js +24 -0
  23. package/build/api/other/translation.js +22 -0
  24. package/build/api/other/vero.js +48 -0
  25. package/build/api/trading/trading.js +78 -0
  26. package/build/auth/kv-store.js +40 -0
  27. package/build/auth/multi-user-store.js +120 -0
  28. package/build/auth/oauth-metadata.js +59 -0
  29. package/build/auth/oauth-middleware.js +99 -0
  30. package/build/auth/oauth-types.js +4 -0
  31. package/build/auth/oauth.js +235 -0
  32. package/build/auth/scope-utils.js +304 -0
  33. package/build/auth/token-store.js +46 -0
  34. package/build/auth/token-verifier.js +172 -0
  35. package/build/config/environment.js +297 -0
  36. package/build/index.d.ts +1 -0
  37. package/build/index.js +129 -0
  38. package/build/schemas/account-management/account.js +375 -0
  39. package/build/schemas/analytics/analytics.js +191 -0
  40. package/build/schemas/communication/messages.js +345 -0
  41. package/build/schemas/fulfillment/orders.js +338 -0
  42. package/build/schemas/index.js +68 -0
  43. package/build/schemas/inventory-management/inventory.js +471 -0
  44. package/build/schemas/marketing/marketing.js +1103 -0
  45. package/build/schemas/metadata/metadata.js +618 -0
  46. package/build/schemas/other/other-apis.js +390 -0
  47. package/build/schemas/taxonomy/taxonomy.js +575 -0
  48. package/build/scripts/auto-setup.js +364 -0
  49. package/build/scripts/dev-sync.js +512 -0
  50. package/build/scripts/diagnostics.js +301 -0
  51. package/build/scripts/download-specs.js +116 -0
  52. package/build/scripts/interactive-setup.js +757 -0
  53. package/build/scripts/setup.js +1515 -0
  54. package/build/scripts/update-api-status-doc.js +44 -0
  55. package/build/server-http.d.ts +1 -0
  56. package/build/server-http.js +581 -0
  57. package/build/tools/definitions/account-with-schemas.js +170 -0
  58. package/build/tools/definitions/account.js +428 -0
  59. package/build/tools/definitions/analytics.js +66 -0
  60. package/build/tools/definitions/communication.js +394 -0
  61. package/build/tools/definitions/developer.js +195 -0
  62. package/build/tools/definitions/fulfillment.js +326 -0
  63. package/build/tools/definitions/index.js +41 -0
  64. package/build/tools/definitions/inventory.js +464 -0
  65. package/build/tools/definitions/marketing.js +1486 -0
  66. package/build/tools/definitions/metadata.js +188 -0
  67. package/build/tools/definitions/other.js +309 -0
  68. package/build/tools/definitions/taxonomy.js +64 -0
  69. package/build/tools/definitions/token-management.js +148 -0
  70. package/build/tools/definitions/trading.js +71 -0
  71. package/build/tools/index.js +1200 -0
  72. package/build/tools/schemas.js +667 -0
  73. package/build/tools/tool-definitions.js +3534 -0
  74. package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
  75. package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
  76. package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
  77. package/build/types/ebay-enums.js +1330 -0
  78. package/build/types/ebay.js +123 -0
  79. package/build/types/index.js +10 -0
  80. package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
  81. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
  82. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
  83. package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
  84. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
  85. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
  86. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
  87. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
  88. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
  89. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
  90. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
  91. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
  92. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
  93. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
  94. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
  95. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
  96. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
  97. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
  98. package/build/utils/account-management/account.js +831 -0
  99. package/build/utils/api-status-feed.js +83 -0
  100. package/build/utils/communication/feedback.js +216 -0
  101. package/build/utils/communication/message.js +242 -0
  102. package/build/utils/communication/negotiation.js +150 -0
  103. package/build/utils/communication/notification.js +369 -0
  104. package/build/utils/date-converter.js +160 -0
  105. package/build/utils/llm-client-detector.js +758 -0
  106. package/build/utils/logger.js +198 -0
  107. package/build/utils/oauth-helper.js +315 -0
  108. package/build/utils/order-management/dispute.js +369 -0
  109. package/build/utils/order-management/fulfillment.js +205 -0
  110. package/build/utils/other/compliance.js +76 -0
  111. package/build/utils/other/edelivery.js +241 -0
  112. package/build/utils/other/identity.js +13 -0
  113. package/build/utils/other/translation.js +41 -0
  114. package/build/utils/other/vero.js +90 -0
  115. package/build/utils/scope-helper.js +207 -0
  116. package/build/utils/security-checker.js +248 -0
  117. package/build/utils/setup-validator.js +305 -0
  118. package/build/utils/token-utils.js +40 -0
  119. package/build/utils/version.js +56 -0
  120. package/docs/auth/production_scopes.json +111 -0
  121. package/docs/auth/sandbox_scopes.json +142 -0
  122. package/package.json +122 -0
  123. package/public/icons/1024x1024.png +0 -0
  124. package/public/icons/128x128.png +0 -0
  125. package/public/icons/16x16.png +0 -0
  126. package/public/icons/256x256.png +0 -0
  127. package/public/icons/32x32.png +0 -0
  128. package/public/icons/48x48.png +0 -0
  129. package/public/icons/512x512.png +0 -0
@@ -0,0 +1,768 @@
1
+ /**
2
+ * Marketing API - Marketing campaigns and promotions
3
+ * Based on: docs/sell-apps/marketing-and-promotions/sell_marketing_v1_oas3.json
4
+ */
5
+ export class MarketingApi {
6
+ client;
7
+ basePath = '/sell/marketing/v1';
8
+ constructor(client) {
9
+ this.client = client;
10
+ }
11
+ /**
12
+ * Get campaigns
13
+ */
14
+ async getCampaigns(campaignStatus, marketplaceId, limit) {
15
+ const params = {};
16
+ if (campaignStatus)
17
+ params.campaign_status = campaignStatus;
18
+ if (marketplaceId)
19
+ params.marketplace_id = marketplaceId;
20
+ if (limit)
21
+ params.limit = limit;
22
+ return await this.client.get(`${this.basePath}/ad_campaign`, params);
23
+ }
24
+ /**
25
+ * Get a specific campaign
26
+ */
27
+ async getCampaign(campaignId) {
28
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}`);
29
+ }
30
+ /**
31
+ * Create a campaign
32
+ */
33
+ async createCampaign(campaign) {
34
+ return await this.client.post(`${this.basePath}/ad_campaign`, campaign);
35
+ }
36
+ /**
37
+ * Get promotions
38
+ */
39
+ async getPromotions(marketplaceId, limit) {
40
+ const params = {};
41
+ if (marketplaceId)
42
+ params.marketplace_id = marketplaceId;
43
+ if (limit)
44
+ params.limit = limit;
45
+ return await this.client.get(`${this.basePath}/promotion`, params);
46
+ }
47
+ /**
48
+ * Create a promotion (item promotion)
49
+ */
50
+ async createPromotion(promotion) {
51
+ return await this.client.post(`${this.basePath}/item_promotion`, promotion);
52
+ }
53
+ /**
54
+ * Get ads for a campaign
55
+ */
56
+ async getAds(campaignId, adGroupIds, adStatus, limit, listingIds, offset) {
57
+ const params = {};
58
+ if (adGroupIds)
59
+ params.ad_group_ids = adGroupIds;
60
+ if (adStatus)
61
+ params.ad_status = adStatus;
62
+ if (limit)
63
+ params.limit = limit;
64
+ if (listingIds)
65
+ params.listing_ids = listingIds;
66
+ if (offset)
67
+ params.offset = offset;
68
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/ad`, params);
69
+ }
70
+ /**
71
+ * Create an ad for a campaign
72
+ */
73
+ async createAd(campaignId, ad) {
74
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad`, ad);
75
+ }
76
+ /**
77
+ * Create ads by inventory reference for a campaign
78
+ */
79
+ async createAdsByInventoryReference(campaignId, ads) {
80
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/create_ads_by_inventory_reference`, ads);
81
+ }
82
+ /**
83
+ * Get a specific ad for a campaign
84
+ */
85
+ async getAd(campaignId, adId) {
86
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/ad/${adId}`);
87
+ }
88
+ /**
89
+ * Delete a specific ad from a campaign
90
+ */
91
+ async deleteAd(campaignId, adId) {
92
+ return await this.client.delete(`${this.basePath}/ad_campaign/${campaignId}/ad/${adId}`);
93
+ }
94
+ /**
95
+ * Clone an ad for a campaign
96
+ */
97
+ async cloneAd(campaignId, adId, ad) {
98
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad/${adId}/clone`, ad);
99
+ }
100
+ /**
101
+ * Get ads by inventory reference for a campaign
102
+ */
103
+ async getAdsByInventoryReference(campaignId, inventoryReferenceId, inventoryReferenceType) {
104
+ const params = {
105
+ inventory_reference_id: inventoryReferenceId,
106
+ inventory_reference_type: inventoryReferenceType,
107
+ };
108
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/get_ads_by_inventory_reference`, params);
109
+ }
110
+ /**
111
+ * Get ads by listing ID for a campaign
112
+ */
113
+ async getAdsByListingId(campaignId, listingId) {
114
+ const params = {
115
+ listing_id: listingId,
116
+ };
117
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/get_ads_by_listing_id`, params);
118
+ }
119
+ /**
120
+ * Update the bid for an ad in a campaign
121
+ */
122
+ async updateBid(campaignId, adId, bid) {
123
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad/${adId}/update_bid`, bid);
124
+ }
125
+ /**
126
+ * Clone a campaign
127
+ */
128
+ async cloneCampaign(campaignId, campaign) {
129
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/clone`, campaign);
130
+ }
131
+ /**
132
+ * End a campaign
133
+ */
134
+ async endCampaign(campaignId) {
135
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/end`, {});
136
+ }
137
+ /**
138
+ * Get campaign by name
139
+ */
140
+ async getCampaignByName(campaignName) {
141
+ const params = {
142
+ campaign_name: campaignName,
143
+ };
144
+ return await this.client.get(`${this.basePath}/ad_campaign/get_campaign_by_name`, params);
145
+ }
146
+ /**
147
+ * Bulk create ads by inventory reference
148
+ */
149
+ async bulkCreateAdsByInventoryReference(campaignId, body) {
150
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_create_ads_by_inventory_reference`, body);
151
+ }
152
+ /**
153
+ * Bulk create ads by listing id
154
+ */
155
+ async bulkCreateAdsByListingId(campaignId, body) {
156
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_create_ads_by_listing_id`, body);
157
+ }
158
+ async bulkDeleteAdsByInventoryReference(campaignId, body) {
159
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_delete_ads_by_inventory_reference`, body);
160
+ }
161
+ async deleteAdsByInventoryReference(campaignId, body) {
162
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/delete_ads_by_inventory_reference`, body);
163
+ }
164
+ async bulkDeleteAdsByListingId(campaignId, body) {
165
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_delete_ads_by_listing_id`, body);
166
+ }
167
+ /**
168
+ * Bulk update ads bid by inventory reference
169
+ */
170
+ async bulkUpdateAdsBidByInventoryReference(campaignId, body) {
171
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_update_ads_bid_by_inventory_reference`, body);
172
+ }
173
+ /**
174
+ * Bulk update ads bid by listing id
175
+ */
176
+ async bulkUpdateAdsBidByListingId(campaignId, body) {
177
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_update_ads_bid_by_listing_id`, body);
178
+ }
179
+ /**
180
+ * Bulk update ads status
181
+ */
182
+ async bulkUpdateAdsStatus(campaignId, body) {
183
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_update_ads_status`, body);
184
+ }
185
+ /**
186
+ * Bulk update ads status by listing id
187
+ */
188
+ async bulkUpdateAdsStatusByListingId(campaignId, body) {
189
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_update_ads_status_by_listing_id`, body);
190
+ }
191
+ /**
192
+ * Pause a campaign
193
+ */
194
+ async pauseCampaign(campaignId) {
195
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/pause`, {});
196
+ }
197
+ /**
198
+ * Resume a campaign
199
+ */
200
+ async resumeCampaign(campaignId) {
201
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/resume`, {});
202
+ }
203
+ /**
204
+ * Update campaign identification
205
+ */
206
+ async updateCampaignIdentification(campaignId, body) {
207
+ return await this.client.put(`${this.basePath}/ad_campaign/${campaignId}/update_campaign_identification`, body);
208
+ }
209
+ /**
210
+ * Create an ad group
211
+ */
212
+ async createAdGroup(campaignId, body) {
213
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group`, body);
214
+ }
215
+ /**
216
+ * Clone an ad group
217
+ */
218
+ async cloneAdGroup(campaignId, adGroupId, body) {
219
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/clone`, body);
220
+ }
221
+ /**
222
+ * Get ad groups
223
+ */
224
+ async getAdGroups(campaignId, adGroupStatus, limit, offset) {
225
+ const params = {};
226
+ if (adGroupStatus)
227
+ params.ad_group_status = adGroupStatus;
228
+ if (limit)
229
+ params.limit = limit;
230
+ if (offset)
231
+ params.offset = offset;
232
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/ad_group`, params);
233
+ }
234
+ /**
235
+ * Get an ad group
236
+ */
237
+ async getAdGroup(campaignId, adGroupId) {
238
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}`);
239
+ }
240
+ /**
241
+ * Suggest bids for an ad group
242
+ */
243
+ async suggestBids(campaignId, adGroupId) {
244
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/suggest_bids`, {});
245
+ }
246
+ /**
247
+ * Update ad group bids
248
+ */
249
+ async updateAdGroupBids(campaignId, adGroupId, body) {
250
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/update_ad_group_bids`, body);
251
+ }
252
+ /**
253
+ * Update ad group keywords
254
+ */
255
+ async updateAdGroupKeywords(campaignId, adGroupId, body) {
256
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/update_ad_group_keywords`, body);
257
+ }
258
+ /**
259
+ * Suggest keywords
260
+ */
261
+ async suggestKeywords(campaignId, adGroupId, body) {
262
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/suggest_keywords`, body);
263
+ }
264
+ /**
265
+ * Get keywords
266
+ */
267
+ async getKeywords(campaignId, adGroupId, keywordStatus, limit, offset) {
268
+ const params = {};
269
+ if (keywordStatus)
270
+ params.keyword_status = keywordStatus;
271
+ if (limit)
272
+ params.limit = limit;
273
+ if (offset)
274
+ params.offset = offset;
275
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/keyword`, params);
276
+ }
277
+ /**
278
+ * Bulk create keywords
279
+ */
280
+ async bulkCreateKeywords(campaignId, adGroupId, body) {
281
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/bulk_create_keywords`, body);
282
+ }
283
+ /**
284
+ * Bulk delete keywords
285
+ */
286
+ async bulkDeleteKeywords(campaignId, adGroupId, body) {
287
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/bulk_delete_keywords`, body);
288
+ }
289
+ /**
290
+ * Bulk update keyword bids
291
+ */
292
+ async bulkUpdateKeywordBids(campaignId, adGroupId, body) {
293
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/bulk_update_keyword_bids`, body);
294
+ }
295
+ /**
296
+ * Create a keyword
297
+ */
298
+ async createKeyword(campaignId, adGroupId, body) {
299
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/create_keyword`, body);
300
+ }
301
+ /**
302
+ * Get a keyword
303
+ */
304
+ async getKeyword(campaignId, adGroupId, keywordId) {
305
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/keyword/${keywordId}`);
306
+ }
307
+ /**
308
+ * Delete a keyword
309
+ */
310
+ async deleteKeyword(campaignId, adGroupId, keywordId) {
311
+ return await this.client.delete(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/keyword/${keywordId}`);
312
+ }
313
+ /**
314
+ * Update a keyword's bid
315
+ */
316
+ async updateKeywordBid(campaignId, adGroupId, keywordId, body) {
317
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}/keyword/${keywordId}/update_bid`, body);
318
+ }
319
+ /**
320
+ * Get ad report
321
+ */
322
+ async getAdReport(dimension, metric, startDate, endDate, sort, listingIds, marketplaceId) {
323
+ const params = {
324
+ dimension,
325
+ metric,
326
+ start_date: startDate,
327
+ end_date: endDate,
328
+ };
329
+ if (sort)
330
+ params.sort = sort;
331
+ if (listingIds)
332
+ params.listing_ids = listingIds;
333
+ if (marketplaceId)
334
+ params.marketplace_id = marketplaceId;
335
+ return await this.client.get(`${this.basePath}/ad_report`, params);
336
+ }
337
+ /**
338
+ * Get ad report metadata
339
+ */
340
+ async getAdReportMetadata() {
341
+ return await this.client.get(`${this.basePath}/ad_report_metadata`);
342
+ }
343
+ /**
344
+ * Get ad report metadata for a report type
345
+ */
346
+ async getAdReportMetadataForReportType(reportType) {
347
+ return await this.client.get(`${this.basePath}/ad_report_metadata/${reportType}`);
348
+ }
349
+ /**
350
+ * Create a report task
351
+ */
352
+ async createReportTask(body) {
353
+ return await this.client.post(`${this.basePath}/ad_report_task`, body);
354
+ }
355
+ /**
356
+ * Get report tasks
357
+ */
358
+ async getReportTasks(reportTaskStatuses, limit, offset) {
359
+ const params = {};
360
+ if (reportTaskStatuses)
361
+ params.report_task_statuses = reportTaskStatuses;
362
+ if (limit)
363
+ params.limit = limit;
364
+ if (offset)
365
+ params.offset = offset;
366
+ return await this.client.get(`${this.basePath}/ad_report_task`, params);
367
+ }
368
+ /**
369
+ * Get a report task
370
+ */
371
+ async getReportTask(reportTaskId) {
372
+ return await this.client.get(`${this.basePath}/ad_report_task/${reportTaskId}`);
373
+ }
374
+ /**
375
+ * Get an item promotion
376
+ */
377
+ async getItemPromotion(promotionId) {
378
+ return await this.client.get(`${this.basePath}/item_promotion/${promotionId}`);
379
+ }
380
+ /**
381
+ * Delete an item promotion
382
+ */
383
+ async deleteItemPromotion(promotionId) {
384
+ return await this.client.delete(`${this.basePath}/item_promotion/${promotionId}`);
385
+ }
386
+ /**
387
+ * Pause an item promotion
388
+ */
389
+ async pauseItemPromotion(promotionId) {
390
+ return await this.client.post(`${this.basePath}/item_promotion/${promotionId}/pause`, {});
391
+ }
392
+ /**
393
+ * Resume an item promotion
394
+ */
395
+ async resumeItemPromotion(promotionId) {
396
+ return await this.client.post(`${this.basePath}/item_promotion/${promotionId}/resume`, {});
397
+ }
398
+ /**
399
+ * Update an item promotion
400
+ */
401
+ async updateItemPromotion(promotionId, body) {
402
+ return await this.client.put(`${this.basePath}/item_promotion/${promotionId}`, body);
403
+ }
404
+ /**
405
+ * Get a promotion report
406
+ */
407
+ async getPromotionReport(marketplaceId, promotionStatus, limit, offset) {
408
+ const params = {
409
+ marketplace_id: marketplaceId,
410
+ };
411
+ if (promotionStatus)
412
+ params.promotion_status = promotionStatus;
413
+ if (limit)
414
+ params.limit = limit;
415
+ if (offset)
416
+ params.offset = offset;
417
+ return await this.client.get(`${this.basePath}/promotion_report`, params);
418
+ }
419
+ /**
420
+ * Get a promotion summary report
421
+ */
422
+ async getPromotionSummaryReport(marketplaceId) {
423
+ const params = { marketplace_id: marketplaceId };
424
+ return await this.client.get(`${this.basePath}/promotion_summary_report`, params);
425
+ }
426
+ /**
427
+ * Get promotion summary (alias for getPromotionSummaryReport)
428
+ */
429
+ async getPromotionSummary(marketplaceId) {
430
+ return await this.getPromotionSummaryReport(marketplaceId);
431
+ }
432
+ /**
433
+ * Get promotion reports (alias for getPromotionReport)
434
+ */
435
+ async getPromotionReports(marketplaceId, promotionStatus, limit, offset) {
436
+ return await this.getPromotionReport(marketplaceId, promotionStatus, limit, offset);
437
+ }
438
+ /**
439
+ * Get targeting for a campaign
440
+ */
441
+ async getTargeting(campaignId) {
442
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/targeting`);
443
+ }
444
+ /**
445
+ * Create targeting for a campaign
446
+ */
447
+ async createTargeting(campaignId, body) {
448
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/targeting`, body);
449
+ }
450
+ /**
451
+ * Update targeting for a campaign
452
+ */
453
+ async updateTargeting(campaignId, body) {
454
+ return await this.client.put(`${this.basePath}/ad_campaign/${campaignId}/targeting`, body);
455
+ }
456
+ /**
457
+ * Get negative keywords for a campaign
458
+ */
459
+ async getNegativeKeywords(campaignId, limit, offset) {
460
+ const params = {};
461
+ if (limit)
462
+ params.limit = limit;
463
+ if (offset)
464
+ params.offset = offset;
465
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/negative_keyword`, params);
466
+ }
467
+ /**
468
+ * Create a negative keyword for a campaign
469
+ */
470
+ async createNegativeKeyword(campaignId, body) {
471
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/negative_keyword`, body);
472
+ }
473
+ /**
474
+ * Bulk create negative keywords for a campaign
475
+ */
476
+ async bulkCreateNegativeKeywords(campaignId, body) {
477
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_create_negative_keywords`, body);
478
+ }
479
+ /**
480
+ * Bulk delete negative keywords for a campaign
481
+ */
482
+ async bulkDeleteNegativeKeywords(campaignId, body) {
483
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_delete_negative_keywords`, body);
484
+ }
485
+ /**
486
+ * Bulk update negative keywords for a campaign
487
+ */
488
+ async bulkUpdateNegativeKeywords(campaignId, body) {
489
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_update_negative_keywords`, body);
490
+ }
491
+ /**
492
+ * Get a negative keyword for a campaign
493
+ */
494
+ async getNegativeKeyword(campaignId, negativeKeywordId) {
495
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/negative_keyword/${negativeKeywordId}`);
496
+ }
497
+ /**
498
+ * Delete a negative keyword for a campaign
499
+ */
500
+ async deleteNegativeKeyword(campaignId, negativeKeywordId) {
501
+ return await this.client.delete(`${this.basePath}/ad_campaign/${campaignId}/negative_keyword/${negativeKeywordId}`);
502
+ }
503
+ /**
504
+ * Update a negative keyword for a campaign
505
+ */
506
+ async updateNegativeKeyword(campaignId, negativeKeywordId, body) {
507
+ return await this.client.put(`${this.basePath}/ad_campaign/${campaignId}/negative_keyword/${negativeKeywordId}`, body);
508
+ }
509
+ /**
510
+ * Get negative keywords for an ad group
511
+ */
512
+ async getNegativeKeywordsForAdGroup(adGroupId, limit, offset) {
513
+ const params = {};
514
+ if (limit)
515
+ params.limit = limit;
516
+ if (offset)
517
+ params.offset = offset;
518
+ return await this.client.get(`${this.basePath}/ad_group/${adGroupId}/negative_keyword`, params);
519
+ }
520
+ /**
521
+ * Create a negative keyword for an ad group
522
+ */
523
+ async createNegativeKeywordForAdGroup(adGroupId, body) {
524
+ return await this.client.post(`${this.basePath}/ad_group/${adGroupId}/negative_keyword`, body);
525
+ }
526
+ /**
527
+ * Bulk create negative keywords for an ad group
528
+ */
529
+ async bulkCreateNegativeKeywordsForAdGroup(adGroupId, body) {
530
+ return await this.client.post(`${this.basePath}/ad_group/${adGroupId}/bulk_create_negative_keywords`, body);
531
+ }
532
+ /**
533
+ * Bulk delete negative keywords for an ad group
534
+ */
535
+ async bulkDeleteNegativeKeywordsForAdGroup(adGroupId, body) {
536
+ return await this.client.post(`${this.basePath}/ad_group/${adGroupId}/bulk_delete_negative_keywords`, body);
537
+ }
538
+ /**
539
+ * Bulk update negative keywords for an ad group
540
+ */
541
+ async bulkUpdateNegativeKeywordsForAdGroup(adGroupId, body) {
542
+ return await this.client.post(`${this.basePath}/ad_group/${adGroupId}/bulk_update_negative_keywords`, body);
543
+ }
544
+ /**
545
+ * Get a negative keyword for an ad group
546
+ */
547
+ async getNegativeKeywordForAdGroup(adGroupId, negativeKeywordId) {
548
+ return await this.client.get(`${this.basePath}/ad_group/${adGroupId}/negative_keyword/${negativeKeywordId}`);
549
+ }
550
+ /**
551
+ * Delete a negative keyword for an ad group
552
+ */
553
+ async deleteNegativeKeywordForAdGroup(adGroupId, negativeKeywordId) {
554
+ return await this.client.delete(`${this.basePath}/ad_group/${adGroupId}/negative_keyword/${negativeKeywordId}`);
555
+ }
556
+ /**
557
+ * Update a negative keyword for an ad group
558
+ */
559
+ async updateNegativeKeywordForAdGroup(adGroupId, negativeKeywordId, body) {
560
+ return await this.client.put(`${this.basePath}/ad_group/${adGroupId}/negative_keyword/${negativeKeywordId}`, body);
561
+ }
562
+ /**
563
+ * Delete a campaign
564
+ */
565
+ async deleteCampaign(campaignId) {
566
+ return await this.client.delete(`${this.basePath}/ad_campaign/${campaignId}`);
567
+ }
568
+ /**
569
+ * Launch a campaign
570
+ */
571
+ async launchCampaign(campaignId) {
572
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/launch`, {});
573
+ }
574
+ /**
575
+ * Find campaign by ad reference
576
+ */
577
+ async findCampaignByAdReference(inventoryReferenceId, inventoryReferenceType, listingId) {
578
+ const params = {};
579
+ if (inventoryReferenceId)
580
+ params.inventory_reference_id = inventoryReferenceId;
581
+ if (inventoryReferenceType)
582
+ params.inventory_reference_type = inventoryReferenceType;
583
+ if (listingId)
584
+ params.listing_id = listingId;
585
+ return await this.client.get(`${this.basePath}/ad_campaign/find_campaign_by_ad_reference`, params);
586
+ }
587
+ /**
588
+ * Setup quick campaign
589
+ */
590
+ async setupQuickCampaign(body) {
591
+ return await this.client.post(`${this.basePath}/ad_campaign/setup_quick_campaign`, body);
592
+ }
593
+ /**
594
+ * Suggest budget for a campaign
595
+ */
596
+ async suggestBudget(campaignId) {
597
+ const params = {};
598
+ if (campaignId)
599
+ params.campaign_id = campaignId;
600
+ return await this.client.get(`${this.basePath}/ad_campaign/suggest_budget`, params);
601
+ }
602
+ /**
603
+ * Suggest items for a campaign
604
+ */
605
+ async suggestItems(campaignId) {
606
+ return await this.client.get(`${this.basePath}/ad_campaign/${campaignId}/suggest_items`);
607
+ }
608
+ /**
609
+ * Suggest max CPC for ads
610
+ */
611
+ async suggestMaxCpc(body) {
612
+ return await this.client.post(`${this.basePath}/ad_campaign/suggest_max_cpc`, body);
613
+ }
614
+ /**
615
+ * Update ad rate strategy for a campaign
616
+ */
617
+ async updateAdRateStrategy(campaignId, body) {
618
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/update_ad_rate_strategy`, body);
619
+ }
620
+ /**
621
+ * Update bidding strategy for a campaign
622
+ */
623
+ async updateBiddingStrategy(campaignId, body) {
624
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/update_bidding_strategy`, body);
625
+ }
626
+ /**
627
+ * Update campaign budget
628
+ */
629
+ async updateCampaignBudget(campaignId, body) {
630
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/update_campaign_budget`, body);
631
+ }
632
+ /**
633
+ * Update an ad group
634
+ */
635
+ async updateAdGroup(campaignId, adGroupId, body) {
636
+ return await this.client.put(`${this.basePath}/ad_campaign/${campaignId}/ad_group/${adGroupId}`, body);
637
+ }
638
+ /**
639
+ * Update a keyword
640
+ */
641
+ async updateKeyword(campaignId, keywordId, body) {
642
+ return await this.client.put(`${this.basePath}/ad_campaign/${campaignId}/keyword/${keywordId}`, body);
643
+ }
644
+ /**
645
+ * Bulk create keywords (campaign level)
646
+ */
647
+ async bulkCreateKeyword(campaignId, body) {
648
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_create_keyword`, body);
649
+ }
650
+ /**
651
+ * Bulk update keywords (campaign level)
652
+ */
653
+ async bulkUpdateKeyword(campaignId, body) {
654
+ return await this.client.post(`${this.basePath}/ad_campaign/${campaignId}/bulk_update_keyword`, body);
655
+ }
656
+ /**
657
+ * Get a report by ID
658
+ */
659
+ async getReport(reportId) {
660
+ return await this.client.get(`${this.basePath}/ad_report/${reportId}`);
661
+ }
662
+ /**
663
+ * Delete a report task
664
+ */
665
+ async deleteReportTask(reportTaskId) {
666
+ return await this.client.delete(`${this.basePath}/ad_report_task/${reportTaskId}`);
667
+ }
668
+ /**
669
+ * Create an item price markdown promotion
670
+ */
671
+ async createItemPriceMarkdownPromotion(body) {
672
+ return await this.client.post(`${this.basePath}/item_price_markdown`, body);
673
+ }
674
+ /**
675
+ * Get an item price markdown promotion
676
+ */
677
+ async getItemPriceMarkdownPromotion(promotionId) {
678
+ return await this.client.get(`${this.basePath}/item_price_markdown/${promotionId}`);
679
+ }
680
+ /**
681
+ * Update an item price markdown promotion
682
+ */
683
+ async updateItemPriceMarkdownPromotion(promotionId, body) {
684
+ return await this.client.put(`${this.basePath}/item_price_markdown/${promotionId}`, body);
685
+ }
686
+ /**
687
+ * Delete an item price markdown promotion
688
+ */
689
+ async deleteItemPriceMarkdownPromotion(promotionId) {
690
+ return await this.client.delete(`${this.basePath}/item_price_markdown/${promotionId}`);
691
+ }
692
+ /**
693
+ * Get listing set for a promotion
694
+ */
695
+ async getListingSet(promotionId) {
696
+ return await this.client.get(`${this.basePath}/promotion/${promotionId}/get_listing_set`);
697
+ }
698
+ /**
699
+ * Pause a promotion
700
+ */
701
+ async pausePromotion(promotionId) {
702
+ return await this.client.post(`${this.basePath}/promotion/${promotionId}/pause`, {});
703
+ }
704
+ /**
705
+ * Resume a promotion
706
+ */
707
+ async resumePromotion(promotionId) {
708
+ return await this.client.post(`${this.basePath}/promotion/${promotionId}/resume`, {});
709
+ }
710
+ /**
711
+ * Get email campaigns
712
+ */
713
+ async getEmailCampaigns(limit, offset) {
714
+ const params = {};
715
+ if (limit)
716
+ params.limit = limit;
717
+ if (offset)
718
+ params.offset = offset;
719
+ return await this.client.get(`${this.basePath}/email_campaign`, params);
720
+ }
721
+ /**
722
+ * Create an email campaign
723
+ */
724
+ async createEmailCampaign(body) {
725
+ return await this.client.post(`${this.basePath}/email_campaign`, body);
726
+ }
727
+ /**
728
+ * Get an email campaign
729
+ */
730
+ async getEmailCampaign(emailCampaignId) {
731
+ return await this.client.get(`${this.basePath}/email_campaign/${emailCampaignId}`);
732
+ }
733
+ /**
734
+ * Update an email campaign
735
+ */
736
+ async updateEmailCampaign(emailCampaignId, body) {
737
+ return await this.client.put(`${this.basePath}/email_campaign/${emailCampaignId}`, body);
738
+ }
739
+ /**
740
+ * Delete an email campaign
741
+ */
742
+ async deleteEmailCampaign(emailCampaignId) {
743
+ return await this.client.delete(`${this.basePath}/email_campaign/${emailCampaignId}`);
744
+ }
745
+ /**
746
+ * Get email campaign audiences
747
+ */
748
+ async getAudiences() {
749
+ return await this.client.get(`${this.basePath}/email_campaign/audience`);
750
+ }
751
+ /**
752
+ * Get email preview for a campaign
753
+ */
754
+ async getEmailPreview(emailCampaignId) {
755
+ return await this.client.get(`${this.basePath}/email_campaign/${emailCampaignId}/email_preview`);
756
+ }
757
+ /**
758
+ * Get email campaign report
759
+ */
760
+ async getEmailReport(limit, offset) {
761
+ const params = {};
762
+ if (limit)
763
+ params.limit = limit;
764
+ if (offset)
765
+ params.offset = offset;
766
+ return await this.client.get(`${this.basePath}/email_campaign/report`, params);
767
+ }
768
+ }