ebay-mcp 1.14.0 → 1.14.2

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 (41) hide show
  1. package/README.de.md +5 -0
  2. package/README.es.md +5 -0
  3. package/README.fr.md +5 -0
  4. package/README.ja.md +5 -0
  5. package/README.ko.md +5 -0
  6. package/README.md +1 -0
  7. package/README.pt-BR.md +5 -0
  8. package/README.ru.md +5 -0
  9. package/README.zh-CN.md +5 -0
  10. package/build/api/clientTrading.js +2 -3
  11. package/build/api/listing-management/inventory.js +7 -888
  12. package/build/api/listing-management/items.js +408 -0
  13. package/build/api/listing-management/locations.js +172 -0
  14. package/build/api/listing-management/offers.js +284 -0
  15. package/build/api/listing-management/shared.js +1 -0
  16. package/build/api/marketing-and-promotions/ads.js +621 -0
  17. package/build/api/marketing-and-promotions/campaigns.js +362 -0
  18. package/build/api/marketing-and-promotions/marketing.js +8 -1530
  19. package/build/api/marketing-and-promotions/promotions.js +422 -0
  20. package/build/api/marketing-and-promotions/reports.js +137 -0
  21. package/build/api/marketing-and-promotions/shared.js +4 -0
  22. package/build/{utils → auth}/oauthHelper.js +1 -1
  23. package/build/config/environment.js +56 -0
  24. package/build/schemas/marketing/ads.js +769 -0
  25. package/build/schemas/marketing/campaigns.js +361 -0
  26. package/build/schemas/marketing/common.js +152 -0
  27. package/build/schemas/marketing/jsonSchemas.js +118 -0
  28. package/build/schemas/marketing/marketing.js +10 -2016
  29. package/build/schemas/marketing/promotions.js +480 -0
  30. package/build/schemas/marketing/reports.js +162 -0
  31. package/build/scripts/devSync.js +28 -23
  32. package/build/scripts/diagnostics.js +3 -3
  33. package/build/scripts/interactiveSetup.js +4 -4
  34. package/build/{utils → scripts}/scopeHelper.js +1 -1
  35. package/build/{utils → scripts}/securityChecker.js +1 -1
  36. package/build/scripts/setup.js +4 -4
  37. package/build/{utils → scripts}/setupValidator.js +2 -2
  38. package/build/{utils → scripts}/setupWizard.js +1 -1
  39. package/package.json +1 -1
  40. package/build/tools/tool-handlers/types.js +0 -1
  41. /package/build/tools/{definitions/types.js → types.js} +0 -0
