ebay-api 8.2.0 → 8.3.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.
@@ -477,6 +477,96 @@ export type CreateAdRequest = {
477
477
  export type BulkCreateAdRequest = {
478
478
  requests: CreateAdRequest[];
479
479
  };
480
+ export type AdStatus = 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
481
+ export type UpdateAdStatusRequest = {
482
+ adId: string;
483
+ adStatus: AdStatus;
484
+ };
485
+ export type BulkUpdateAdStatusRequest = {
486
+ items: UpdateAdStatusRequest[];
487
+ };
488
+ export type UpdateAdStatusByListingIdRequest = {
489
+ adGroupId: string;
490
+ adStatus: AdStatus;
491
+ listingId: string;
492
+ };
493
+ export type BulkUpdateAdStatusByListingIdRequest = {
494
+ items: UpdateAdStatusByListingIdRequest[];
495
+ };
496
+ export type CreateAdGroupRequest = {
497
+ defaultBid: Amount;
498
+ name: string;
499
+ };
500
+ export type AdGroupStatus = 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
501
+ export type UpdateAdGroupRequest = {
502
+ adGroupStatus: AdGroupStatus;
503
+ defaultBid: Amount;
504
+ name: string;
505
+ };
506
+ export type KeywordRequest = {
507
+ keywordText: string;
508
+ matchType: string;
509
+ };
510
+ export type TargetedBidRequest = {
511
+ keywords: KeywordRequest[];
512
+ };
513
+ export type TargetedKeywordRequest = {
514
+ additionalInfo: string[];
515
+ exclusions: string[];
516
+ listingIds: string[];
517
+ matchType: string;
518
+ };
519
+ export type DynamicAdRatePreference = {
520
+ adRateAdjustmentPercent: string;
521
+ adRateCapPercent: string;
522
+ };
523
+ export type UpdateAdrateStrategyRequest = {
524
+ adRateStrategy: string;
525
+ bidPercentage: string;
526
+ dynamicAdRatePreferences: DynamicAdRatePreference[];
527
+ };
528
+ export type BudgetRequest = {
529
+ amount: Amount;
530
+ };
531
+ export type UpdateCampaignBudgetRequest = {
532
+ daily: BudgetRequest;
533
+ };
534
+ export type CreateKeywordRequest = {
535
+ adGroupId: string;
536
+ bid: Amount;
537
+ keywordText: string;
538
+ matchType: string;
539
+ };
540
+ export type UpdateKeywordRequest = {
541
+ bid: Amount;
542
+ keywordStatus: string;
543
+ };
544
+ export type UpdateKeywordByKeywordIdRequest = {
545
+ bid: Amount;
546
+ keywordId: string;
547
+ keywordStatus: string;
548
+ };
549
+ export type BulkCreateKeywordRequest = {
550
+ requests: CreateKeywordRequest[];
551
+ };
552
+ export type BulkUpdateKeywordRequest = {
553
+ requests: UpdateKeywordByKeywordIdRequest[];
554
+ };
555
+ export type CreateNegativeKeywordRequest = {
556
+ adGroupId: string;
557
+ campaignId: string;
558
+ negativeKeywordMatchType: string;
559
+ negativeKeywordText: string;
560
+ };
561
+ export type BulkCreateNegativeKeywordRequest = {
562
+ requests: CreateNegativeKeywordRequest[];
563
+ };
564
+ export type BulkUpdateNegativeKeywordRequest = {
565
+ requests: CreateNegativeKeywordRequest[];
566
+ };
567
+ export type UpdateNegativeKeywordRequest = {
568
+ negativeKeywordStatus: string;
569
+ };
480
570
  export type DeleteAdsByInventoryReferenceRequest = {
481
571
  inventoryReferenceId: string;
482
572
  inventoryReferenceType: string;
@@ -1,5 +1,5 @@
1
+ import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkCreateKeywordRequest, BulkCreateNegativeKeywordRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, BulkUpdateAdStatusByListingIdRequest, BulkUpdateAdStatusRequest, BulkUpdateKeywordRequest, BulkUpdateNegativeKeywordRequest, CloneCampaignRequest, CreateAdGroupRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateKeywordRequest, CreateNegativeKeywordRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, TargetedBidRequest, TargetedKeywordRequest, UpdateAdGroupRequest, UpdateAdrateStrategyRequest, UpdateBidPercentageRequest, UpdateCampaignBudgetRequest, UpdateCampaignIdentificationRequest, UpdateKeywordRequest, UpdateNegativeKeywordRequest } from '../../../../types/index.js';
1
2
  import Restful from '../../index.js';
2
- import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, CloneCampaignRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, UpdateBidPercentageRequest, UpdateCampaignIdentificationRequest } from '../../../../types/index.js';
3
3
  /**
4
4
  * <p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:
5
5
  * </p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i>
@@ -61,6 +61,22 @@ export default class Marketing extends Restful {
61
61
  * @param body Container for the bulk request to update ads.
62
62
  */
