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,769 @@
1
+ /**
2
+ * Marketing API schemas — ads slice.
3
+ *
4
+ * Effect-backed schemas for Marketing endpoints. The barrel `marketing.ts` re-exports all slices.
5
+ */
6
+ import { z } from '../../utils/effectSchema.js';
7
+ import { errorSchema, amountSchema, alertSchema, marketingInventoryItemSchema } from './common.js';
8
+ import { updateBidPercentageRequestSchema } from './campaigns.js';
9
+ // ============================================================================
10
+ // Ad Group Management Schemas
11
+ // ============================================================================
12
+ /**
13
+ * Validates the Marketing API ad group model.
14
+ */
15
+ export const adGroupSchema = z.object({
16
+ adGroupId: z.string().optional(),
17
+ adGroupStatus: z.string().optional(),
18
+ defaultBid: amountSchema.optional(),
19
+ name: z.string().optional(),
20
+ });
21
+ /**
22
+ * Validates the Marketing API create ad group request model.
23
+ */
24
+ export const createAdGroupRequestSchema = z.object({
25
+ defaultBid: amountSchema.optional(),
26
+ name: z.string(),
27
+ });
28
+ /**
29
+ * Validates the Marketing API update ad group request model.
30
+ */
31
+ export const updateAdGroupRequestSchema = z.object({
32
+ adGroupStatus: z.string().optional(),
33
+ defaultBid: amountSchema.optional(),
34
+ name: z.string().optional(),
35
+ });
36
+ /**
37
+ * Validates the Marketing API ad group paged collection response payload.
38
+ */
39
+ export const adGroupPagedCollectionResponseSchema = z.object({
40
+ adGroups: z.array(adGroupSchema).optional(),
41
+ href: z.string().optional(),
42
+ limit: z.number().optional(),
43
+ next: z.string().optional(),
44
+ offset: z.number().optional(),
45
+ prev: z.string().optional(),
46
+ total: z.number().optional(),
47
+ });
48
+ // ============================================================================
49
+ // Ad Operations Schemas
50
+ // ============================================================================
51
+ /**
52
+ * Validates the Marketing API ad model.
53
+ */
54
+ export const adSchema = z.object({
55
+ adGroupId: z.string().optional(),
56
+ adId: z.string().optional(),
57
+ adStatus: z.string().optional(),
58
+ alerts: z.array(alertSchema).optional(),
59
+ bidPercentage: z.string().optional(),
60
+ inventoryReferenceId: z.string().optional(),
61
+ inventoryReferenceType: z.string().optional(),
62
+ listingId: z.string().optional(),
63
+ });
64
+ /**
65
+ * Validates the Marketing API create ad request model.
66
+ */
67
+ export const createAdRequestSchema = z.object({
68
+ adGroupId: z.string().optional(),
69
+ bidPercentage: z.string().optional(),
70
+ listingId: z.string().optional(),
71
+ });
72
+ /**
73
+ * Validates the Marketing API ads model.
74
+ */
75
+ export const adsSchema = z.object({
76
+ ads: z.array(createAdRequestSchema).optional(),
77
+ });
78
+ /**
79
+ * Validates the Marketing API create ads by inventory reference request model.
80
+ */
81
+ export const createAdsByInventoryReferenceRequestSchema = z.object({
82
+ bidPercentage: z.string().optional(),
83
+ inventoryReferenceId: z.string().optional(),
84
+ inventoryReferenceType: z.string().optional(),
85
+ });
86
+ /**
87
+ * Validates the Marketing API ad reference model.
88
+ */
89
+ export const adReferenceSchema = z.object({
90
+ adId: z.string().optional(),
91
+ href: z.string().optional(),
92
+ });
93
+ /**
94
+ * Validates the Marketing API ad references model.
95
+ */
96
+ export const adReferencesSchema = z.object({
97
+ ads: z.array(adReferenceSchema).optional(),
98
+ });
99
+ /**
100
+ * Validates the Marketing API ad response payload.
101
+ */
102
+ export const adResponseSchema = z.object({
103
+ adGroupId: z.string().optional(),
104
+ adId: z.string().optional(),
105
+ errors: z.array(errorSchema).optional(),
106
+ href: z.string().optional(),
107
+ listingId: z.string().optional(),
108
+ statusCode: z.number().optional(),
109
+ warnings: z.array(errorSchema).optional(),
110
+ });
111
+ /**
112
+ * Validates the Marketing API create ads by inventory reference response payload.
113
+ */
114
+ export const createAdsByInventoryReferenceResponseSchema = z.object({
115
+ ads: z.array(adResponseSchema).optional(),
116
+ errors: z.array(errorSchema).optional(),
117
+ inventoryReferenceId: z.string().optional(),
118
+ inventoryReferenceType: z.string().optional(),
119
+ statusCode: z.number().optional(),
120
+ warnings: z.array(errorSchema).optional(),
121
+ });
122
+ /**
123
+ * Validates the Marketing API ad paged collection response payload.
124
+ */
125
+ export const adPagedCollectionResponseSchema = z.object({
126
+ ads: z.array(adSchema).optional(),
127
+ href: z.string().optional(),
128
+ limit: z.number().optional(),
129
+ next: z.string().optional(),
130
+ offset: z.number().optional(),
131
+ prev: z.string().optional(),
132
+ total: z.number().optional(),
133
+ });
134
+ // Ad Update Schemas
135
+ /**
136
+ * Validates the Marketing API update ad status request model.
137
+ */
138
+ export const updateAdStatusRequestSchema = z.object({
139
+ adStatus: z.string(),
140
+ });
141
+ /**
142
+ * Validates the Marketing API update ad status by listing ID request model.
143
+ */
144
+ export const updateAdStatusByListingIdRequestSchema = z.object({
145
+ adStatus: z.string(),
146
+ listingId: z.string(),
147
+ });
148
+ /**
149
+ * Validates the Marketing API ad update status response payload.
150
+ */
151
+ export const adUpdateStatusResponseSchema = z.object({
152
+ adId: z.string().optional(),
153
+ errors: z.array(errorSchema).optional(),
154
+ href: z.string().optional(),
155
+ statusCode: z.number().optional(),
156
+ });
157
+ /**
158
+ * Validates the Marketing API ad update status by listing ID response payload.
159
+ */
160
+ export const adUpdateStatusByListingIdResponseSchema = z.object({
161
+ errors: z.array(errorSchema).optional(),
162
+ href: z.string().optional(),
163
+ listingId: z.string().optional(),
164
+ statusCode: z.number().optional(),
165
+ });
166
+ /**
167
+ * Validates the Marketing API ad update response payload.
168
+ */
169
+ export const adUpdateResponseSchema = z.object({
170
+ ads: z.array(adUpdateStatusResponseSchema).optional(),
171
+ });
172
+ // Bulk Ad Operations
173
+ /**
174
+ * Validates the Marketing API bulk create ad request model.
175
+ */
176
+ export const bulkCreateAdRequestSchema = z.object({
177
+ requests: z.array(createAdRequestSchema).optional(),
178
+ });
179
+ /**
180
+ * Validates the Marketing API bulk ad response payload.
181
+ */
182
+ export const bulkAdResponseSchema = z.object({
183
+ responses: z.array(adResponseSchema).optional(),
184
+ });
185
+ /**
186
+ * Validates the Marketing API bulk create ads by inventory reference request model.
187
+ */
188
+ export const bulkCreateAdsByInventoryReferenceRequestSchema = z.object({
189
+ requests: z.array(createAdsByInventoryReferenceRequestSchema).optional(),
190
+ });
191
+ /**
192
+ * Validates the Marketing API bulk create ads by inventory reference response payload.
193
+ */
194
+ export const bulkCreateAdsByInventoryReferenceResponseSchema = z.object({
195
+ responses: z.array(createAdsByInventoryReferenceResponseSchema).optional(),
196
+ });
197
+ /**
198
+ * Validates the Marketing API bulk update ad status request model.
199
+ */
200
+ export const bulkUpdateAdStatusRequestSchema = z.object({
201
+ requests: z.array(updateAdStatusRequestSchema).optional(),
202
+ });
203
+ /**
204
+ * Validates the Marketing API bulk update ad status by listing ID request model.
205
+ */
206
+ export const bulkUpdateAdStatusByListingIdRequestSchema = z.object({
207
+ requests: z.array(updateAdStatusByListingIdRequestSchema).optional(),
208
+ });
209
+ /**
210
+ * Validates the Marketing API bulk ad update status response payload.
211
+ */
212
+ export const bulkAdUpdateStatusResponseSchema = z.object({
213
+ responses: z.array(adUpdateStatusResponseSchema).optional(),
214
+ });
215
+ /**
216
+ * Validates the Marketing API bulk ad update status by listing ID response payload.
217
+ */
218
+ export const bulkAdUpdateStatusByListingIdResponseSchema = z.object({
219
+ responses: z.array(adUpdateStatusByListingIdResponseSchema).optional(),
220
+ });
221
+ /**
222
+ * Validates the Marketing API bulk ad update response payload.
223
+ */
224
+ export const bulkAdUpdateResponseSchema = z.object({
225
+ responses: z.array(adUpdateResponseSchema).optional(),
226
+ });
227
+ // Delete Ad Schemas
228
+ /**
229
+ * Validates the Marketing API ad IDs model.
230
+ */
231
+ export const adIdsSchema = z.object({
232
+ adIds: z.array(z.string()).optional(),
233
+ });
234
+ /**
235
+ * Validates the Marketing API delete ad request model.
236
+ */
237
+ export const deleteAdRequestSchema = z.object({
238
+ adId: z.string().optional(),
239
+ });
240
+ /**
241
+ * Validates the Marketing API delete ad response payload.
242
+ */
243
+ export const deleteAdResponseSchema = z.object({
244
+ adId: z.string().optional(),
245
+ errors: z.array(errorSchema).optional(),
246
+ listingId: z.string().optional(),
247
+ statusCode: z.number().optional(),
248
+ });
249
+ /**
250
+ * Validates the Marketing API bulk delete ad request model.
251
+ */
252
+ export const bulkDeleteAdRequestSchema = z.object({
253
+ requests: z.array(deleteAdRequestSchema).optional(),
254
+ });
255
+ /**
256
+ * Validates the Marketing API bulk delete ad response payload.
257
+ */
258
+ export const bulkDeleteAdResponseSchema = z.object({
259
+ responses: z.array(deleteAdResponseSchema).optional(),
260
+ });
261
+ /**
262
+ * Validates the Marketing API delete ads by inventory reference request model.
263
+ */
264
+ export const deleteAdsByInventoryReferenceRequestSchema = z.object({
265
+ inventoryReferenceId: z.string().optional(),
266
+ inventoryReferenceType: z.string().optional(),
267
+ });
268
+ /**
269
+ * Validates the Marketing API delete ads by inventory reference response payload.
270
+ */
271
+ export const deleteAdsByInventoryReferenceResponseSchema = z.object({
272
+ ads: z.array(deleteAdResponseSchema).optional(),
273
+ errors: z.array(errorSchema).optional(),
274
+ inventoryReferenceId: z.string().optional(),
275
+ inventoryReferenceType: z.string().optional(),
276
+ statusCode: z.number().optional(),
277
+ });
278
+ /**
279
+ * Validates the Marketing API bulk delete ads by inventory reference request model.
280
+ */
281
+ export const bulkDeleteAdsByInventoryReferenceRequestSchema = z.object({
282
+ requests: z.array(deleteAdsByInventoryReferenceRequestSchema).optional(),
283
+ });
284
+ /**
285
+ * Validates the Marketing API bulk delete ads by inventory reference response payload.
286
+ */
287
+ export const bulkDeleteAdsByInventoryReferenceResponseSchema = z.object({
288
+ responses: z.array(deleteAdsByInventoryReferenceResponseSchema).optional(),
289
+ });
290
+ /**
291
+ * Validates the Marketing API update ads by inventory reference response payload.
292
+ */
293
+ export const updateAdsByInventoryReferenceResponseSchema = z.object({
294
+ ads: z.array(adUpdateStatusResponseSchema).optional(),
295
+ errors: z.array(errorSchema).optional(),
296
+ inventoryReferenceId: z.string().optional(),
297
+ inventoryReferenceType: z.string().optional(),
298
+ statusCode: z.number().optional(),
299
+ });
300
+ /**
301
+ * Validates the Marketing API bulk update ads by inventory reference response payload.
302
+ */
303
+ export const bulkUpdateAdsByInventoryReferenceResponseSchema = z.object({
304
+ responses: z.array(updateAdsByInventoryReferenceResponseSchema).optional(),
305
+ });
306
+ // ============================================================================
307
+ // Keyword Management Schemas
308
+ // ============================================================================
309
+ /**
310
+ * Validates the Marketing API keyword model.
311
+ */
312
+ export const keywordSchema = z.object({
313
+ adGroupId: z.string().optional(),
314
+ bid: amountSchema.optional(),
315
+ keywordId: z.string().optional(),
316
+ keywordStatus: z.string().optional(),
317
+ keywordText: z.string().optional(),
318
+ matchType: z.string().optional(),
319
+ });
320
+ /**
321
+ * Validates the Marketing API keyword request model.
322
+ */
323
+ export const keywordRequestSchema = z.object({
324
+ keywordText: z.string().optional(),
325
+ matchType: z.string().optional(),
326
+ });
327
+ /**
328
+ * Validates the Marketing API create keyword request model.
329
+ */
330
+ export const createKeywordRequestSchema = z.object({
331
+ adGroupId: z.string(),
332
+ bid: amountSchema.optional(),
333
+ keywordText: z.string(),
334
+ matchType: z.string(),
335
+ });
336
+ /**
337
+ * Validates the Marketing API keyword response payload.
338
+ */
339
+ export const keywordResponseSchema = z.object({
340
+ adGroupId: z.string().optional(),
341
+ errors: z.array(errorSchema).optional(),
342
+ href: z.string().optional(),
343
+ keywordId: z.string().optional(),
344
+ keywordText: z.string().optional(),
345
+ matchType: z.string().optional(),
346
+ statusCode: z.number().optional(),
347
+ warnings: z.array(errorSchema).optional(),
348
+ });
349
+ /**
350
+ * Validates the Marketing API update keyword request model.
351
+ */
352
+ export const updateKeywordRequestSchema = z.object({
353
+ bid: amountSchema.optional(),
354
+ keywordStatus: z.string().optional(),
355
+ });
356
+ /**
357
+ * Validates the Marketing API update keyword by keyword ID request model.
358
+ */
359
+ export const updateKeywordByKeywordIdRequestSchema = z.object({
360
+ bid: amountSchema.optional(),
361
+ keywordStatus: z.string().optional(),
362
+ });
363
+ /**
364
+ * Validates the Marketing API update keyword response payload.
365
+ */
366
+ export const updateKeywordResponseSchema = z.object({
367
+ errors: z.array(errorSchema).optional(),
368
+ href: z.string().optional(),
369
+ keywordId: z.string().optional(),
370
+ statusCode: z.number().optional(),
371
+ warnings: z.array(errorSchema).optional(),
372
+ });
373
+ /**
374
+ * Validates the Marketing API keyword paged collection response payload.
375
+ */
376
+ export const keywordPagedCollectionResponseSchema = z.object({
377
+ href: z.string().optional(),
378
+ keywords: z.array(keywordSchema).optional(),
379
+ limit: z.number().optional(),
380
+ next: z.string().optional(),
381
+ offset: z.number().optional(),
382
+ prev: z.string().optional(),
383
+ total: z.number().optional(),
384
+ });
385
+ // Bulk Keyword Operations
386
+ /**
387
+ * Validates the Marketing API bulk create keyword request model.
388
+ */
389
+ export const bulkCreateKeywordRequestSchema = z.object({
390
+ requests: z.array(createKeywordRequestSchema).optional(),
391
+ });
392
+ /**
393
+ * Validates the Marketing API bulk create keyword response payload.
394
+ */
395
+ export const bulkCreateKeywordResponseSchema = z.object({
396
+ responses: z.array(keywordResponseSchema).optional(),
397
+ });
398
+ /**
399
+ * Validates the Marketing API bulk update keyword request model.
400
+ */
401
+ export const bulkUpdateKeywordRequestSchema = z.object({
402
+ requests: z
403
+ .array(z.object({
404
+ keywordId: z.string(),
405
+ bid: amountSchema.optional(),
406
+ keywordStatus: z.string().optional(),
407
+ }))
408
+ .optional(),
409
+ });
410
+ /**
411
+ * Validates the Marketing API bulk update keyword response payload.
412
+ */
413
+ export const bulkUpdateKeywordResponseSchema = z.object({
414
+ responses: z.array(updateKeywordResponseSchema).optional(),
415
+ });
416
+ // ============================================================================
417
+ // Negative Keyword Management Schemas
418
+ // ============================================================================
419
+ /**
420
+ * Validates the Marketing API negative keyword model.
421
+ */
422
+ export const negativeKeywordSchema = z.object({
423
+ adGroupId: z.string().optional(),
424
+ campaignId: z.string().optional(),
425
+ negativeKeywordId: z.string().optional(),
426
+ negativeKeywordMatchType: z.string().optional(),
427
+ negativeKeywordStatus: z.string().optional(),
428
+ negativeKeywordText: z.string().optional(),
429
+ });
430
+ /**
431
+ * Validates the Marketing API create negative keyword request model.
432
+ */
433
+ export const createNegativeKeywordRequestSchema = z.object({
434
+ adGroupId: z.string().optional(),
435
+ campaignId: z.string().optional(),
436
+ negativeKeywordMatchType: z.string(),
437
+ negativeKeywordText: z.string(),
438
+ });
439
+ /**
440
+ * Validates the Marketing API negative keyword response payload.
441
+ */
442
+ export const negativeKeywordResponseSchema = z.object({
443
+ adGroupId: z.string().optional(),
444
+ campaignId: z.string().optional(),
445
+ errors: z.array(errorSchema).optional(),
446
+ href: z.string().optional(),
447
+ negativeKeywordId: z.string().optional(),
448
+ negativeKeywordMatchType: z.string().optional(),
449
+ negativeKeywordText: z.string().optional(),
450
+ statusCode: z.number().optional(),
451
+ warnings: z.array(errorSchema).optional(),
452
+ });
453
+ /**
454
+ * Validates the Marketing API update negative keyword request model.
455
+ */
456
+ export const updateNegativeKeywordRequestSchema = z.object({
457
+ negativeKeywordStatus: z.string().optional(),
458
+ });
459
+ /**
460
+ * Validates the Marketing API update negative keyword ID request model.
461
+ */
462
+ export const updateNegativeKeywordIdRequestSchema = z.object({
463
+ negativeKeywordStatus: z.string().optional(),
464
+ });
465
+ /**
466
+ * Validates the Marketing API update negative keyword response payload.
467
+ */
468
+ export const updateNegativeKeywordResponseSchema = z.object({
469
+ errors: z.array(errorSchema).optional(),
470
+ href: z.string().optional(),
471
+ negativeKeywordId: z.string().optional(),
472
+ statusCode: z.number().optional(),
473
+ warnings: z.array(errorSchema).optional(),
474
+ });
475
+ /**
476
+ * Validates the Marketing API negative keyword paged collection response payload.
477
+ */
478
+ export const negativeKeywordPagedCollectionResponseSchema = z.object({
479
+ href: z.string().optional(),
480
+ limit: z.number().optional(),
481
+ negativeKeywords: z.array(negativeKeywordSchema).optional(),
482
+ next: z.string().optional(),
483
+ offset: z.number().optional(),
484
+ prev: z.string().optional(),
485
+ total: z.number().optional(),
486
+ });
487
+ // Bulk Negative Keyword Operations
488
+ /**
489
+ * Validates the Marketing API bulk create negative keyword request model.
490
+ */
491
+ export const bulkCreateNegativeKeywordRequestSchema = z.object({
492
+ requests: z.array(createNegativeKeywordRequestSchema).optional(),
493
+ });
494
+ /**
495
+ * Validates the Marketing API bulk create negative keyword response payload.
496
+ */
497
+ export const bulkCreateNegativeKeywordResponseSchema = z.object({
498
+ responses: z.array(negativeKeywordResponseSchema).optional(),
499
+ });
500
+ /**
501
+ * Validates the Marketing API bulk update negative keyword request model.
502
+ */
503
+ export const bulkUpdateNegativeKeywordRequestSchema = z.object({
504
+ requests: z
505
+ .array(z.object({
506
+ negativeKeywordId: z.string(),
507
+ negativeKeywordStatus: z.string().optional(),
508
+ }))
509
+ .optional(),
510
+ });
511
+ /**
512
+ * Validates the Marketing API bulk update negative keyword response payload.
513
+ */
514
+ export const bulkUpdateNegativeKeywordResponseSchema = z.object({
515
+ responses: z.array(updateNegativeKeywordResponseSchema).optional(),
516
+ });
517
+ // ============================================================================
518
+ // Targeting and Bid Schemas
519
+ // ============================================================================
520
+ /**
521
+ * Validates the Marketing API targeted bid request model.
522
+ */
523
+ export const targetedBidRequestSchema = z.object({
524
+ bid: amountSchema.optional(),
525
+ listingId: z.string().optional(),
526
+ });
527
+ /**
528
+ * Validates the Marketing API targeted keyword request model.
529
+ */
530
+ export const targetedKeywordRequestSchema = z.object({
531
+ adGroupId: z.string().optional(),
532
+ bid: amountSchema.optional(),
533
+ keywordText: z.string().optional(),
534
+ matchType: z.string().optional(),
535
+ });
536
+ /**
537
+ * Validates the Marketing API targeted ads paged collection model.
538
+ */
539
+ export const targetedAdsPagedCollectionSchema = z.object({
540
+ ads: z.array(adSchema).optional(),
541
+ href: z.string().optional(),
542
+ limit: z.number().optional(),
543
+ next: z.string().optional(),
544
+ offset: z.number().optional(),
545
+ prev: z.string().optional(),
546
+ total: z.number().optional(),
547
+ });
548
+ /**
549
+ * Validates the Marketing API targeted bids paged collection model.
550
+ */
551
+ export const targetedBidsPagedCollectionSchema = z.object({
552
+ bids: z.array(targetedBidRequestSchema).optional(),
553
+ href: z.string().optional(),
554
+ limit: z.number().optional(),
555
+ next: z.string().optional(),
556
+ offset: z.number().optional(),
557
+ prev: z.string().optional(),
558
+ total: z.number().optional(),
559
+ });
560
+ /**
561
+ * Validates the Marketing API targeted keywords paged collection model.
562
+ */
563
+ export const targetedKeywordsPagedCollectionSchema = z.object({
564
+ href: z.string().optional(),
565
+ keywords: z.array(targetedKeywordRequestSchema).optional(),
566
+ limit: z.number().optional(),
567
+ next: z.string().optional(),
568
+ offset: z.number().optional(),
569
+ prev: z.string().optional(),
570
+ total: z.number().optional(),
571
+ });
572
+ /**
573
+ * Validates the Marketing API targeting items model.
574
+ */
575
+ export const targetingItemsSchema = z.object({
576
+ inventoryCriterion: z
577
+ .array(z.object({
578
+ inventoryItems: z.array(marketingInventoryItemSchema).optional(),
579
+ listingIds: z.array(z.string()).optional(),
580
+ }))
581
+ .optional(),
582
+ });
583
+ export const bulkCreateAdsByInventoryReferenceInputSchema = z.object({
584
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
585
+ request: bulkCreateAdsByInventoryReferenceRequestSchema.describe('Bulk create ads by inventory reference request body'),
586
+ });
587
+ /** Validates the Marketing API bulkCreateAdsByListingId endpoint input. */
588
+ export const bulkCreateAdsByListingIdInputSchema = z.object({
589
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
590
+ request: bulkCreateAdRequestSchema.describe('Bulk create ads by listing id request body'),
591
+ });
592
+ /** Validates the Marketing API bulkDeleteAdsByInventoryReference endpoint input. */
593
+ export const bulkDeleteAdsByInventoryReferenceInputSchema = z.object({
594
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
595
+ request: bulkDeleteAdsByInventoryReferenceRequestSchema.describe('Bulk delete ads by inventory reference request body'),
596
+ });
597
+ /** Validates the Marketing API bulkDeleteAdsByListingId endpoint input. */
598
+ export const bulkDeleteAdsByListingIdInputSchema = z.object({
599
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
600
+ request: bulkDeleteAdRequestSchema.describe('Bulk delete ads by listing id request body'),
601
+ });
602
+ /** Validates the Marketing API bulkUpdateAdsBidByInventoryReference endpoint input. */
603
+ export const bulkUpdateAdsBidByInventoryReferenceInputSchema = z.object({
604
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
605
+ request: bulkCreateAdsByInventoryReferenceRequestSchema.describe('Bulk update ads bid by inventory reference request body'),
606
+ });
607
+ /** Validates the Marketing API bulkUpdateAdsBidByListingId endpoint input. */
608
+ export const bulkUpdateAdsBidByListingIdInputSchema = z.object({
609
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
610
+ request: bulkCreateAdRequestSchema.describe('Bulk update ads bid by listing id request body'),
611
+ });
612
+ /** Validates the Marketing API bulkUpdateAdsStatus endpoint input. */
613
+ export const bulkUpdateAdsStatusInputSchema = z.object({
614
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
615
+ request: bulkUpdateAdStatusRequestSchema.describe('Bulk update ads status request body'),
616
+ });
617
+ /** Validates the Marketing API bulkUpdateAdsStatusByListingId endpoint input. */
618
+ export const bulkUpdateAdsStatusByListingIdInputSchema = z.object({
619
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
620
+ request: bulkUpdateAdStatusByListingIdRequestSchema.describe('Bulk update ads status by listing id request body'),
621
+ });
622
+ /** Validates the Marketing API getAds endpoint input. */
623
+ export const getAdsInputSchema = z.object({
624
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
625
+ adGroupIds: z.string().describe('adGroupIds optional endpoint parameter').optional(),
626
+ adStatus: z.string().describe('adStatus optional endpoint parameter').optional(),
627
+ limit: z.number().describe('limit optional endpoint parameter').optional(),
628
+ listingIds: z.string().describe('listingIds optional endpoint parameter').optional(),
629
+ offset: z.number().describe('offset optional endpoint parameter').optional(),
630
+ });
631
+ /** Validates the Marketing API createAdByListingId endpoint input. */
632
+ export const createAdByListingIdInputSchema = z.object({
633
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
634
+ request: createAdRequestSchema.describe('Create ad by listing id request body'),
635
+ });
636
+ /** Validates the Marketing API createAdsByInventoryReference endpoint input. */
637
+ export const createAdsByInventoryReferenceInputSchema = z.object({
638
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
639
+ request: createAdsByInventoryReferenceRequestSchema.describe('Create ads by inventory reference request body'),
640
+ });
641
+ /** Validates the Marketing API getAd endpoint input. */
642
+ export const getAdInputSchema = z.object({
643
+ adId: z.string().describe('adId required endpoint parameter'),
644
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
645
+ });
646
+ /** Validates the Marketing API deleteAd endpoint input. */
647
+ export const deleteAdInputSchema = z.object({
648
+ adId: z.string().describe('adId required endpoint parameter'),
649
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
650
+ });
651
+ /** Validates the Marketing API deleteAdsByInventoryReference endpoint input. */
652
+ export const deleteAdsByInventoryReferenceInputSchema = z.object({
653
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
654
+ request: deleteAdsByInventoryReferenceRequestSchema.describe('Delete ads by inventory reference request body'),
655
+ });
656
+ /** Validates the Marketing API getAdsByInventoryReference endpoint input. */
657
+ export const getAdsByInventoryReferenceInputSchema = z.object({
658
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
659
+ inventoryReferenceId: z.string().describe('inventoryReferenceId required endpoint parameter'),
660
+ inventoryReferenceType: z.string().describe('inventoryReferenceType required endpoint parameter'),
661
+ });
662
+ /** Validates the Marketing API updateBid endpoint input. */
663
+ export const updateBidInputSchema = z.object({
664
+ adId: z.string().describe('adId required endpoint parameter'),
665
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
666
+ request: updateBidPercentageRequestSchema.describe('Update bid request body'),
667
+ });
668
+ /** Validates the Marketing API getAdGroups endpoint input. */
669
+ export const getAdGroupsInputSchema = z.object({
670
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
671
+ adGroupStatus: z.string().describe('adGroupStatus optional endpoint parameter').optional(),
672
+ limit: z.number().describe('limit optional endpoint parameter').optional(),
673
+ offset: z.number().describe('offset optional endpoint parameter').optional(),
674
+ });
675
+ /** Validates the Marketing API createAdGroup endpoint input. */
676
+ export const createAdGroupInputSchema = z.object({
677
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
678
+ request: createAdGroupRequestSchema.describe('Create ad group request body'),
679
+ });
680
+ /** Validates the Marketing API getAdGroup endpoint input. */
681
+ export const getAdGroupInputSchema = z.object({
682
+ adGroupId: z.string().describe('adGroupId required endpoint parameter'),
683
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
684
+ });
685
+ /** Validates the Marketing API updateAdGroup endpoint input. */
686
+ export const updateAdGroupInputSchema = z.object({
687
+ adGroupId: z.string().describe('adGroupId required endpoint parameter'),
688
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
689
+ request: updateAdGroupRequestSchema.describe('Update ad group request body'),
690
+ });
691
+ /** Validates the Marketing API suggestBids endpoint input. */
692
+ export const suggestBidsInputSchema = z.object({
693
+ adGroupId: z.string().describe('adGroupId required endpoint parameter'),
694
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
695
+ request: targetedBidRequestSchema.describe('Suggest bids request body'),
696
+ });
697
+ /** Validates the Marketing API suggestKeywords endpoint input. */
698
+ export const suggestKeywordsInputSchema = z.object({
699
+ adGroupId: z.string().describe('adGroupId required endpoint parameter'),
700
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
701
+ request: targetedKeywordRequestSchema.describe('Suggest keywords request body'),
702
+ });
703
+ /** Validates the Marketing API cloneCampaign endpoint input. */
704
+ export const bulkCreateKeywordInputSchema = z.object({
705
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
706
+ request: bulkCreateKeywordRequestSchema.describe('Bulk create keyword request body'),
707
+ });
708
+ /** Validates the Marketing API bulkUpdateKeyword endpoint input. */
709
+ export const bulkUpdateKeywordInputSchema = z.object({
710
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
711
+ request: bulkUpdateKeywordRequestSchema.describe('Bulk update keyword request body'),
712
+ });
713
+ /** Validates the Marketing API getKeywords endpoint input. */
714
+ export const getKeywordsInputSchema = z.object({
715
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
716
+ adGroupIds: z.string().describe('adGroupIds optional endpoint parameter').optional(),
717
+ keywordStatus: z.string().describe('keywordStatus optional endpoint parameter').optional(),
718
+ limit: z.number().describe('limit optional endpoint parameter').optional(),
719
+ offset: z.number().describe('offset optional endpoint parameter').optional(),
720
+ });
721
+ /** Validates the Marketing API createKeyword endpoint input. */
722
+ export const createKeywordInputSchema = z.object({
723
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
724
+ request: createKeywordRequestSchema.describe('Create keyword request body'),
725
+ });
726
+ /** Validates the Marketing API getKeyword endpoint input. */
727
+ export const getKeywordInputSchema = z.object({
728
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
729
+ keywordId: z.string().describe('keywordId required endpoint parameter'),
730
+ });
731
+ /** Validates the Marketing API updateKeyword endpoint input. */
732
+ export const updateKeywordInputSchema = z.object({
733
+ campaignId: z.string().describe('campaignId required endpoint parameter'),
734
+ keywordId: z.string().describe('keywordId required endpoint parameter'),
735
+ request: updateKeywordRequestSchema.describe('Update keyword request body'),
736
+ });
737
+ /** Validates the Marketing API bulkCreateNegativeKeyword endpoint input. */
738
+ export const bulkCreateNegativeKeywordInputSchema = z.object({
739
+ request: bulkCreateNegativeKeywordRequestSchema.describe('Bulk create negative keyword request body'),
740
+ });
741
+ /** Validates the Marketing API bulkUpdateNegativeKeyword endpoint input. */
742
+ export const bulkUpdateNegativeKeywordInputSchema = z.object({
743
+ request: bulkUpdateNegativeKeywordRequestSchema.describe('Bulk update negative keyword request body'),
744
+ });
745
+ /** Validates the Marketing API getNegativeKeywords endpoint input. */
746
+ export const getNegativeKeywordsInputSchema = z.object({
747
+ adGroupIds: z.string().describe('adGroupIds optional endpoint parameter').optional(),
748
+ campaignIds: z.string().describe('campaignIds optional endpoint parameter').optional(),
749
+ limit: z.number().describe('limit optional endpoint parameter').optional(),
750
+ negativeKeywordStatus: z
751
+ .string()
752
+ .describe('negativeKeywordStatus optional endpoint parameter')
753
+ .optional(),
754
+ offset: z.number().describe('offset optional endpoint parameter').optional(),
755
+ });
756
+ /** Validates the Marketing API createNegativeKeyword endpoint input. */
757
+ export const createNegativeKeywordInputSchema = z.object({
758
+ request: createNegativeKeywordRequestSchema.describe('Create negative keyword request body'),
759
+ });
760
+ /** Validates the Marketing API getNegativeKeyword endpoint input. */
761
+ export const getNegativeKeywordInputSchema = z.object({
762
+ negativeKeywordId: z.string().describe('negativeKeywordId required endpoint parameter'),
763
+ });
764
+ /** Validates the Marketing API updateNegativeKeyword endpoint input. */
765
+ export const updateNegativeKeywordInputSchema = z.object({
766
+ negativeKeywordId: z.string().describe('negativeKeywordId required endpoint parameter'),
767
+ request: updateNegativeKeywordRequestSchema.describe('Update negative keyword request body'),
768
+ });
769
+ /** Validates the Marketing API getReport endpoint input. */