@@ -0,0 +1,621 @@
1
+ import { buildEndpointParams, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, } from '../../api/shared/request.js';
2
+ import { MARKETING_BASE_PATH } from './shared.js';
3
+ /** Marketing API — ads methods closed over a shared client. */
4
+ export const createMarketingAdsMethods = (client) => ({
5
+ /**
6
+ * Bulk create ads by inventory reference through the eBay Marketing API.
7
+ *
8
+ * @param input - Path, query, header, and request body values for bulkCreateAdsByInventoryReference.
9
+ * @returns An Effect that succeeds with eBay's generated bulkCreateAdsByInventoryReference response DTO.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const response = await Effect.runPromise(marketingApi.bulkCreateAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
14
+ * ```
15
+ *
16
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkCreateAdsByInventoryReference
17
+ */
18
+ bulkCreateAdsByInventoryReference: (input) => {
19
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_create_ads_by_inventory_reference`;
20
+ return requestPostEffect(client, path, input.request);
21
+ },
22
+ /**
23
+ * Bulk create ads by listing id through the eBay Marketing API.
24
+ *
25
+ * @param input - Path, query, header, and request body values for bulkCreateAdsByListingId.
26
+ * @returns An Effect that succeeds with eBay's generated bulkCreateAdsByListingId response DTO.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const response = await Effect.runPromise(marketingApi.bulkCreateAdsByListingId({ campaignId: 'campaign-1', request: { ... } }));
31
+ * ```
32
+ *
33
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkCreateAdsByListingId
34
+ */
35
+ bulkCreateAdsByListingId: (input) => {
36
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_create_ads_by_listing_id`;
37
+ return requestPostEffect(client, path, input.request);
38
+ },
39
+ /**
40
+ * Bulk delete ads by inventory reference through the eBay Marketing API.
41
+ *
42
+ * @param input - Path, query, header, and request body values for bulkDeleteAdsByInventoryReference.
43
+ * @returns An Effect that succeeds with eBay's generated bulkDeleteAdsByInventoryReference response DTO.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const response = await Effect.runPromise(marketingApi.bulkDeleteAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
48
+ * ```
49
+ *
50
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkDeleteAdsByInventoryReference
51
+ */
52
+ bulkDeleteAdsByInventoryReference: (input) => {
53
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_delete_ads_by_inventory_reference`;
54
+ return requestPostEffect(client, path, input.request);
55
+ },
56
+ /**
57
+ * Bulk delete ads by listing id through the eBay Marketing API.
58
+ *
59
+ * @param input - Path, query, header, and request body values for bulkDeleteAdsByListingId.
60
+ * @returns An Effect that succeeds with eBay's generated bulkDeleteAdsByListingId response DTO.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const response = await Effect.runPromise(marketingApi.bulkDeleteAdsByListingId({ campaignId: 'campaign-1', request: { ... } }));
65
+ * ```
66
+ *
67
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkDeleteAdsByListingId
68
+ */
69
+ bulkDeleteAdsByListingId: (input) => {
70
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_delete_ads_by_listing_id`;
71
+ return requestPostEffect(client, path, input.request);
72
+ },
73
+ /**
74
+ * Bulk update ads bid by inventory reference through the eBay Marketing API.
75
+ *
76
+ * @param input - Path, query, header, and request body values for bulkUpdateAdsBidByInventoryReference.
77
+ * @returns An Effect that succeeds with eBay's generated bulkUpdateAdsBidByInventoryReference response DTO.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const response = await Effect.runPromise(marketingApi.bulkUpdateAdsBidByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
82
+ * ```
83
+ *
84
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsBidByInventoryReference
85
+ */
86
+ bulkUpdateAdsBidByInventoryReference: (input) => {
87
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_bid_by_inventory_reference`;
88
+ return requestPostEffect(client, path, input.request);
89
+ },
90
+ /**
91
+ * Bulk update ads bid by listing id through the eBay Marketing API.
92
+ *
93
+ * @param input - Path, query, header, and request body values for bulkUpdateAdsBidByListingId.
94
+ * @returns An Effect that succeeds with eBay's generated bulkUpdateAdsBidByListingId response DTO.
95
+ *
96
+ * @example
97
+ * ```ts
98
+ * const response = await Effect.runPromise(marketingApi.bulkUpdateAdsBidByListingId({ campaignId: 'campaign-1', request: { ... } }));
99
+ * ```
100
+ *
101
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsBidByListingId
102
+ */
103
+ bulkUpdateAdsBidByListingId: (input) => {
104
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_bid_by_listing_id`;
105
+ return requestPostEffect(client, path, input.request);
106
+ },
107
+ /**
108
+ * Bulk update ads status through the eBay Marketing API.
109
+ *
110
+ * @param input - Path, query, header, and request body values for bulkUpdateAdsStatus.
111
+ * @returns An Effect that succeeds with eBay's generated bulkUpdateAdsStatus response DTO.
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * const response = await Effect.runPromise(marketingApi.bulkUpdateAdsStatus({ campaignId: 'campaign-1', request: { ... } }));
116
+ * ```
117
+ *
118
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsStatus
119
+ */
120
+ bulkUpdateAdsStatus: (input) => {
121
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_status`;
122
+ return requestPostEffect(client, path, input.request);
123
+ },
124
+ /**
125
+ * Bulk update ads status by listing id through the eBay Marketing API.
126
+ *
127
+ * @param input - Path, query, header, and request body values for bulkUpdateAdsStatusByListingId.
128
+ * @returns An Effect that succeeds with eBay's generated bulkUpdateAdsStatusByListingId response DTO.
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * const response = await Effect.runPromise(marketingApi.bulkUpdateAdsStatusByListingId({ campaignId: 'campaign-1', request: { ... } }));
133
+ * ```
134
+ *
135
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/bulkUpdateAdsStatusByListingId
136
+ */
137
+ bulkUpdateAdsStatusByListingId: (input) => {
138
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_ads_status_by_listing_id`;
139
+ return requestPostEffect(client, path, input.request);
140
+ },
141
+ /**
142
+ * Get ads through the eBay Marketing API.
143
+ *
144
+ * @param input - Path, query, header, and request body values for getAds.
145
+ * @returns An Effect that succeeds with eBay's generated getAds response DTO.
146
+ *
147
+ * @example
148
+ * ```ts
149
+ * const response = await Effect.runPromise(marketingApi.getAds({ campaignId: 'campaign-1' }));
150
+ * ```
151
+ *
152
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/getAds
153
+ */
154
+ getAds: (input) => {
155
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad`;
156
+ const params = buildEndpointParams({
157
+ adGroupIds: { wireName: 'ad_group_ids', value: input.adGroupIds },
158
+ adStatus: { wireName: 'ad_status', value: input.adStatus },
159
+ limit: { wireName: 'limit', value: input.limit },
160
+ listingIds: { wireName: 'listing_ids', value: input.listingIds },
161
+ offset: { wireName: 'offset', value: input.offset },
162
+ });
163
+ return requestGetEffect(client, path, params);
164
+ },
165
+ /**
166
+ * Create ad by listing id through the eBay Marketing API.
167
+ *
168
+ * @param input - Path, query, header, and request body values for createAdByListingId.
169
+ * @returns An Effect that succeeds with eBay's generated createAdByListingId response DTO.
170
+ *
171
+ * @example
172
+ * ```ts
173
+ * const response = await Effect.runPromise(marketingApi.createAdByListingId({ campaignId: 'campaign-1', request: { ... } }));
174
+ * ```
175
+ *
176
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/createAdByListingId
177
+ */
178
+ createAdByListingId: (input) => {
179
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad`;
180
+ return requestPostEffect(client, path, input.request);
181
+ },
182
+ /**
183
+ * Create ads by inventory reference through the eBay Marketing API.
184
+ *
185
+ * @param input - Path, query, header, and request body values for createAdsByInventoryReference.
186
+ * @returns An Effect that succeeds with eBay's generated createAdsByInventoryReference response DTO.
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * const response = await Effect.runPromise(marketingApi.createAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
191
+ * ```
192
+ *
193
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/createAdsByInventoryReference
194
+ */
195
+ createAdsByInventoryReference: (input) => {
196
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/create_ads_by_inventory_reference`;
197
+ return requestPostEffect(client, path, input.request);
198
+ },
199
+ /**
200
+ * Get ad through the eBay Marketing API.
201
+ *
202
+ * @param input - Path, query, header, and request body values for getAd.
203
+ * @returns An Effect that succeeds with eBay's generated getAd response DTO.
204
+ *
205
+ * @example
206
+ * ```ts
207
+ * const response = await Effect.runPromise(marketingApi.getAd({ adId: 'ad-1', campaignId: 'campaign-1' }));
208
+ * ```
209
+ *
210
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/getAd
211
+ */
212
+ getAd: (input) => {
213
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad/${input.adId}`;
214
+ return requestGetEffect(client, path);
215
+ },
216
+ /**
217
+ * Delete ad through the eBay Marketing API.
218
+ *
219
+ * @param input - Path, query, header, and request body values for deleteAd.
220
+ * @returns An Effect that succeeds with eBay's generated deleteAd response DTO.
221
+ *
222
+ * @example
223
+ * ```ts
224
+ * const response = await Effect.runPromise(marketingApi.deleteAd({ adId: 'ad-1', campaignId: 'campaign-1' }));
225
+ * ```
226
+ *
227
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/deleteAd
228
+ */
229
+ deleteAd: (input) => {
230
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad/${input.adId}`;
231
+ return requestDeleteEffect(client, path);
232
+ },
233
+ /**
234
+ * Delete ads by inventory reference through the eBay Marketing API.
235
+ *
236
+ * @param input - Path, query, header, and request body values for deleteAdsByInventoryReference.
237
+ * @returns An Effect that succeeds with eBay's generated deleteAdsByInventoryReference response DTO.
238
+ *
239
+ * @example
240
+ * ```ts
241
+ * const response = await Effect.runPromise(marketingApi.deleteAdsByInventoryReference({ campaignId: 'campaign-1', request: { ... } }));
242
+ * ```
243
+ *
244
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/deleteAdsByInventoryReference
245
+ */
246
+ deleteAdsByInventoryReference: (input) => {
247
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/delete_ads_by_inventory_reference`;
248
+ return requestPostEffect(client, path, input.request);
249
+ },
250
+ /**
251
+ * Get ads by inventory reference through the eBay Marketing API.
252
+ *
253
+ * @param input - Path, query, header, and request body values for getAdsByInventoryReference.
254
+ * @returns An Effect that succeeds with eBay's generated getAdsByInventoryReference response DTO.
255
+ *
256
+ * @example
257
+ * ```ts
258
+ * const response = await Effect.runPromise(marketingApi.getAdsByInventoryReference({ campaignId: 'campaign-1', inventoryReferenceId: 'inventoryReference-1', inventoryReferenceType: 'inventoryReferenceType-1' }));
259
+ * ```
260
+ *
261
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/getAdsByInventoryReference
262
+ */
263
+ getAdsByInventoryReference: (input) => {
264
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/get_ads_by_inventory_reference`;
265
+ const params = buildEndpointParams({
266
+ inventoryReferenceId: {
267
+ wireName: 'inventory_reference_id',
268
+ value: input.inventoryReferenceId,
269
+ },
270
+ inventoryReferenceType: {
271
+ wireName: 'inventory_reference_type',
272
+ value: input.inventoryReferenceType,
273
+ },
274
+ });
275
+ return requestGetEffect(client, path, params);
276
+ },
277
+ /**
278
+ * Update bid through the eBay Marketing API.
279
+ *
280
+ * @param input - Path, query, header, and request body values for updateBid.
281
+ * @returns An Effect that succeeds with eBay's generated updateBid response DTO.
282
+ *
283
+ * @example
284
+ * ```ts
285
+ * const response = await Effect.runPromise(marketingApi.updateBid({ adId: 'ad-1', campaignId: 'campaign-1', request: { ... } }));
286
+ * ```
287
+ *
288
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad/methods/updateBid
289
+ */
290
+ updateBid: (input) => {
291
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad/${input.adId}/update_bid`;
292
+ return requestPostEffect(client, path, input.request);
293
+ },
294
+ /**
295
+ * Get ad groups through the eBay Marketing API.
296
+ *
297
+ * @param input - Path, query, header, and request body values for getAdGroups.
298
+ * @returns An Effect that succeeds with eBay's generated getAdGroups response DTO.
299
+ *
300
+ * @example
301
+ * ```ts
302
+ * const response = await Effect.runPromise(marketingApi.getAdGroups({ campaignId: 'campaign-1' }));
303
+ * ```
304
+ *
305
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/getAdGroups
306
+ */
307
+ getAdGroups: (input) => {
308
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group`;
309
+ const params = buildEndpointParams({
310
+ adGroupStatus: { wireName: 'ad_group_status', value: input.adGroupStatus },
311
+ limit: { wireName: 'limit', value: input.limit },
312
+ offset: { wireName: 'offset', value: input.offset },
313
+ });
314
+ return requestGetEffect(client, path, params);
315
+ },
316
+ /**
317
+ * Create ad group through the eBay Marketing API.
318
+ *
319
+ * @param input - Path, query, header, and request body values for createAdGroup.
320
+ * @returns An Effect that succeeds with eBay's generated createAdGroup response DTO.
321
+ *
322
+ * @example
323
+ * ```ts
324
+ * const response = await Effect.runPromise(marketingApi.createAdGroup({ campaignId: 'campaign-1', request: { ... } }));
325
+ * ```
326
+ *
327
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/createAdGroup
328
+ */
329
+ createAdGroup: (input) => {
330
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group`;
331
+ return requestPostEffect(client, path, input.request);
332
+ },
333
+ /**
334
+ * Get ad group through the eBay Marketing API.
335
+ *
336
+ * @param input - Path, query, header, and request body values for getAdGroup.
337
+ * @returns An Effect that succeeds with eBay's generated getAdGroup response DTO.
338
+ *
339
+ * @example
340
+ * ```ts
341
+ * const response = await Effect.runPromise(marketingApi.getAdGroup({ adGroupId: 'adGroup-1', campaignId: 'campaign-1' }));
342
+ * ```
343
+ *
344
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/getAdGroup
345
+ */
346
+ getAdGroup: (input) => {
347
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}`;
348
+ return requestGetEffect(client, path);
349
+ },
350
+ /**
351
+ * Update ad group through the eBay Marketing API.
352
+ *
353
+ * @param input - Path, query, header, and request body values for updateAdGroup.
354
+ * @returns An Effect that succeeds with eBay's generated updateAdGroup response DTO.
355
+ *
356
+ * @example
357
+ * ```ts
358
+ * const response = await Effect.runPromise(marketingApi.updateAdGroup({ adGroupId: 'adGroup-1', campaignId: 'campaign-1', request: { ... } }));
359
+ * ```
360
+ *
361
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/updateAdGroup
362
+ */
363
+ updateAdGroup: (input) => {
364
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}`;
365
+ return requestPutEffect(client, path, input.request);
366
+ },
367
+ /**
368
+ * Suggest bids through the eBay Marketing API.
369
+ *
370
+ * @param input - Path, query, header, and request body values for suggestBids.
371
+ * @returns An Effect that succeeds with eBay's generated suggestBids response DTO.
372
+ *
373
+ * @example
374
+ * ```ts
375
+ * const response = await Effect.runPromise(marketingApi.suggestBids({ adGroupId: 'adGroup-1', campaignId: 'campaign-1', request: { ... } }));
376
+ * ```
377
+ *
378
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/suggestBids
379
+ */
380
+ suggestBids: (input) => {
381
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}/suggest_bids`;
382
+ return requestPostEffect(client, path, input.request);
383
+ },
384
+ /**
385
+ * Suggest keywords through the eBay Marketing API.
386
+ *
387
+ * @param input - Path, query, header, and request body values for suggestKeywords.
388
+ * @returns An Effect that succeeds with eBay's generated suggestKeywords response DTO.
389
+ *
390
+ * @example
391
+ * ```ts
392
+ * const response = await Effect.runPromise(marketingApi.suggestKeywords({ adGroupId: 'adGroup-1', campaignId: 'campaign-1', request: { ... } }));
393
+ * ```
394
+ *
395
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_group/methods/suggestKeywords
396
+ */
397
+ suggestKeywords: (input) => {
398
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/ad_group/${input.adGroupId}/suggest_keywords`;
399
+ return requestPostEffect(client, path, input.request);
400
+ },
401
+ /**
402
+ * Bulk create keyword through the eBay Marketing API.
403
+ *
404
+ * @param input - Path, query, header, and request body values for bulkCreateKeyword.
405
+ * @returns An Effect that succeeds with eBay's generated bulkCreateKeyword response DTO.
406
+ *
407
+ * @example
408
+ * ```ts
409
+ * const response = await Effect.runPromise(marketingApi.bulkCreateKeyword({ campaignId: 'campaign-1', request: { ... } }));
410
+ * ```
411
+ *
412
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/bulkCreateKeyword
413
+ */
414
+ bulkCreateKeyword: (input) => {
415
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_create_keyword`;
416
+ return requestPostEffect(client, path, input.request);
417
+ },
418
+ /**
419
+ * Bulk update keyword through the eBay Marketing API.
420
+ *
421
+ * @param input - Path, query, header, and request body values for bulkUpdateKeyword.
422
+ * @returns An Effect that succeeds with eBay's generated bulkUpdateKeyword response DTO.
423
+ *
424
+ * @example
425
+ * ```ts
426
+ * const response = await Effect.runPromise(marketingApi.bulkUpdateKeyword({ campaignId: 'campaign-1', request: { ... } }));
427
+ * ```
428
+ *
429
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/bulkUpdateKeyword
430
+ */
431
+ bulkUpdateKeyword: (input) => {
432
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/bulk_update_keyword`;
433
+ return requestPostEffect(client, path, input.request);
434
+ },
435
+ /**
436
+ * Get keywords through the eBay Marketing API.
437
+ *
438
+ * @param input - Path, query, header, and request body values for getKeywords.
439
+ * @returns An Effect that succeeds with eBay's generated getKeywords response DTO.
440
+ *
441
+ * @example
442
+ * ```ts
443
+ * const response = await Effect.runPromise(marketingApi.getKeywords({ campaignId: 'campaign-1' }));
444
+ * ```
445
+ *
446
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/getKeywords
447
+ */
448
+ getKeywords: (input) => {
449
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword`;
450
+ const params = buildEndpointParams({
451
+ adGroupIds: { wireName: 'ad_group_ids', value: input.adGroupIds },
452
+ keywordStatus: { wireName: 'keyword_status', value: input.keywordStatus },
453
+ limit: { wireName: 'limit', value: input.limit },
454
+ offset: { wireName: 'offset', value: input.offset },
455
+ });
456
+ return requestGetEffect(client, path, params);
457
+ },
458
+ /**
459
+ * Create keyword through the eBay Marketing API.
460
+ *
461
+ * @param input - Path, query, header, and request body values for createKeyword.
462
+ * @returns An Effect that succeeds with eBay's generated createKeyword response DTO.
463
+ *
464
+ * @example
465
+ * ```ts
466
+ * const response = await Effect.runPromise(marketingApi.createKeyword({ campaignId: 'campaign-1', request: { ... } }));
467
+ * ```
468
+ *
469
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/createKeyword
470
+ */
471
+ createKeyword: (input) => {
472
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword`;
473
+ return requestPostEffect(client, path, input.request);
474
+ },
475
+ /**
476
+ * Get keyword through the eBay Marketing API.
477
+ *
478
+ * @param input - Path, query, header, and request body values for getKeyword.
479
+ * @returns An Effect that succeeds with eBay's generated getKeyword response DTO.
480
+ *
481
+ * @example
482
+ * ```ts
483
+ * const response = await Effect.runPromise(marketingApi.getKeyword({ campaignId: 'campaign-1', keywordId: 'keyword-1' }));
484
+ * ```
485
+ *
486
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/getKeyword
487
+ */
488
+ getKeyword: (input) => {
489
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword/${input.keywordId}`;
490
+ return requestGetEffect(client, path);
491
+ },
492
+ /**
493
+ * Update keyword through the eBay Marketing API.
494
+ *
495
+ * @param input - Path, query, header, and request body values for updateKeyword.
496
+ * @returns An Effect that succeeds with eBay's generated updateKeyword response DTO.
497
+ *
498
+ * @example
499
+ * ```ts
500
+ * const response = await Effect.runPromise(marketingApi.updateKeyword({ campaignId: 'campaign-1', keywordId: 'keyword-1', request: { ... } }));
501
+ * ```
502
+ *
503
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/keyword/methods/updateKeyword
504
+ */
505
+ updateKeyword: (input) => {
506
+ const path = `${MARKETING_BASE_PATH}/ad_campaign/${input.campaignId}/keyword/${input.keywordId}`;
507
+ return requestPutEffect(client, path, input.request);
508
+ },
509
+ /**
510
+ * Bulk create negative keyword through the eBay Marketing API.
511
+ *
512
+ * @param input - Path, query, header, and request body values for bulkCreateNegativeKeyword.
513
+ * @returns An Effect that succeeds with eBay's generated bulkCreateNegativeKeyword response DTO.
514
+ *
515
+ * @example
516
+ * ```ts
517
+ * const response = await Effect.runPromise(marketingApi.bulkCreateNegativeKeyword({ request: { ... } }));
518
+ * ```
519
+ *
520
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/bulkCreateNegativeKeyword
521
+ */
522
+ bulkCreateNegativeKeyword: (input) => {
523
+ const path = `${MARKETING_BASE_PATH}/bulk_create_negative_keyword`;
524
+ return requestPostEffect(client, path, input.request);
525
+ },
526
+ /**
527
+ * Bulk update negative keyword through the eBay Marketing API.
528
+ *
529
+ * @param input - Path, query, header, and request body values for bulkUpdateNegativeKeyword.
530
+ * @returns An Effect that succeeds with eBay's generated bulkUpdateNegativeKeyword response DTO.
531
+ *
532
+ * @example
533
+ * ```ts
534
+ * const response = await Effect.runPromise(marketingApi.bulkUpdateNegativeKeyword({ request: { ... } }));
535
+ * ```
536
+ *
537
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/bulkUpdateNegativeKeyword
538
+ */
539
+ bulkUpdateNegativeKeyword: (input) => {
540
+ const path = `${MARKETING_BASE_PATH}/bulk_update_negative_keyword`;
541
+ return requestPostEffect(client, path, input.request);
542
+ },
543
+ /**
544
+ * Get negative keywords through the eBay Marketing API.
545
+ *
546
+ * @param input - Path, query, header, and request body values for getNegativeKeywords.
547
+ * @returns An Effect that succeeds with eBay's generated getNegativeKeywords response DTO.
548
+ *
549
+ * @example
550
+ * ```ts
551
+ * const response = await Effect.runPromise(marketingApi.getNegativeKeywords());
552
+ * ```
553
+ *
554
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/getNegativeKeywords
555
+ */
556
+ getNegativeKeywords: (input = {}) => {
557
+ const path = `${MARKETING_BASE_PATH}/negative_keyword`;
558
+ const params = buildEndpointParams({
559
+ adGroupIds: { wireName: 'ad_group_ids', value: input.adGroupIds },
560
+ campaignIds: { wireName: 'campaign_ids', value: input.campaignIds },
561
+ limit: { wireName: 'limit', value: input.limit },
562
+ negativeKeywordStatus: {
563
+ wireName: 'negative_keyword_status',
564
+ value: input.negativeKeywordStatus,
565
+ },
566
+ offset: { wireName: 'offset', value: input.offset },
567
+ });
568
+ return requestGetEffect(client, path, params);
569
+ },
570
+ /**
571
+ * Create negative keyword through the eBay Marketing API.
572
+ *
573
+ * @param input - Path, query, header, and request body values for createNegativeKeyword.
574
+ * @returns An Effect that succeeds with eBay's generated createNegativeKeyword response DTO.
575
+ *
576
+ * @example
577
+ * ```ts
578
+ * const response = await Effect.runPromise(marketingApi.createNegativeKeyword({ request: { ... } }));
579
+ * ```
580
+ *
581
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/createNegativeKeyword
582
+ */
583
+ createNegativeKeyword: (input) => {
584
+ const path = `${MARKETING_BASE_PATH}/negative_keyword`;
585
+ return requestPostEffect(client, path, input.request);
586
+ },
587
+ /**
588
+ * Get negative keyword through the eBay Marketing API.
589
+ *
590
+ * @param input - Path, query, header, and request body values for getNegativeKeyword.
591
+ * @returns An Effect that succeeds with eBay's generated getNegativeKeyword response DTO.
592
+ *
593
+ * @example
594
+ * ```ts
595
+ * const response = await Effect.runPromise(marketingApi.getNegativeKeyword({ negativeKeywordId: 'negativeKeyword-1' }));
596
+ * ```
597
+ *
598
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/getNegativeKeyword
599
+ */
600
+ getNegativeKeyword: (input) => {
601
+ const path = `${MARKETING_BASE_PATH}/negative_keyword/${input.negativeKeywordId}`;
602
+ return requestGetEffect(client, path);
603
+ },
604
+ /**
605
+ * Update negative keyword through the eBay Marketing API.
606
+ *
607
+ * @param input - Path, query, header, and request body values for updateNegativeKeyword.
608
+ * @returns An Effect that succeeds with eBay's generated updateNegativeKeyword response DTO.
609
+ *
610
+ * @example
611
+ * ```ts
612
+ * const response = await Effect.runPromise(marketingApi.updateNegativeKeyword({ negativeKeywordId: 'negativeKeyword-1', request: { ... } }));
613
+ * ```
614
+ *
615
+ * @see https://developer.ebay.com/api-docs/sell/marketing/resources/negative_keyword/methods/updateNegativeKeyword
616
+ */
617
+ updateNegativeKeyword: (input) => {
618
+ const path = `${MARKETING_BASE_PATH}/negative_keyword/${input.negativeKeywordId}`;
619
+ return requestPutEffect(client, path, input.request);
620
+ },
621
+ });