63
63
  bulkUpdateAdsBidByListingId(campaignId: string, body: BulkCreateAdRequest): Promise<any>;
64
+ /**
65
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
66
+ *
67
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
68
+ * a seller's campaign IDs by calling getCampaigns.
69
+ * @param body The bulk request to update the ads.
70
+ */
71
+ bulkUpdateAdsStatus(campaignId: string, body: BulkUpdateAdStatusRequest): Promise<any>;
72
+ /**
73
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
74
+ *
75
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
76
+ * a seller's campaign IDs by calling getCampaigns.
77
+ * @param body The bulk request to update ads.
78
+ */
79
+ bulkUpdateAdsStatusByListingId(campaignId: string, body: BulkUpdateAdStatusByListingIdRequest): Promise<any>;
64
80
  /**
65
81
  * This method retrieves all the ads for the specified campaign.
66
82
  *
@@ -140,6 +156,57 @@ export default class Marketing extends Restful {
140
156
  * @param body This type defines the fields for the updateBid request.
141
157
  */
142
158
  updateBid(campaignId: string, adId: string, body: UpdateBidPercentageRequest): Promise<any>;
159
+ /**
160
+ *
161
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
162
+ * a seller's campaign IDs by calling getCampaigns.
163
+ * @param adGroupStatus A comma-separated list of ad group statuses.
164
+ * @param limit The number of results, from the current result set, to be returned in a single page.
165
+ * @param offset The number of results that will be skipped in the result set.
166
+ */
167
+ getAdGroups(campaignId: string, { adGroupStatus, limit, offset }?: {
168
+ adGroupStatus?: string;
169
+ limit?: number;
170
+ offset?: number;
171
+ }): Promise<any>;
172
+ /**
173
+ *
174
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
175
+ * a seller's campaign IDs by calling getCampaigns.
176
+ * @param body This type defines the fields for the <b>createAdGroup</b> request.
177
+ */
178
+ createAdGroup(campaignId: string, body: CreateAdGroupRequest): Promise<any>;
179
+ /**
180
+ *
181
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
182
+ * a seller's campaign IDs by calling getCampaigns.
183
+ * @param adGroupId The ID of the ad group that shall be retrieved.
184
+ */
185
+ getAdGroup(campaignId: string, adGroupId: string): Promise<any>;
186
+ /**
187
+ *
188
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
189
+ * a seller's campaign IDs by calling getCampaigns.
190
+ * @param adGroupId The ID of the ad group that shall be retrieved.
191
+ * @param body This type defines the fields for the <b>UpdateAdGroup</b> request.
192
+ */
193
+ updateAdGroup(campaignId: string, adGroupId: string, body: UpdateAdGroupRequest): Promise<any>;
194
+ /**
195
+ *
196
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
197
+ * a seller's campaign IDs by calling getCampaigns.
198
+ * @param adGroupId The ID of the ad group that shall be retrieved.
199
+ * @param body The data requested to retrieve the suggested bids.
200
+ */
201
+ suggestBids(campaignId: string, adGroupId: string, body: TargetedBidRequest): Promise<any>;
202
+ /**
203
+ *
204
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
205
+ * a seller's campaign IDs by calling getCampaigns.
206
+ * @param adGroupId The ID of the ad group that shall be retrieved.
207
+ * @param body The required data to retrieve suggested keywords.
208
+ */
209
+ suggestKeywords(campaignId: string, adGroupId: string, body: TargetedKeywordRequest): Promise<any>;
143
210
  /**
144
211
  * This method clones (makes a copy of) the specified campaign.
145
212
  *
@@ -236,6 +303,30 @@ export default class Marketing extends Restful {
236
303
  * a seller's campaign IDs by calling getCampaigns.
237
304
  */
238
305
  resumeCampaign(campaignId: string): Promise<any>;
