ebay-mcp 1.13.2 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +3 -3
- package/README.es.md +3 -3
- package/README.fr.md +3 -3
- package/README.ja.md +3 -3
- package/README.ko.md +3 -3
- package/README.md +163 -41
- package/README.pt-BR.md +3 -3
- package/README.ru.md +3 -3
- package/README.zh-CN.md +3 -3
- package/build/api/account-management/account.js +633 -297
- package/build/api/analytics-and-report/analytics.js +111 -65
- package/build/api/client.js +199 -140
- package/build/api/clientRequestError.js +23 -0
- package/build/api/clientTrading.js +213 -0
- package/build/api/clientTradingError.js +4 -0
- package/build/api/communication/feedback.js +147 -59
- package/build/api/communication/message.js +134 -81
- package/build/api/communication/negotiation.js +65 -53
- package/build/api/communication/notification.js +458 -164
- package/build/api/developer/developer.js +99 -45
- package/build/api/index.js +23 -8
- package/build/api/listing-management/inventory.js +884 -338
- package/build/api/listing-metadata/metadata.js +416 -170
- package/build/api/listing-metadata/taxonomy.js +187 -42
- package/build/api/marketing-and-promotions/marketing.js +1392 -598
- package/build/api/marketing-and-promotions/recommendation.js +49 -24
- package/build/api/order-management/dispute.js +226 -45
- package/build/api/order-management/fulfillment.js +144 -71
- package/build/api/order-management/orderIssueHelpers.js +61 -0
- package/build/api/other/compliance.js +50 -38
- package/build/api/other/edelivery.js +603 -159
- package/build/api/other/finding.js +280 -0
- package/build/api/other/identity.js +30 -15
- package/build/api/other/translation.js +29 -14
- package/build/api/other/vero.js +113 -27
- package/build/api/rateLimitTracker.js +55 -0
- package/build/api/shared/request.js +189 -98
- package/build/api/trading/trading.js +154 -87
- package/build/auth/credentialSession.js +250 -0
- package/build/auth/oauth.js +298 -171
- package/build/auth/{oauth-metadata.js → oauthMetadata.js} +22 -6
- package/build/auth/oauthMiddleware.js +104 -0
- package/build/auth/{scope-utils.js → scopeUtils.js} +101 -28
- package/build/auth/tokenVerifier.js +243 -0
- package/build/auth/tokenVerifierError.js +21 -0
- package/build/config/environment.js +148 -113
- package/build/config/{tool-families.js → toolFamilies.js} +30 -14
- package/build/index.js +25 -19
- package/build/mcp/{http-transport.js → httpTransport.js} +102 -52
- package/build/mcp/readOnlyFilter.js +67 -0
- package/build/mcp/runtime.js +31 -13
- package/build/mcp/{tool-gating.js → toolGating.js} +77 -49
- package/build/mcp/{ui-bridge.js → uiBridge.js} +80 -23
- package/build/schemas/account-management/account.js +144 -6
- package/build/schemas/analytics/analytics.js +33 -19
- package/build/schemas/communication/messages.js +12 -42
- package/build/schemas/developer/developer.js +135 -0
- package/build/schemas/fulfillment/orders.js +183 -21
- package/build/schemas/index.js +27 -19
- package/build/schemas/inventory-management/inventory.js +17 -9
- package/build/schemas/marketing/marketing.js +480 -25
- package/build/schemas/metadata/metadata.js +11 -6
- package/build/schemas/other/finding.js +27 -0
- package/build/schemas/other/otherApis.js +424 -0
- package/build/schemas/taxonomy/taxonomy.js +11 -5
- package/build/scripts/{auto-setup.js → autoSetup.js} +87 -74
- package/build/scripts/{build-ui.js → buildUi.js} +6 -1
- package/build/scripts/{dev-sync.js → devSync.js} +169 -110
- package/build/scripts/diagnostics.js +52 -44
- package/build/scripts/{download-specs.js → downloadSpecs.js} +29 -21
- package/build/scripts/{interactive-setup.js → interactiveSetup.js} +84 -78
- package/build/scripts/setup.js +241 -178
- package/build/scripts/{setup-shared.js → setupShared.js} +29 -7
- package/build/scripts/skills.js +35 -27
- package/build/scripts/updateApiStatusDoc.js +71 -0
- package/build/serverHttp.js +90 -0
- package/build/skills/content.js +124 -118
- package/build/skills/index.js +22 -10
- package/build/skills/install.js +21 -10
- package/build/skills/markers.js +50 -15
- package/build/skills/{registry-snapshot.js → registrySnapshot.js} +8 -2
- package/build/skills/render.js +41 -14
- package/build/skills/targets.js +49 -17
- package/build/tools/categories/account.js +166 -264
- package/build/tools/categories/analytics.js +11 -22
- package/build/tools/categories/browse.js +17 -0
- package/build/tools/categories/communication.js +124 -399
- package/build/tools/categories/connector.js +23 -20
- package/build/tools/categories/developer.js +46 -159
- package/build/tools/categories/fulfillment.js +84 -215
- package/build/tools/categories/index.js +6 -14
- package/build/tools/categories/inventory.js +238 -293
- package/build/tools/categories/marketing.js +677 -39
- package/build/tools/categories/metadata.js +190 -117
- package/build/tools/categories/other.js +81 -208
- package/build/tools/categories/taxonomy.js +29 -20
- package/build/tools/categories/{token-management.js → tokenManagement.js} +187 -192
- package/build/tools/categories/trading.js +16 -47
- package/build/tools/contracts.js +34 -24
- package/build/tools/{define-tool.js → defineTool.js} +44 -29
- package/build/tools/registry.js +87 -29
- package/build/tools/schemas.js +3 -57
- package/build/tools/ui/archetypes.js +1 -0
- package/build/tools/ui/{map-helpers.js → mapHelpers.js} +69 -19
- package/build/tools/ui/maps.js +294 -80
- package/build/types/index.js +1 -1
- package/build/ui/card.html +14 -14
- package/build/ui/chart.html +14 -14
- package/build/ui/stat.html +87 -0
- package/build/ui/table.html +14 -14
- package/build/utils/apiStatusFeed.js +95 -0
- package/build/utils/cliOutput.js +15 -0
- package/build/utils/cliUi.js +108 -0
- package/build/utils/communication/feedback.js +57 -77
- package/build/utils/communication/message.js +69 -98
- package/build/utils/communication/negotiation.js +30 -57
- package/build/utils/communication/notification.js +112 -252
- package/build/utils/{date-converter.js → dateConverter.js} +62 -30
- package/build/utils/effectSchema.js +203 -0
- package/build/utils/effectSchemaAdapter.js +121 -0
- package/build/utils/effectSchemaChainMethods.js +146 -0
- package/build/utils/effectSchemaRefinements.js +104 -0
- package/build/utils/effectSchemaStringMethods.js +63 -0
- package/build/utils/effectSchemaTypes.js +47 -0
- package/build/utils/{env-parser.js → envParser.js} +10 -2
- package/build/utils/errors.js +7 -3
- package/build/utils/http.js +148 -89
- package/build/utils/{llm-client-detector.js → llmClientDetector.js} +295 -274
- package/build/utils/logger.js +127 -51
- package/build/utils/{oauth-helper.js → oauthHelper.js} +127 -90
- package/build/utils/other/compliance.js +18 -38
- package/build/utils/other/identity.js +2 -2
- package/build/utils/other/translation.js +4 -4
- package/build/utils/other/vero.js +36 -20
- package/build/utils/schemaHelpers.js +22 -0
- package/build/utils/scopeHelper.js +270 -0
- package/build/utils/securityChecker.js +316 -0
- package/build/utils/{setup-validator.js → setupValidator.js} +113 -94
- package/build/utils/{setup-wizard.js → setupWizard.js} +57 -46
- package/build/utils/{token-utils.js → tokenUtils.js} +2 -2
- package/build/utils/trading/trading.js +35 -0
- package/build/utils/typeGuards.js +12 -0
- package/build/utils/version.js +65 -29
- package/package.json +10 -8
- package/build/api/client-trading.js +0 -124
- package/build/api/communication/shared.js +0 -59
- package/build/api/shared/query-params.js +0 -16
- package/build/auth/credential-session.js +0 -166
- package/build/auth/oauth-middleware.js +0 -100
- package/build/auth/token-verifier.js +0 -186
- package/build/schemas/other/other-apis.js +0 -390
- package/build/scripts/update-api-status-doc.js +0 -44
- package/build/server-http.js +0 -85
- package/build/tools/definitions/marketing.js +0 -1381
- package/build/tools/tool-handlers/marketing.js +0 -312
- package/build/utils/account-management/account.js +0 -818
- package/build/utils/api-status-feed.js +0 -84
- package/build/utils/cli-ui.js +0 -47
- package/build/utils/order-management/dispute.js +0 -369
- package/build/utils/order-management/fulfillment.js +0 -205
- package/build/utils/other/edelivery.js +0 -235
- package/build/utils/schema-helpers.js +0 -13
- package/build/utils/scope-helper.js +0 -207
- package/build/utils/security-checker.js +0 -248
- package/build/utils/type-guards.js +0 -6
- /package/build/auth/{oauth-types.js → oauthTypes.js} +0 -0
- /package/build/{server-http.d.ts → serverHttp.d.ts} +0 -0
- /package/build/tools/ui/{view-models.js → viewModels.js} +0 -0
- /package/build/types/{ebay-enums.js → ebayEnums.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { z } from '
|
|
1
|
+
import { z } from '../../utils/effectSchema.js';
|
|
2
2
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Marketing API Schemas
|
|
5
5
|
*
|
|
6
|
-
* This file contains
|
|
6
|
+
* This file contains Effect-backed schemas for all Marketing API endpoints including:
|
|
7
7
|
* - Campaign Management (create, get, update, pause, resume, end campaigns)
|
|
8
8
|
* - Ad Operations (bulk and single ad operations)
|
|
9
9
|
* - Ad Group Management
|
|
@@ -1428,26 +1428,6 @@ export const pagedListingRecommendationCollectionSchema = z.object({
|
|
|
1428
1428
|
export const findListingRecommendationRequestSchema = z.object({
|
|
1429
1429
|
listingIds: z.array(z.string()).optional(),
|
|
1430
1430
|
});
|
|
1431
|
-
// Input Schemas for Find Listing Recommendations
|
|
1432
|
-
/**
|
|
1433
|
-
* Validates the Marketing API find listing recommendations request payload.
|
|
1434
|
-
*/
|
|
1435
|
-
export const findListingRecommendationsInputSchema = z.object({
|
|
1436
|
-
filter: z
|
|
1437
|
-
.string()
|
|
1438
|
-
.optional()
|
|
1439
|
-
.describe('Filter by recommendation types (e.g., recommendationTypes:{AD})'),
|
|
1440
|
-
limit: z
|
|
1441
|
-
.string()
|
|
1442
|
-
.optional()
|
|
1443
|
-
.describe('Maximum number of ads to return per page (default: 10, max: 500)'),
|
|
1444
|
-
offset: z
|
|
1445
|
-
.string()
|
|
1446
|
-
.optional()
|
|
1447
|
-
.describe('Number of ads to skip before returning results (default: 0)'),
|
|
1448
|
-
'X-EBAY-C-MARKETPLACE-ID': z.string().describe('eBay marketplace ID where items are listed'),
|
|
1449
|
-
body: findListingRecommendationRequestSchema.optional(),
|
|
1450
|
-
});
|
|
1451
1431
|
// ============================================================================
|
|
1452
1432
|
// Aspect Schema
|
|
1453
1433
|
// ============================================================================
|
|
@@ -1459,12 +1439,487 @@ export const aspectSchema = z.object({
|
|
|
1459
1439
|
localizedAspectName: z.string().optional(),
|
|
1460
1440
|
});
|
|
1461
1441
|
// ============================================================================
|
|
1442
|
+
// Email Campaign Request Schemas
|
|
1443
|
+
// ============================================================================
|
|
1444
|
+
/** Validates the Marketing API update email campaign request model. */
|
|
1445
|
+
export const updateEmailCampaignRequestSchema = z.object({
|
|
1446
|
+
audienceCodes: z.array(z.string()).optional(),
|
|
1447
|
+
categoryId: z.string().optional(),
|
|
1448
|
+
categoryType: z.string().optional(),
|
|
1449
|
+
itemIds: z.array(z.string()).optional(),
|
|
1450
|
+
itemSelectMode: z.string().optional(),
|
|
1451
|
+
personalizedMessage: z.string().optional(),
|
|
1452
|
+
priceRange: priceRangeSchema.optional(),
|
|
1453
|
+
promotionId: z.string().optional(),
|
|
1454
|
+
promotionSelectModeEnum: z.string().optional(),
|
|
1455
|
+
scheduleDate: z.string().optional(),
|
|
1456
|
+
sort: z.string().optional(),
|
|
1457
|
+
subject: z.string().optional(),
|
|
1458
|
+
});
|
|
1459
|
+
// ============================================================================
|
|
1460
|
+
// Endpoint Input Schemas (OpenAPI Operations)
|
|
1461
|
+
// ============================================================================
|
|
1462
|
+
/** Validates the Marketing API bulkCreateAdsByInventoryReference endpoint input. */
|
|
1463
|
+
export const bulkCreateAdsByInventoryReferenceInputSchema = z.object({
|
|
1464
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1465
|
+
request: bulkCreateAdsByInventoryReferenceRequestSchema.describe('Bulk create ads by inventory reference request body'),
|
|
1466
|
+
});
|
|
1467
|
+
/** Validates the Marketing API bulkCreateAdsByListingId endpoint input. */
|
|
1468
|
+
export const bulkCreateAdsByListingIdInputSchema = z.object({
|
|
1469
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1470
|
+
request: bulkCreateAdRequestSchema.describe('Bulk create ads by listing id request body'),
|
|
1471
|
+
});
|
|
1472
|
+
/** Validates the Marketing API bulkDeleteAdsByInventoryReference endpoint input. */
|
|
1473
|
+
export const bulkDeleteAdsByInventoryReferenceInputSchema = z.object({
|
|
1474
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1475
|
+
request: bulkDeleteAdsByInventoryReferenceRequestSchema.describe('Bulk delete ads by inventory reference request body'),
|
|
1476
|
+
});
|
|
1477
|
+
/** Validates the Marketing API bulkDeleteAdsByListingId endpoint input. */
|
|
1478
|
+
export const bulkDeleteAdsByListingIdInputSchema = z.object({
|
|
1479
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1480
|
+
request: bulkDeleteAdRequestSchema.describe('Bulk delete ads by listing id request body'),
|
|
1481
|
+
});
|
|
1482
|
+
/** Validates the Marketing API bulkUpdateAdsBidByInventoryReference endpoint input. */
|
|
1483
|
+
export const bulkUpdateAdsBidByInventoryReferenceInputSchema = z.object({
|
|
1484
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1485
|
+
request: bulkCreateAdsByInventoryReferenceRequestSchema.describe('Bulk update ads bid by inventory reference request body'),
|
|
1486
|
+
});
|
|
1487
|
+
/** Validates the Marketing API bulkUpdateAdsBidByListingId endpoint input. */
|
|
1488
|
+
export const bulkUpdateAdsBidByListingIdInputSchema = z.object({
|
|
1489
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1490
|
+
request: bulkCreateAdRequestSchema.describe('Bulk update ads bid by listing id request body'),
|
|
1491
|
+
});
|
|
1492
|
+
/** Validates the Marketing API bulkUpdateAdsStatus endpoint input. */
|
|
1493
|
+
export const bulkUpdateAdsStatusInputSchema = z.object({
|
|
1494
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1495
|
+
request: bulkUpdateAdStatusRequestSchema.describe('Bulk update ads status request body'),
|
|
1496
|
+
});
|
|
1497
|
+
/** Validates the Marketing API bulkUpdateAdsStatusByListingId endpoint input. */
|
|
1498
|
+
export const bulkUpdateAdsStatusByListingIdInputSchema = z.object({
|
|
1499
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1500
|
+
request: bulkUpdateAdStatusByListingIdRequestSchema.describe('Bulk update ads status by listing id request body'),
|
|
1501
|
+
});
|
|
1502
|
+
/** Validates the Marketing API getAds endpoint input. */
|
|
1503
|
+
export const getAdsInputSchema = z.object({
|
|
1504
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1505
|
+
adGroupIds: z.string().describe('adGroupIds optional endpoint parameter').optional(),
|
|
1506
|
+
adStatus: z.string().describe('adStatus optional endpoint parameter').optional(),
|
|
1507
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1508
|
+
listingIds: z.string().describe('listingIds optional endpoint parameter').optional(),
|
|
1509
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1510
|
+
});
|
|
1511
|
+
/** Validates the Marketing API createAdByListingId endpoint input. */
|
|
1512
|
+
export const createAdByListingIdInputSchema = z.object({
|
|
1513
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1514
|
+
request: createAdRequestSchema.describe('Create ad by listing id request body'),
|
|
1515
|
+
});
|
|
1516
|
+
/** Validates the Marketing API createAdsByInventoryReference endpoint input. */
|
|
1517
|
+
export const createAdsByInventoryReferenceInputSchema = z.object({
|
|
1518
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1519
|
+
request: createAdsByInventoryReferenceRequestSchema.describe('Create ads by inventory reference request body'),
|
|
1520
|
+
});
|
|
1521
|
+
/** Validates the Marketing API getAd endpoint input. */
|
|
1522
|
+
export const getAdInputSchema = z.object({
|
|
1523
|
+
adId: z.string().describe('adId required endpoint parameter'),
|
|
1524
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1525
|
+
});
|
|
1526
|
+
/** Validates the Marketing API deleteAd endpoint input. */
|
|
1527
|
+
export const deleteAdInputSchema = z.object({
|
|
1528
|
+
adId: z.string().describe('adId required endpoint parameter'),
|
|
1529
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1530
|
+
});
|
|
1531
|
+
/** Validates the Marketing API deleteAdsByInventoryReference endpoint input. */
|
|
1532
|
+
export const deleteAdsByInventoryReferenceInputSchema = z.object({
|
|
1533
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1534
|
+
request: deleteAdsByInventoryReferenceRequestSchema.describe('Delete ads by inventory reference request body'),
|
|
1535
|
+
});
|
|
1536
|
+
/** Validates the Marketing API getAdsByInventoryReference endpoint input. */
|
|
1537
|
+
export const getAdsByInventoryReferenceInputSchema = z.object({
|
|
1538
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1539
|
+
inventoryReferenceId: z.string().describe('inventoryReferenceId required endpoint parameter'),
|
|
1540
|
+
inventoryReferenceType: z.string().describe('inventoryReferenceType required endpoint parameter'),
|
|
1541
|
+
});
|
|
1542
|
+
/** Validates the Marketing API updateBid endpoint input. */
|
|
1543
|
+
export const updateBidInputSchema = z.object({
|
|
1544
|
+
adId: z.string().describe('adId required endpoint parameter'),
|
|
1545
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1546
|
+
request: updateBidPercentageRequestSchema.describe('Update bid request body'),
|
|
1547
|
+
});
|
|
1548
|
+
/** Validates the Marketing API getAdGroups endpoint input. */
|
|
1549
|
+
export const getAdGroupsInputSchema = z.object({
|
|
1550
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1551
|
+
adGroupStatus: z.string().describe('adGroupStatus optional endpoint parameter').optional(),
|
|
1552
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1553
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1554
|
+
});
|
|
1555
|
+
/** Validates the Marketing API createAdGroup endpoint input. */
|
|
1556
|
+
export const createAdGroupInputSchema = z.object({
|
|
1557
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1558
|
+
request: createAdGroupRequestSchema.describe('Create ad group request body'),
|
|
1559
|
+
});
|
|
1560
|
+
/** Validates the Marketing API getAdGroup endpoint input. */
|
|
1561
|
+
export const getAdGroupInputSchema = z.object({
|
|
1562
|
+
adGroupId: z.string().describe('adGroupId required endpoint parameter'),
|
|
1563
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1564
|
+
});
|
|
1565
|
+
/** Validates the Marketing API updateAdGroup endpoint input. */
|
|
1566
|
+
export const updateAdGroupInputSchema = z.object({
|
|
1567
|
+
adGroupId: z.string().describe('adGroupId required endpoint parameter'),
|
|
1568
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1569
|
+
request: updateAdGroupRequestSchema.describe('Update ad group request body'),
|
|
1570
|
+
});
|
|
1571
|
+
/** Validates the Marketing API suggestBids endpoint input. */
|
|
1572
|
+
export const suggestBidsInputSchema = z.object({
|
|
1573
|
+
adGroupId: z.string().describe('adGroupId required endpoint parameter'),
|
|
1574
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1575
|
+
request: targetedBidRequestSchema.describe('Suggest bids request body'),
|
|
1576
|
+
});
|
|
1577
|
+
/** Validates the Marketing API suggestKeywords endpoint input. */
|
|
1578
|
+
export const suggestKeywordsInputSchema = z.object({
|
|
1579
|
+
adGroupId: z.string().describe('adGroupId required endpoint parameter'),
|
|
1580
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1581
|
+
request: targetedKeywordRequestSchema.describe('Suggest keywords request body'),
|
|
1582
|
+
});
|
|
1583
|
+
/** Validates the Marketing API cloneCampaign endpoint input. */
|
|
1584
|
+
export const cloneCampaignInputSchema = z.object({
|
|
1585
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1586
|
+
request: cloneCampaignRequestSchema.describe('Clone campaign request body'),
|
|
1587
|
+
});
|
|
1588
|
+
/** Validates the Marketing API getCampaigns endpoint input. */
|
|
1589
|
+
export const getCampaignsInputSchema = z.object({
|
|
1590
|
+
campaignName: z.string().describe('campaignName optional endpoint parameter').optional(),
|
|
1591
|
+
campaignStatus: z.string().describe('campaignStatus optional endpoint parameter').optional(),
|
|
1592
|
+
campaignTargetingTypes: z
|
|
1593
|
+
.string()
|
|
1594
|
+
.describe('campaignTargetingTypes optional endpoint parameter')
|
|
1595
|
+
.optional(),
|
|
1596
|
+
channels: z.string().describe('channels optional endpoint parameter').optional(),
|
|
1597
|
+
endDateRange: z.string().describe('endDateRange optional endpoint parameter').optional(),
|
|
1598
|
+
fundingStrategy: z.string().describe('fundingStrategy optional endpoint parameter').optional(),
|
|
1599
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1600
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1601
|
+
startDateRange: z.string().describe('startDateRange optional endpoint parameter').optional(),
|
|
1602
|
+
});
|
|
1603
|
+
/** Validates the Marketing API createCampaign endpoint input. */
|
|
1604
|
+
export const createCampaignInputSchema = z.object({
|
|
1605
|
+
request: createCampaignRequestSchema.describe('Create campaign request body'),
|
|
1606
|
+
});
|
|
1607
|
+
/** Validates the Marketing API getCampaign endpoint input. */
|
|
1608
|
+
export const getCampaignInputSchema = z.object({
|
|
1609
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1610
|
+
});
|
|
1611
|
+
/** Validates the Marketing API deleteCampaign endpoint input. */
|
|
1612
|
+
export const deleteCampaignInputSchema = z.object({
|
|
1613
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1614
|
+
});
|
|
1615
|
+
/** Validates the Marketing API endCampaign endpoint input. */
|
|
1616
|
+
export const endCampaignInputSchema = z.object({
|
|
1617
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1618
|
+
});
|
|
1619
|
+
/** Validates the Marketing API findCampaignByAdReference endpoint input. */
|
|
1620
|
+
export const findCampaignByAdReferenceInputSchema = z.object({
|
|
1621
|
+
inventoryReferenceId: z
|
|
1622
|
+
.string()
|
|
1623
|
+
.describe('inventoryReferenceId optional endpoint parameter')
|
|
1624
|
+
.optional(),
|
|
1625
|
+
inventoryReferenceType: z
|
|
1626
|
+
.string()
|
|
1627
|
+
.describe('inventoryReferenceType optional endpoint parameter')
|
|
1628
|
+
.optional(),
|
|
1629
|
+
listingId: z.string().describe('listingId optional endpoint parameter').optional(),
|
|
1630
|
+
});
|
|
1631
|
+
/** Validates the Marketing API getCampaignByName endpoint input. */
|
|
1632
|
+
export const getCampaignByNameInputSchema = z.object({
|
|
1633
|
+
campaignName: z.string().describe('campaignName required endpoint parameter'),
|
|
1634
|
+
});
|
|
1635
|
+
/** Validates the Marketing API launchCampaign endpoint input. */
|
|
1636
|
+
export const launchCampaignInputSchema = z.object({
|
|
1637
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1638
|
+
});
|
|
1639
|
+
/** Validates the Marketing API pauseCampaign endpoint input. */
|
|
1640
|
+
export const pauseCampaignInputSchema = z.object({
|
|
1641
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1642
|
+
});
|
|
1643
|
+
/** Validates the Marketing API resumeCampaign endpoint input. */
|
|
1644
|
+
export const resumeCampaignInputSchema = z.object({
|
|
1645
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1646
|
+
});
|
|
1647
|
+
/** Validates the Marketing API setupQuickCampaign endpoint input. */
|
|
1648
|
+
export const setupQuickCampaignInputSchema = z.object({
|
|
1649
|
+
request: quickSetupRequestSchema.describe('Setup quick campaign request body'),
|
|
1650
|
+
});
|
|
1651
|
+
/** Validates the Marketing API suggestBudget endpoint input. */
|
|
1652
|
+
export const suggestBudgetInputSchema = z.object({
|
|
1653
|
+
marketplaceId: z.string().describe('Marketplace ID sent as X-EBAY-C-MARKETPLACE-ID'),
|
|
1654
|
+
});
|
|
1655
|
+
/** Validates the Marketing API suggestItems endpoint input. */
|
|
1656
|
+
export const suggestItemsInputSchema = z.object({
|
|
1657
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1658
|
+
categoryIds: z.string().describe('categoryIds optional endpoint parameter').optional(),
|
|
1659
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1660
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1661
|
+
});
|
|
1662
|
+
/** Validates the Marketing API suggestMaxCpc endpoint input. */
|
|
1663
|
+
export const suggestMaxCpcInputSchema = z.object({
|
|
1664
|
+
request: suggestMaxCpcRequestSchema.describe('Suggest max cpc request body'),
|
|
1665
|
+
});
|
|
1666
|
+
/** Validates the Marketing API updateAdRateStrategy endpoint input. */
|
|
1667
|
+
export const updateAdRateStrategyInputSchema = z.object({
|
|
1668
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1669
|
+
request: updateAdrateStrategyRequestSchema.describe('Update ad rate strategy request body'),
|
|
1670
|
+
});
|
|
1671
|
+
/** Validates the Marketing API updateBiddingStrategy endpoint input. */
|
|
1672
|
+
export const updateBiddingStrategyInputSchema = z.object({
|
|
1673
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1674
|
+
request: updateBiddingStrategyRequestSchema.describe('Update bidding strategy request body'),
|
|
1675
|
+
});
|
|
1676
|
+
/** Validates the Marketing API updateCampaignBudget endpoint input. */
|
|
1677
|
+
export const updateCampaignBudgetInputSchema = z.object({
|
|
1678
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1679
|
+
request: updateCampaignBudgetRequestSchema.describe('Update campaign budget request body'),
|
|
1680
|
+
});
|
|
1681
|
+
/** Validates the Marketing API updateCampaignIdentification endpoint input. */
|
|
1682
|
+
export const updateCampaignIdentificationInputSchema = z.object({
|
|
1683
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1684
|
+
request: updateCampaignIdentificationRequestSchema.describe('Update campaign identification request body'),
|
|
1685
|
+
});
|
|
1686
|
+
/** Validates the Marketing API bulkCreateKeyword endpoint input. */
|
|
1687
|
+
export const bulkCreateKeywordInputSchema = z.object({
|
|
1688
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1689
|
+
request: bulkCreateKeywordRequestSchema.describe('Bulk create keyword request body'),
|
|
1690
|
+
});
|
|
1691
|
+
/** Validates the Marketing API bulkUpdateKeyword endpoint input. */
|
|
1692
|
+
export const bulkUpdateKeywordInputSchema = z.object({
|
|
1693
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1694
|
+
request: bulkUpdateKeywordRequestSchema.describe('Bulk update keyword request body'),
|
|
1695
|
+
});
|
|
1696
|
+
/** Validates the Marketing API getKeywords endpoint input. */
|
|
1697
|
+
export const getKeywordsInputSchema = z.object({
|
|
1698
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1699
|
+
adGroupIds: z.string().describe('adGroupIds optional endpoint parameter').optional(),
|
|
1700
|
+
keywordStatus: z.string().describe('keywordStatus optional endpoint parameter').optional(),
|
|
1701
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1702
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1703
|
+
});
|
|
1704
|
+
/** Validates the Marketing API createKeyword endpoint input. */
|
|
1705
|
+
export const createKeywordInputSchema = z.object({
|
|
1706
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1707
|
+
request: createKeywordRequestSchema.describe('Create keyword request body'),
|
|
1708
|
+
});
|
|
1709
|
+
/** Validates the Marketing API getKeyword endpoint input. */
|
|
1710
|
+
export const getKeywordInputSchema = z.object({
|
|
1711
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1712
|
+
keywordId: z.string().describe('keywordId required endpoint parameter'),
|
|
1713
|
+
});
|
|
1714
|
+
/** Validates the Marketing API updateKeyword endpoint input. */
|
|
1715
|
+
export const updateKeywordInputSchema = z.object({
|
|
1716
|
+
campaignId: z.string().describe('campaignId required endpoint parameter'),
|
|
1717
|
+
keywordId: z.string().describe('keywordId required endpoint parameter'),
|
|
1718
|
+
request: updateKeywordRequestSchema.describe('Update keyword request body'),
|
|
1719
|
+
});
|
|
1720
|
+
/** Validates the Marketing API bulkCreateNegativeKeyword endpoint input. */
|
|
1721
|
+
export const bulkCreateNegativeKeywordInputSchema = z.object({
|
|
1722
|
+
request: bulkCreateNegativeKeywordRequestSchema.describe('Bulk create negative keyword request body'),
|
|
1723
|
+
});
|
|
1724
|
+
/** Validates the Marketing API bulkUpdateNegativeKeyword endpoint input. */
|
|
1725
|
+
export const bulkUpdateNegativeKeywordInputSchema = z.object({
|
|
1726
|
+
request: bulkUpdateNegativeKeywordRequestSchema.describe('Bulk update negative keyword request body'),
|
|
1727
|
+
});
|
|
1728
|
+
/** Validates the Marketing API getNegativeKeywords endpoint input. */
|
|
1729
|
+
export const getNegativeKeywordsInputSchema = z.object({
|
|
1730
|
+
adGroupIds: z.string().describe('adGroupIds optional endpoint parameter').optional(),
|
|
1731
|
+
campaignIds: z.string().describe('campaignIds optional endpoint parameter').optional(),
|
|
1732
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1733
|
+
negativeKeywordStatus: z
|
|
1734
|
+
.string()
|
|
1735
|
+
.describe('negativeKeywordStatus optional endpoint parameter')
|
|
1736
|
+
.optional(),
|
|
1737
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1738
|
+
});
|
|
1739
|
+
/** Validates the Marketing API createNegativeKeyword endpoint input. */
|
|
1740
|
+
export const createNegativeKeywordInputSchema = z.object({
|
|
1741
|
+
request: createNegativeKeywordRequestSchema.describe('Create negative keyword request body'),
|
|
1742
|
+
});
|
|
1743
|
+
/** Validates the Marketing API getNegativeKeyword endpoint input. */
|
|
1744
|
+
export const getNegativeKeywordInputSchema = z.object({
|
|
1745
|
+
negativeKeywordId: z.string().describe('negativeKeywordId required endpoint parameter'),
|
|
1746
|
+
});
|
|
1747
|
+
/** Validates the Marketing API updateNegativeKeyword endpoint input. */
|
|
1748
|
+
export const updateNegativeKeywordInputSchema = z.object({
|
|
1749
|
+
negativeKeywordId: z.string().describe('negativeKeywordId required endpoint parameter'),
|
|
1750
|
+
request: updateNegativeKeywordRequestSchema.describe('Update negative keyword request body'),
|
|
1751
|
+
});
|
|
1752
|
+
/** Validates the Marketing API getReport endpoint input. */
|
|
1753
|
+
export const getReportInputSchema = z.object({
|
|
1754
|
+
reportId: z.string().describe('reportId required endpoint parameter'),
|
|
1755
|
+
});
|
|
1756
|
+
/** Validates the Marketing API getReportMetadata endpoint input. */
|
|
1757
|
+
export const getReportMetadataInputSchema = z.object({
|
|
1758
|
+
fundingModel: z.string().describe('fundingModel optional endpoint parameter').optional(),
|
|
1759
|
+
channel: z.string().describe('channel optional endpoint parameter').optional(),
|
|
1760
|
+
});
|
|
1761
|
+
/** Validates the Marketing API getReportMetadataForReportType endpoint input. */
|
|
1762
|
+
export const getReportMetadataForReportTypeInputSchema = z.object({
|
|
1763
|
+
reportType: z.string().describe('reportType required endpoint parameter'),
|
|
1764
|
+
fundingModel: z.string().describe('fundingModel optional endpoint parameter').optional(),
|
|
1765
|
+
channel: z.string().describe('channel optional endpoint parameter').optional(),
|
|
1766
|
+
});
|
|
1767
|
+
/** Validates the Marketing API getReportTasks endpoint input. */
|
|
1768
|
+
export const getReportTasksInputSchema = z.object({
|
|
1769
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1770
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1771
|
+
reportTaskStatuses: z
|
|
1772
|
+
.string()
|
|
1773
|
+
.describe('reportTaskStatuses optional endpoint parameter')
|
|
1774
|
+
.optional(),
|
|
1775
|
+
});
|
|
1776
|
+
/** Validates the Marketing API createReportTask endpoint input. */
|
|
1777
|
+
export const createReportTaskInputSchema = z.object({
|
|
1778
|
+
request: createReportTaskSchema.describe('Create report task request body'),
|
|
1779
|
+
});
|
|
1780
|
+
/** Validates the Marketing API getReportTask endpoint input. */
|
|
1781
|
+
export const getReportTaskInputSchema = z.object({
|
|
1782
|
+
reportTaskId: z.string().describe('reportTaskId required endpoint parameter'),
|
|
1783
|
+
});
|
|
1784
|
+
/** Validates the Marketing API deleteReportTask endpoint input. */
|
|
1785
|
+
export const deleteReportTaskInputSchema = z.object({
|
|
1786
|
+
reportTaskId: z.string().describe('reportTaskId required endpoint parameter'),
|
|
1787
|
+
});
|
|
1788
|
+
/** Validates the Marketing API createItemPriceMarkdownPromotion endpoint input. */
|
|
1789
|
+
export const createItemPriceMarkdownPromotionInputSchema = z.object({
|
|
1790
|
+
request: itemPriceMarkdownSchema.describe('Create item price markdown promotion request body'),
|
|
1791
|
+
});
|
|
1792
|
+
/** Validates the Marketing API getItemPriceMarkdownPromotion endpoint input. */
|
|
1793
|
+
export const getItemPriceMarkdownPromotionInputSchema = z.object({
|
|
1794
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1795
|
+
});
|
|
1796
|
+
/** Validates the Marketing API updateItemPriceMarkdownPromotion endpoint input. */
|
|
1797
|
+
export const updateItemPriceMarkdownPromotionInputSchema = z.object({
|
|
1798
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1799
|
+
request: itemPriceMarkdownSchema.describe('Update item price markdown promotion request body'),
|
|
1800
|
+
});
|
|
1801
|
+
/** Validates the Marketing API deleteItemPriceMarkdownPromotion endpoint input. */
|
|
1802
|
+
export const deleteItemPriceMarkdownPromotionInputSchema = z.object({
|
|
1803
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1804
|
+
});
|
|
1805
|
+
/** Validates the Marketing API createItemPromotion endpoint input. */
|
|
1806
|
+
export const createItemPromotionInputSchema = z.object({
|
|
1807
|
+
request: itemPromotionSchema.describe('Create item promotion request body'),
|
|
1808
|
+
});
|
|
1809
|
+
/** Validates the Marketing API getItemPromotion endpoint input. */
|
|
1810
|
+
export const getItemPromotionInputSchema = z.object({
|
|
1811
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1812
|
+
});
|
|
1813
|
+
/** Validates the Marketing API updateItemPromotion endpoint input. */
|
|
1814
|
+
export const updateItemPromotionInputSchema = z.object({
|
|
1815
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1816
|
+
request: itemPromotionSchema.describe('Update item promotion request body'),
|
|
1817
|
+
});
|
|
1818
|
+
/** Validates the Marketing API deleteItemPromotion endpoint input. */
|
|
1819
|
+
export const deleteItemPromotionInputSchema = z.object({
|
|
1820
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1821
|
+
});
|
|
1822
|
+
/** Validates the Marketing API getListingSet endpoint input. */
|
|
1823
|
+
export const getListingSetInputSchema = z.object({
|
|
1824
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1825
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1826
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1827
|
+
q: z.string().describe('q optional endpoint parameter').optional(),
|
|
1828
|
+
sort: z.string().describe('sort optional endpoint parameter').optional(),
|
|
1829
|
+
status: z.string().describe('status optional endpoint parameter').optional(),
|
|
1830
|
+
});
|
|
1831
|
+
/** Validates the Marketing API getPromotions endpoint input. */
|
|
1832
|
+
export const getPromotionsInputSchema = z.object({
|
|
1833
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1834
|
+
marketplaceId: z.string().describe('marketplaceId required endpoint parameter'),
|
|
1835
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1836
|
+
promotionStatus: z.string().describe('promotionStatus optional endpoint parameter').optional(),
|
|
1837
|
+
promotionType: z.string().describe('promotionType optional endpoint parameter').optional(),
|
|
1838
|
+
q: z.string().describe('q optional endpoint parameter').optional(),
|
|
1839
|
+
sort: z.string().describe('sort optional endpoint parameter').optional(),
|
|
1840
|
+
});
|
|
1841
|
+
/** Validates the Marketing API pausePromotion endpoint input. */
|
|
1842
|
+
export const pausePromotionInputSchema = z.object({
|
|
1843
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1844
|
+
});
|
|
1845
|
+
/** Validates the Marketing API resumePromotion endpoint input. */
|
|
1846
|
+
export const resumePromotionInputSchema = z.object({
|
|
1847
|
+
promotionId: z.string().describe('promotionId required endpoint parameter'),
|
|
1848
|
+
});
|
|
1849
|
+
/** Validates the Marketing API getPromotionReports endpoint input. */
|
|
1850
|
+
export const getPromotionReportsInputSchema = z.object({
|
|
1851
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1852
|
+
marketplaceId: z.string().describe('marketplaceId required endpoint parameter'),
|
|
1853
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1854
|
+
promotionStatus: z.string().describe('promotionStatus optional endpoint parameter').optional(),
|
|
1855
|
+
promotionType: z.string().describe('promotionType optional endpoint parameter').optional(),
|
|
1856
|
+
q: z.string().describe('q optional endpoint parameter').optional(),
|
|
1857
|
+
});
|
|
1858
|
+
/** Validates the Marketing API getPromotionSummaryReport endpoint input. */
|
|
1859
|
+
export const getPromotionSummaryReportInputSchema = z.object({
|
|
1860
|
+
marketplaceId: z.string().describe('marketplaceId required endpoint parameter'),
|
|
1861
|
+
});
|
|
1862
|
+
/** Validates the Marketing API getEmailCampaigns endpoint input. */
|
|
1863
|
+
export const getEmailCampaignsInputSchema = z.object({
|
|
1864
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1865
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1866
|
+
q: z.string().describe('q optional endpoint parameter').optional(),
|
|
1867
|
+
sort: z.string().describe('sort optional endpoint parameter').optional(),
|
|
1868
|
+
});
|
|
1869
|
+
/** Validates the Marketing API createEmailCampaign endpoint input. */
|
|
1870
|
+
export const createEmailCampaignInputSchema = z.object({
|
|
1871
|
+
marketplaceId: z.string().describe('Marketplace ID sent as X-EBAY-C-MARKETPLACE-ID'),
|
|
1872
|
+
request: createEmailCampaignRequestSchema.describe('Create email campaign request body'),
|
|
1873
|
+
});
|
|
1874
|
+
/** Validates the Marketing API getEmailCampaign endpoint input. */
|
|
1875
|
+
export const getEmailCampaignInputSchema = z.object({
|
|
1876
|
+
emailCampaignId: z.string().describe('emailCampaignId required endpoint parameter'),
|
|
1877
|
+
});
|
|
1878
|
+
/** Validates the Marketing API updateEmailCampaign endpoint input. */
|
|
1879
|
+
export const updateEmailCampaignInputSchema = z.object({
|
|
1880
|
+
emailCampaignId: z.string().describe('emailCampaignId required endpoint parameter'),
|
|
1881
|
+
request: updateEmailCampaignRequestSchema.describe('Update email campaign request body'),
|
|
1882
|
+
});
|
|
1883
|
+
/** Validates the Marketing API deleteEmailCampaign endpoint input. */
|
|
1884
|
+
export const deleteEmailCampaignInputSchema = z.object({
|
|
1885
|
+
emailCampaignId: z.string().describe('emailCampaignId required endpoint parameter'),
|
|
1886
|
+
});
|
|
1887
|
+
/** Validates the Marketing API getAudiences endpoint input. */
|
|
1888
|
+
export const getAudiencesInputSchema = z.object({
|
|
1889
|
+
emailCampaignType: z.string().describe('emailCampaignType required endpoint parameter'),
|
|
1890
|
+
limit: z.number().describe('limit optional endpoint parameter').optional(),
|
|
1891
|
+
offset: z.number().describe('offset optional endpoint parameter').optional(),
|
|
1892
|
+
});
|
|
1893
|
+
/** Validates the Marketing API getEmailPreview endpoint input. */
|
|
1894
|
+
export const getEmailPreviewInputSchema = z.object({
|
|
1895
|
+
emailCampaignId: z.string().describe('emailCampaignId required endpoint parameter'),
|
|
1896
|
+
});
|
|
1897
|
+
/** Validates the Marketing API getEmailReport endpoint input. */
|
|
1898
|
+
export const getEmailReportInputSchema = z.object({
|
|
1899
|
+
endDate: z.string().describe('endDate required endpoint parameter'),
|
|
1900
|
+
startDate: z.string().describe('startDate required endpoint parameter'),
|
|
1901
|
+
});
|
|
1902
|
+
/** Validates the Recommendation API findListingRecommendations endpoint input. */
|
|
1903
|
+
export const findListingRecommendationsInputSchema = z.object({
|
|
1904
|
+
requestBody: findListingRecommendationRequestSchema.optional(),
|
|
1905
|
+
filter: z.string().optional().describe('Recommendation filter expression'),
|
|
1906
|
+
limit: z.number().optional().describe('Maximum recommendations to return'),
|
|
1907
|
+
offset: z.number().optional().describe('Recommendations to skip before returning results'),
|
|
1908
|
+
marketplaceId: z.string().describe('Marketplace ID sent as X-EBAY-C-MARKETPLACE-ID'),
|
|
1909
|
+
});
|
|
1910
|
+
// ============================================================================
|
|
1462
1911
|
// JSON Schema Conversion Functions
|
|
1463
1912
|
// ============================================================================
|
|
1464
1913
|
/**
|
|
1465
|
-
*
|
|
1914
|
+
* Converts Marketing API Effect-backed schemas to JSON Schema format for MCP tools.
|
|
1915
|
+
*
|
|
1916
|
+
* @returns Marketing API JSON schemas keyed by endpoint or shared model name.
|
|
1917
|
+
* @example
|
|
1918
|
+
* ```ts
|
|
1919
|
+
* const schemas = getMarketingJsonSchemas();
|
|
1920
|
+
* ```
|
|
1466
1921
|
*/
|
|
1467
|
-
export
|
|
1922
|
+
export const getMarketingJsonSchemas = () => {
|
|
1468
1923
|
return {
|
|
1469
1924
|
// Campaign Management
|
|
1470
1925
|
getCampaignsOutput: zodToJsonSchema(campaignPagedCollectionResponseSchema, 'getCampaignsOutput'),
|
|
@@ -1562,4 +2017,4 @@ export function getMarketingJsonSchemas() {
|
|
|
1562
2017
|
error: zodToJsonSchema(errorSchema, 'error'),
|
|
1563
2018
|
amount: zodToJsonSchema(amountSchema, 'amount'),
|
|
1564
2019
|
};
|
|
1565
|
-
}
|
|
2020
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { z } from '
|
|
1
|
+
import { z } from '../../utils/effectSchema.js';
|
|
2
2
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
3
|
/**
|
|
4
4
|
* Metadata API Schemas
|
|
5
5
|
*
|
|
6
|
-
* This file contains
|
|
6
|
+
* This file contains Effect-backed schemas for all Metadata API endpoints.
|
|
7
7
|
* Schemas are organized by endpoint and include both input and output validation.
|
|
8
8
|
*/
|
|
9
9
|
// ============================================================================
|
|
@@ -748,10 +748,15 @@ export const salesTaxJurisdictionsSchema = z.object({
|
|
|
748
748
|
// JSON Schema Conversion Function
|
|
749
749
|
// ============================================================================
|
|
750
750
|
/**
|
|
751
|
-
* Generates JSON schemas for all Metadata API endpoints
|
|
752
|
-
*
|
|
751
|
+
* Generates JSON schemas for all Metadata API endpoints.
|
|
752
|
+
*
|
|
753
|
+
* @returns Metadata API JSON schemas keyed by endpoint or shared model name.
|
|
754
|
+
* @example
|
|
755
|
+
* ```ts
|
|
756
|
+
* const schemas = getMetadataJsonSchemas();
|
|
757
|
+
* ```
|
|
753
758
|
*/
|
|
754
|
-
export
|
|
759
|
+
export const getMetadataJsonSchemas = () => {
|
|
755
760
|
return {
|
|
756
761
|
// Marketplace Policies
|
|
757
762
|
automotivePartsCompatibilityPolicy: zodToJsonSchema(automotivePartsCompatibilityPolicySchema, 'automotivePartsCompatibilityPolicy'),
|
|
@@ -828,4 +833,4 @@ export function getMetadataJsonSchemas() {
|
|
|
828
833
|
amount: zodToJsonSchema(amountSchema, 'amount'),
|
|
829
834
|
timeDuration: zodToJsonSchema(timeDurationSchema, 'timeDuration'),
|
|
830
835
|
};
|
|
831
|
-
}
|
|
836
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from '../../utils/effectSchema.js';
|
|
2
|
+
/**
|
|
3
|
+
* Finding API Schemas
|
|
4
|
+
*
|
|
5
|
+
* Effect-backed input schemas for sold/completed listing search tools.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Validates input for ebay_find_completed_items (Finding API findCompletedItems).
|
|
9
|
+
*/
|
|
10
|
+
export const findCompletedItemsInputSchema = z.object({
|
|
11
|
+
keywords: z
|
|
12
|
+
.string()
|
|
13
|
+
.min(1)
|
|
14
|
+
.describe('Search keywords for sold/completed listings (e.g. "iphone 14 pro 256")'),
|
|
15
|
+
maxResults: z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.positive()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('Maximum sold items to return (1–100). Defaults to 20.'),
|
|
21
|
+
daysBack: z
|
|
22
|
+
.number()
|
|
23
|
+
.int()
|
|
24
|
+
.positive()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('Only include items that ended within this many days (1–90).'),
|
|
27
|
+
});
|