306
+ /**
307
+ *
308
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
309
+ * @param categoryIds Specifies the category ID that is used to limit the results.
310
+ * @param limit Specifies the maximum number of campaigns to return on a page in the paginated response.
311
+ * @param offset Specifies the number of campaigns to skip in the result set before returning the first report in the paginated response.
312
+ */
313
+ suggestItems(campaignId: string, { categoryIds, limit, offset }?: {
314
+ categoryIds?: string;
315
+ limit?: number;
316
+ offset?: number;
317
+ }): Promise<any>;
318
+ /**
319
+ *
320
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
321
+ * @param body This type defines the request fields for the ad rate strategy that shall be updated.
322
+ */
323
+ updateAdRateStrategy(campaignId: string, body: UpdateAdrateStrategyRequest): Promise<any>;
324
+ /**
325
+ *
326
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
327
+ * @param body This type defines the request fields for the budget details that shall be updated.
328
+ */
329
+ updateCampaignBudget(campaignId: string, body: UpdateCampaignBudgetRequest): Promise<any>;
239
330
  /**
240
331
  * This method replaces the name and the start and end dates of a campaign.
241
332
  *
@@ -244,6 +335,98 @@ export default class Marketing extends Restful {
244
335
  * @param body This type defines the fields to updated the campaign name and start and end dates.
245
336
  */
246
337
  updateCampaignIdentification(campaignId: string, body: UpdateCampaignIdentificationRequest): Promise<any>;
338
+ /**
339
+ *
340
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
341
+ * a seller's campaign IDs by calling getCampaigns.
342
+ * @param body A type that defines the fields for the bulk request to create keywords.
343
+ */
344
+ bulkCreateKeyword(campaignId: string, body: BulkCreateKeywordRequest): Promise<any>;
345
+ /**
346
+ *
347
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
348
+ * a seller's campaign IDs by calling getCampaigns.
349
+ * @param body A type that defines the fields for the bulk request to update keywords.
350
+ */
351
+ bulkUpdateKeyword(campaignId: string, body: BulkUpdateKeywordRequest): Promise<any>;
352
+ /**
353
+ *
354
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
355
+ * a seller's campaign IDs by calling getCampaigns.
356
+ * @param adGroupIds A comma-separated list of ad group IDs.
357
+ * @param keywordStatus A comma-separated list of keyword statuses.
358
+ * @param limit Specifies the maximum number of results to return on a page in the paginated response.
359
+ * @param offset Specifies the number of results to skip in the result set before returning the first report in the paginated response.
360
+ */
361
+ getKeywords(campaignId: string, { adGroupIds, keywordStatus, limit, offset }?: {
362
+ adGroupIds?: string;
363
+ keywordStatus?: string;
364
+ limit?: number;
365
+ offset?: number;
366
+ }): Promise<any>;
367
+ /**
368
+ *
369
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
370
+ * a seller's campaign IDs by calling getCampaigns.
371
+ * @param body A type that defines the fields for the request to create a keyword.
372
+ */
373
+ createKeyword(campaignId: string, body: CreateKeywordRequest): Promise<any>;
374
+ /**
375
+ *
376
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
377
+ * a seller's campaign IDs by calling getCampaigns.
378
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
379
+ */
380
+ getKeyword(campaignId: string, keywordId: string): Promise<any>;
381
+ /**
382
+ *
383
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
384
+ * a seller's campaign IDs by calling getCampaigns.
385
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
386
+ * @param body A type that defines the fields for the request to update a keyword.
387
+ */
388
+ updateKeyword(campaignId: string, keywordId: string, body: UpdateKeywordRequest): Promise<any>;
389
+ /**
390
+ *
391
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
392
+ */
393
+ bulkCreateNegativeKeyword(body: BulkCreateNegativeKeywordRequest): Promise<any>;
394
+ /**
395
+ *
396
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
397
+ */
398
+ bulkUpdateNegativeKeyword(body: BulkUpdateNegativeKeywordRequest): Promise<any>;
399
+ /**
400
+ *
401
+ * @param adGroupIds A comma-separated list of ad group IDs.
402
+ * @param campaignIds A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
403
+ * @param limit The number of results, from the current result set, to be returned in a single page.
404
+ * @param negativeKeywordStatus A comma-separated list of negative keyword statuses.
405
+ * @param offset The number of results that will be skipped in the result set.
406
+ */
407
+ getNegativeKeywords({ adGroupIds, campaignIds, limit, negativeKeywordStatus, offset }?: {
408
+ adGroupIds?: string;
409
+ campaignIds?: string;
410
+ limit?: number;
411
+ negativeKeywordStatus?: string;
412
+ offset?: number;
413
+ }): Promise<any>;
414
+ /**
415
+ *
416
+ * @param body A type that defines the fields for the request to create a negative keyword.
417
+ */
418
+ createNegativeKeyword(body: CreateNegativeKeywordRequest): Promise<any>;
419
+ /**
420
+ *
421
+ * @param negativeKeywordId The unique identifier for the negative keyword.
422
+ */
423
+ getNegativeKeyword(negativeKeywordId: string): Promise<any>;
424
+ /**
425
+ *
426
+ * @param negativeKeywordId The unique identifier for the negative keyword.
427
+ * @param body A type that defines the fields for the request to update a negative keyword.
428
+ */
429
+ updateNegativeKeyword(negativeKeywordId: string, body: UpdateNegativeKeywordRequest): Promise<any>;
247
430
  /**
248
431
  * This call downloads the report as specified by the report_id path parameter.
249
432
  *
@@ -84,6 +84,28 @@ class Marketing extends index_js_1.default {
84
84
  campaignId = encodeURIComponent(campaignId);
85
85
  return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_bid_by_listing_id`, body);
86
86
  }
87
+ /**
88
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
89
+ *
90
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
91
+ * a seller's campaign IDs by calling getCampaigns.
92
+ * @param body The bulk request to update the ads.
93
+ */
94
+ bulkUpdateAdsStatus(campaignId, body) {
95
+ campaignId = encodeURIComponent(campaignId);
96
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_status`, body);
97
+ }
98
+ /**
99
+ * This method is only available for select partners who have been approved for the eBay Promoted Listings Advanced (PLA) program.
100
+ *
101
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
102
+ * a seller's campaign IDs by calling getCampaigns.
103
+ * @param body The bulk request to update ads.
104
+ */
105
+ bulkUpdateAdsStatusByListingId(campaignId, body) {
106
+ campaignId = encodeURIComponent(campaignId);
107
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_status_by_listing_id`, body);
108
+ }
87
109
  /**
88
110
  * This method retrieves all the ads for the specified campaign.
89
111
  *
@@ -197,6 +219,81 @@ class Marketing extends index_js_1.default {
197
219
  adId = encodeURIComponent(adId);
198
220
  return this.post(`/ad_campaign/${campaignId}/ad/${adId}/update_bid`, body);
199
221
  }
222
+ /**
223
+ *
224
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
225
+ * a seller's campaign IDs by calling getCampaigns.
226
+ * @param adGroupStatus A comma-separated list of ad group statuses.
227
+ * @param limit The number of results, from the current result set, to be returned in a single page.
228
+ * @param offset The number of results that will be skipped in the result set.
229
+ */
230
+ getAdGroups(campaignId, { adGroupStatus, limit, offset } = {}) {
231
+ campaignId = encodeURIComponent(campaignId);
232
+ return this.get(`/ad_campaign/${campaignId}/ad_group`, {
233
+ params: {
234
+ ad_group_status: adGroupStatus,
235
+ limit,
236
+ offset
237
+ }
238
+ });
239
+ }
240
+ /**
241
+ *
242
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
243
+ * a seller's campaign IDs by calling getCampaigns.
244
+ * @param body This type defines the fields for the <b>createAdGroup</b> request.
245
+ */
246
+ createAdGroup(campaignId, body) {
247
+ campaignId = encodeURIComponent(campaignId);
248
+ return this.post(`/ad_campaign/${campaignId}/ad_group`, body);
249
+ }
250
+ /**
251
+ *
252
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
253
+ * a seller's campaign IDs by calling getCampaigns.
254
+ * @param adGroupId The ID of the ad group that shall be retrieved.
255
+ */
256
+ getAdGroup(campaignId, adGroupId) {
257
+ adGroupId = encodeURIComponent(adGroupId);
258
+ campaignId = encodeURIComponent(campaignId);
259
+ return this.get(`/ad_campaign/${campaignId}/ad_group/${adGroupId}`);
260
+ }
261
+ /**
262
+ *
263
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
264
+ * a seller's campaign IDs by calling getCampaigns.
265
+ * @param adGroupId The ID of the ad group that shall be retrieved.
266
+ * @param body This type defines the fields for the <b>UpdateAdGroup</b> request.
267
+ */
268
+ updateAdGroup(campaignId, adGroupId, body) {
269
+ adGroupId = encodeURIComponent(adGroupId);
270
+ campaignId = encodeURIComponent(campaignId);
271
+ return this.put(`/ad_campaign/${campaignId}/ad_group/${adGroupId}`, body);
272
+ }
273
+ /**
274
+ *
275
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
276
+ * a seller's campaign IDs by calling getCampaigns.
277
+ * @param adGroupId The ID of the ad group that shall be retrieved.
278
+ * @param body The data requested to retrieve the suggested bids.
279
+ */
280
+ suggestBids(campaignId, adGroupId, body) {
281
+ adGroupId = encodeURIComponent(adGroupId);
282
+ campaignId = encodeURIComponent(campaignId);
283
+ return this.post(`/ad_campaign/${campaignId}/ad_group/${adGroupId}/suggest_bids`, body);
284
+ }
285
+ /**
286
+ *
287
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
288
+ * a seller's campaign IDs by calling getCampaigns.
289
+ * @param adGroupId The ID of the ad group that shall be retrieved.
290
+ * @param body The required data to retrieve suggested keywords.
291
+ */
292
+ suggestKeywords(campaignId, adGroupId, body) {
293
+ adGroupId = encodeURIComponent(adGroupId);
294
+ campaignId = encodeURIComponent(campaignId);
295
+ return this.post(`/ad_campaign/${campaignId}/ad_group/${adGroupId}/suggest_keywords`, body);
296
+ }
200
297
  /**
201
298
  * This method clones (makes a copy of) the specified campaign.
202
299
  *
@@ -327,6 +424,41 @@ class Marketing extends index_js_1.default {
327
424
  campaignId = encodeURIComponent(campaignId);
328
425
  return this.post(`/ad_campaign/${campaignId}/resume`);
329
426
  }
427
+ /**
428
+ *
429
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
430
+ * @param categoryIds Specifies the category ID that is used to limit the results.
431
+ * @param limit Specifies the maximum number of campaigns to return on a page in the paginated response.
432
+ * @param offset Specifies the number of campaigns to skip in the result set before returning the first report in the paginated response.
433
+ */
434
+ suggestItems(campaignId, { categoryIds, limit, offset } = {}) {
435
+ campaignId = encodeURIComponent(campaignId);
436
+ return this.get(`/ad_campaign/${campaignId}/suggest_items`, {
437
+ params: {
438
+ category_ids: categoryIds,
439
+ limit,
440
+ offset
441
+ }
442
+ });
443
+ }
444
+ /**
445
+ *
446
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
447
+ * @param body This type defines the request fields for the ad rate strategy that shall be updated.
448
+ */
449
+ updateAdRateStrategy(campaignId, body) {
450
+ campaignId = encodeURIComponent(campaignId);
451
+ return this.post(`/ad_campaign/${campaignId}/update_ad_rate_strategy`, body);
452
+ }
453
+ /**
454
+ *
455
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
456
+ * @param body This type defines the request fields for the budget details that shall be updated.
457
+ */
458
+ updateCampaignBudget(campaignId, body) {
459
+ campaignId = encodeURIComponent(campaignId);
460
+ return this.post(`/ad_campaign/${campaignId}/update_campaign_budget`, body);
461
+ }
330
462
  /**
331
463
  * This method replaces the name and the start and end dates of a campaign.
332
464
  *
@@ -338,6 +470,134 @@ class Marketing extends index_js_1.default {
338
470
  campaignId = encodeURIComponent(campaignId);
339
471
  return this.post(`/ad_campaign/${campaignId}/update_campaign_identification`, body);
340
472
  }
473
+ /**
474
+ *
475
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
476
+ * a seller's campaign IDs by calling getCampaigns.
477
+ * @param body A type that defines the fields for the bulk request to create keywords.
478
+ */
479
+ bulkCreateKeyword(campaignId, body) {
480
+ campaignId = encodeURIComponent(campaignId);
481
+ return this.post(`/ad_campaign/${campaignId}/bulk_create_keyword`, body);
482
+ }
483
+ /**
484
+ *
485
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
486
+ * a seller's campaign IDs by calling getCampaigns.
487
+ * @param body A type that defines the fields for the bulk request to update keywords.
488
+ */
489
+ bulkUpdateKeyword(campaignId, body) {
490
+ campaignId = encodeURIComponent(campaignId);
491
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_keyword`, body);
492
+ }
493
+ /**
494
+ *
495
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
496
+ * a seller's campaign IDs by calling getCampaigns.
497
+ * @param adGroupIds A comma-separated list of ad group IDs.
498
+ * @param keywordStatus A comma-separated list of keyword statuses.
499
+ * @param limit Specifies the maximum number of results to return on a page in the paginated response.
500
+ * @param offset Specifies the number of results to skip in the result set before returning the first report in the paginated response.
501
+ */
502
+ getKeywords(campaignId, { adGroupIds, keywordStatus, limit, offset } = {}) {
503
+ campaignId = encodeURIComponent(campaignId);
504
+ return this.get(`/ad_campaign/${campaignId}/keyword`, {
505
+ params: {
506
+ ad_group_ids: adGroupIds,
507
+ keyword_status: keywordStatus,
508
+ limit,
509
+ offset
510
+ }
511
+ });
512
+ }
513
+ /**
514
+ *
515
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
516
+ * a seller's campaign IDs by calling getCampaigns.
517
+ * @param body A type that defines the fields for the request to create a keyword.
518
+ */
519
+ createKeyword(campaignId, body) {
520
+ campaignId = encodeURIComponent(campaignId);
521
+ return this.post(`/ad_campaign/${campaignId}/keyword`, body);
522
+ }
523
+ /**
524
+ *
525
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
526
+ * a seller's campaign IDs by calling getCampaigns.
527
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
528
+ */
529
+ getKeyword(campaignId, keywordId) {
530
+ campaignId = encodeURIComponent(campaignId);
531
+ keywordId = encodeURIComponent(keywordId);
532
+ return this.get(`/ad_campaign/${campaignId}/keyword/${keywordId}`);
533
+ }
534
+ /**
535
+ *
536
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
537
+ * a seller's campaign IDs by calling getCampaigns.
538
+ * @param keywordId This path parameter is used to identify the keyword to retrieve.
539
+ * @param body A type that defines the fields for the request to update a keyword.
540
+ */
541
+ updateKeyword(campaignId, keywordId, body) {
542
+ campaignId = encodeURIComponent(campaignId);
543
+ keywordId = encodeURIComponent(keywordId);
544
+ return this.put(`/ad_campaign/${campaignId}/keyword/${keywordId}`, body);
545
+ }
546
+ /**
547
+ *
548
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
549
+ */
550
+ bulkCreateNegativeKeyword(body) {
551
+ return this.post(`/bulk_create_negative_keyword`, body);
552
+ }
553
+ /**
554
+ *
555
+ * @param body A type that defines the fields for the bulk request to create negative keywords.
556
+ */
557
+ bulkUpdateNegativeKeyword(body) {
558
+ return this.post(`/bulk_update_negative_keyword`, body);
559
+ }
560
+ /**
561
+ *
562
+ * @param adGroupIds A comma-separated list of ad group IDs.
563
+ * @param campaignIds A unique eBay-assigned ID for an ad campaign that is generated when a campaign is created.
564
+ * @param limit The number of results, from the current result set, to be returned in a single page.
565
+ * @param negativeKeywordStatus A comma-separated list of negative keyword statuses.
566
+ * @param offset The number of results that will be skipped in the result set.
567
+ */
568
+ getNegativeKeywords({ adGroupIds, campaignIds, limit, negativeKeywordStatus, offset } = {}) {
569
+ return this.get(`/negative_keyword`, {
570
+ params: {
571
+ ad_group_ids: adGroupIds,
572
+ campaign_ids: campaignIds, limit,
573
+ negative_keyword_status: negativeKeywordStatus, offset
574
+ }
575
+ });
576
+ }
577
+ /**
578
+ *
579
+ * @param body A type that defines the fields for the request to create a negative keyword.
580
+ */
581
+ createNegativeKeyword(body) {
582
+ return this.post(`/negative_keyword`, body);
583
+ }
584
+ /**
585
+ *
586
+ * @param negativeKeywordId The unique identifier for the negative keyword.
587
+ */
588
+ getNegativeKeyword(negativeKeywordId) {
589
+ negativeKeywordId = encodeURIComponent(negativeKeywordId);
590
+ return this.get(`/negative_keyword/${negativeKeywordId}`);
591
+ }
592
+ /**
593
+ *
594
+ * @param negativeKeywordId The unique identifier for the negative keyword.
595
+ * @param body A type that defines the fields for the request to update a negative keyword.
596
+ */
597
+ updateNegativeKeyword(negativeKeywordId, body) {
598
+ negativeKeywordId = encodeURIComponent(negativeKeywordId);
599
+ return this.put(`/negative_keyword/${negativeKeywordId}`, body);
600
+ }
341
601
  /**
342
602
  * This call downloads the report as specified by the report_id path parameter.
343
603
  *