ebay-mcp-remote-edition 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +755 -0
- package/build/api/account-management/account.js +301 -0
- package/build/api/analytics-and-report/analytics.js +102 -0
- package/build/api/client-trading.js +96 -0
- package/build/api/client.js +173 -0
- package/build/api/communication/feedback.js +119 -0
- package/build/api/communication/message.js +131 -0
- package/build/api/communication/negotiation.js +97 -0
- package/build/api/communication/notification.js +373 -0
- package/build/api/developer/developer.js +81 -0
- package/build/api/index.js +109 -0
- package/build/api/listing-management/inventory.js +640 -0
- package/build/api/listing-metadata/metadata.js +485 -0
- package/build/api/listing-metadata/taxonomy.js +58 -0
- package/build/api/marketing-and-promotions/marketing.js +768 -0
- package/build/api/marketing-and-promotions/recommendation.js +32 -0
- package/build/api/order-management/dispute.js +69 -0
- package/build/api/order-management/fulfillment.js +89 -0
- package/build/api/other/compliance.js +47 -0
- package/build/api/other/edelivery.js +219 -0
- package/build/api/other/identity.js +24 -0
- package/build/api/other/translation.js +22 -0
- package/build/api/other/vero.js +48 -0
- package/build/api/trading/trading.js +78 -0
- package/build/auth/kv-store.js +40 -0
- package/build/auth/multi-user-store.js +120 -0
- package/build/auth/oauth-metadata.js +59 -0
- package/build/auth/oauth-middleware.js +99 -0
- package/build/auth/oauth-types.js +4 -0
- package/build/auth/oauth.js +235 -0
- package/build/auth/scope-utils.js +304 -0
- package/build/auth/token-store.js +46 -0
- package/build/auth/token-verifier.js +172 -0
- package/build/config/environment.js +297 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +129 -0
- package/build/schemas/account-management/account.js +375 -0
- package/build/schemas/analytics/analytics.js +191 -0
- package/build/schemas/communication/messages.js +345 -0
- package/build/schemas/fulfillment/orders.js +338 -0
- package/build/schemas/index.js +68 -0
- package/build/schemas/inventory-management/inventory.js +471 -0
- package/build/schemas/marketing/marketing.js +1103 -0
- package/build/schemas/metadata/metadata.js +618 -0
- package/build/schemas/other/other-apis.js +390 -0
- package/build/schemas/taxonomy/taxonomy.js +575 -0
- package/build/scripts/auto-setup.js +364 -0
- package/build/scripts/dev-sync.js +512 -0
- package/build/scripts/diagnostics.js +301 -0
- package/build/scripts/download-specs.js +116 -0
- package/build/scripts/interactive-setup.js +757 -0
- package/build/scripts/setup.js +1515 -0
- package/build/scripts/update-api-status-doc.js +44 -0
- package/build/server-http.d.ts +1 -0
- package/build/server-http.js +581 -0
- package/build/tools/definitions/account-with-schemas.js +170 -0
- package/build/tools/definitions/account.js +428 -0
- package/build/tools/definitions/analytics.js +66 -0
- package/build/tools/definitions/communication.js +394 -0
- package/build/tools/definitions/developer.js +195 -0
- package/build/tools/definitions/fulfillment.js +326 -0
- package/build/tools/definitions/index.js +41 -0
- package/build/tools/definitions/inventory.js +464 -0
- package/build/tools/definitions/marketing.js +1486 -0
- package/build/tools/definitions/metadata.js +188 -0
- package/build/tools/definitions/other.js +309 -0
- package/build/tools/definitions/taxonomy.js +64 -0
- package/build/tools/definitions/token-management.js +148 -0
- package/build/tools/definitions/trading.js +71 -0
- package/build/tools/index.js +1200 -0
- package/build/tools/schemas.js +667 -0
- package/build/tools/tool-definitions.js +3534 -0
- package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
- package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
- package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
- package/build/types/ebay-enums.js +1330 -0
- package/build/types/ebay.js +123 -0
- package/build/types/index.js +10 -0
- package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
- package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
- package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
- package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
- package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
- package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
- package/build/utils/account-management/account.js +831 -0
- package/build/utils/api-status-feed.js +83 -0
- package/build/utils/communication/feedback.js +216 -0
- package/build/utils/communication/message.js +242 -0
- package/build/utils/communication/negotiation.js +150 -0
- package/build/utils/communication/notification.js +369 -0
- package/build/utils/date-converter.js +160 -0
- package/build/utils/llm-client-detector.js +758 -0
- package/build/utils/logger.js +198 -0
- package/build/utils/oauth-helper.js +315 -0
- package/build/utils/order-management/dispute.js +369 -0
- package/build/utils/order-management/fulfillment.js +205 -0
- package/build/utils/other/compliance.js +76 -0
- package/build/utils/other/edelivery.js +241 -0
- package/build/utils/other/identity.js +13 -0
- package/build/utils/other/translation.js +41 -0
- package/build/utils/other/vero.js +90 -0
- package/build/utils/scope-helper.js +207 -0
- package/build/utils/security-checker.js +248 -0
- package/build/utils/setup-validator.js +305 -0
- package/build/utils/token-utils.js +40 -0
- package/build/utils/version.js +56 -0
- package/docs/auth/production_scopes.json +111 -0
- package/docs/auth/sandbox_scopes.json +142 -0
- package/package.json +122 -0
- package/public/icons/1024x1024.png +0 -0
- package/public/icons/128x128.png +0 -0
- package/public/icons/16x16.png +0 -0
- package/public/icons/256x256.png +0 -0
- package/public/icons/32x32.png +0 -0
- package/public/icons/48x48.png +0 -0
- package/public/icons/512x512.png +0 -0
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
|
+
/**
|
|
4
|
+
* Taxonomy/Metadata API Schemas
|
|
5
|
+
*
|
|
6
|
+
* This file contains Zod schemas for the Sell Metadata API (Taxonomy section).
|
|
7
|
+
* Schemas are organized by policy type and include category-related metadata.
|
|
8
|
+
*/
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// Common Schemas
|
|
11
|
+
// ============================================================================
|
|
12
|
+
const errorParameterSchema = z.object({
|
|
13
|
+
name: z.string().optional(),
|
|
14
|
+
value: z.string().optional(),
|
|
15
|
+
});
|
|
16
|
+
const errorSchema = z.object({
|
|
17
|
+
category: z.string().optional(),
|
|
18
|
+
domain: z.string().optional(),
|
|
19
|
+
errorId: z.number().int().optional(),
|
|
20
|
+
inputRefIds: z.array(z.string()).optional(),
|
|
21
|
+
longMessage: z.string().optional(),
|
|
22
|
+
message: z.string().optional(),
|
|
23
|
+
outputRefIds: z.array(z.string()).optional(),
|
|
24
|
+
parameters: z.array(errorParameterSchema).optional(),
|
|
25
|
+
subdomain: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
const amountSchema = z.object({
|
|
28
|
+
currency: z.string().optional(),
|
|
29
|
+
value: z.string().optional(),
|
|
30
|
+
});
|
|
31
|
+
const timeDurationSchema = z.object({
|
|
32
|
+
unit: z.string().optional(),
|
|
33
|
+
value: z.number().int().optional(),
|
|
34
|
+
});
|
|
35
|
+
// ============================================================================
|
|
36
|
+
// Category Policy Schemas
|
|
37
|
+
// ============================================================================
|
|
38
|
+
const categoryPolicySchema = z.object({
|
|
39
|
+
autoPayEnabled: z.boolean().optional(),
|
|
40
|
+
b2bVatEnabled: z.boolean().optional(),
|
|
41
|
+
categoryId: z.string().optional(),
|
|
42
|
+
categoryTreeId: z.string().optional(),
|
|
43
|
+
eanSupport: z.string().optional(),
|
|
44
|
+
expired: z.boolean().optional(),
|
|
45
|
+
intangibleEnabled: z.boolean().optional(),
|
|
46
|
+
isbnSupport: z.string().optional(),
|
|
47
|
+
lsd: z.boolean().optional(),
|
|
48
|
+
minimumReservePrice: z.number().optional(),
|
|
49
|
+
orpa: z.boolean().optional(),
|
|
50
|
+
orra: z.boolean().optional(),
|
|
51
|
+
paymentMethods: z.array(z.string()).optional(),
|
|
52
|
+
reduceReserveAllowed: z.boolean().optional(),
|
|
53
|
+
upcSupport: z.string().optional(),
|
|
54
|
+
valueCategory: z.boolean().optional(),
|
|
55
|
+
virtual: z.boolean().optional(),
|
|
56
|
+
});
|
|
57
|
+
const categoryPolicyResponseSchema = z.object({
|
|
58
|
+
categoryPolicies: z.array(categoryPolicySchema).optional(),
|
|
59
|
+
warnings: z.array(errorSchema).optional(),
|
|
60
|
+
});
|
|
61
|
+
// ============================================================================
|
|
62
|
+
// Item Condition Policy Schemas
|
|
63
|
+
// ============================================================================
|
|
64
|
+
const itemConditionDescriptorValueConstraintSchema = z.object({
|
|
65
|
+
applicableToConditionDescriptorId: z.string().optional(),
|
|
66
|
+
applicableToConditionDescriptorValueIds: z.array(z.string()).optional(),
|
|
67
|
+
});
|
|
68
|
+
const itemConditionDescriptorValueSchema = z.object({
|
|
69
|
+
conditionDescriptorValueAdditionalHelpText: z.array(z.string()).optional(),
|
|
70
|
+
conditionDescriptorValueConstraints: z
|
|
71
|
+
.array(itemConditionDescriptorValueConstraintSchema)
|
|
72
|
+
.optional(),
|
|
73
|
+
conditionDescriptorValueHelpText: z.string().optional(),
|
|
74
|
+
conditionDescriptorValueId: z.string().optional(),
|
|
75
|
+
conditionDescriptorValueName: z.string().optional(),
|
|
76
|
+
});
|
|
77
|
+
const itemConditionDescriptorConstraintSchema = z.object({
|
|
78
|
+
applicableToConditionDescriptorIds: z.array(z.string()).optional(),
|
|
79
|
+
cardinality: z.string().optional(),
|
|
80
|
+
defaultConditionDescriptorValueId: z.string().optional(),
|
|
81
|
+
maxLength: z.number().int().optional(),
|
|
82
|
+
mode: z.string().optional(),
|
|
83
|
+
usage: z.string().optional(),
|
|
84
|
+
});
|
|
85
|
+
const itemConditionDescriptorSchema = z.object({
|
|
86
|
+
conditionDescriptorConstraint: itemConditionDescriptorConstraintSchema.optional(),
|
|
87
|
+
conditionDescriptorHelpText: z.string().optional(),
|
|
88
|
+
conditionDescriptorId: z.string().optional(),
|
|
89
|
+
conditionDescriptorName: z.string().optional(),
|
|
90
|
+
conditionDescriptorValues: z.array(itemConditionDescriptorValueSchema).optional(),
|
|
91
|
+
});
|
|
92
|
+
const itemConditionSchema = z.object({
|
|
93
|
+
conditionDescription: z.string().optional(),
|
|
94
|
+
conditionDescriptors: z.array(itemConditionDescriptorSchema).optional(),
|
|
95
|
+
conditionHelpText: z.string().optional(),
|
|
96
|
+
conditionId: z.string().optional(),
|
|
97
|
+
usage: z.string().optional(),
|
|
98
|
+
});
|
|
99
|
+
const itemConditionPolicySchema = z.object({
|
|
100
|
+
categoryId: z.string().optional(),
|
|
101
|
+
categoryTreeId: z.string().optional(),
|
|
102
|
+
itemConditionRequired: z.boolean().optional(),
|
|
103
|
+
itemConditions: z.array(itemConditionSchema).optional(),
|
|
104
|
+
});
|
|
105
|
+
const itemConditionPolicyResponseSchema = z.object({
|
|
106
|
+
itemConditionPolicies: z.array(itemConditionPolicySchema).optional(),
|
|
107
|
+
warnings: z.array(errorSchema).optional(),
|
|
108
|
+
});
|
|
109
|
+
// ============================================================================
|
|
110
|
+
// Return Policy Schemas
|
|
111
|
+
// ============================================================================
|
|
112
|
+
const returnPolicyDetailsSchema = z.object({
|
|
113
|
+
policyDescriptionEnabled: z.boolean().optional(),
|
|
114
|
+
refundMethods: z.array(z.string()).optional(),
|
|
115
|
+
returnMethods: z.array(z.string()).optional(),
|
|
116
|
+
returnPeriods: z.array(timeDurationSchema).optional(),
|
|
117
|
+
returnsAcceptanceEnabled: z.boolean().optional(),
|
|
118
|
+
returnShippingCostPayers: z.array(z.string()).optional(),
|
|
119
|
+
});
|
|
120
|
+
const returnPolicySchema = z.object({
|
|
121
|
+
categoryId: z.string().optional(),
|
|
122
|
+
categoryTreeId: z.string().optional(),
|
|
123
|
+
domestic: returnPolicyDetailsSchema.optional(),
|
|
124
|
+
international: returnPolicyDetailsSchema.optional(),
|
|
125
|
+
required: z.boolean().optional(),
|
|
126
|
+
});
|
|
127
|
+
const returnPolicyResponseSchema = z.object({
|
|
128
|
+
returnPolicies: z.array(returnPolicySchema).optional(),
|
|
129
|
+
warnings: z.array(errorSchema).optional(),
|
|
130
|
+
});
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// Listing Structure Policy Schemas
|
|
133
|
+
// ============================================================================
|
|
134
|
+
const listingStructurePolicySchema = z.object({
|
|
135
|
+
categoryId: z.string().optional(),
|
|
136
|
+
categoryTreeId: z.string().optional(),
|
|
137
|
+
variationsSupported: z.boolean().optional(),
|
|
138
|
+
});
|
|
139
|
+
const listingStructurePolicyResponseSchema = z.object({
|
|
140
|
+
listingStructurePolicies: z.array(listingStructurePolicySchema).optional(),
|
|
141
|
+
warnings: z.array(errorSchema).optional(),
|
|
142
|
+
});
|
|
143
|
+
// ============================================================================
|
|
144
|
+
// Listing Type Policy Schemas
|
|
145
|
+
// ============================================================================
|
|
146
|
+
const listingDurationSchema = z.object({
|
|
147
|
+
durationValues: z.array(z.string()).optional(),
|
|
148
|
+
listingType: z.string().optional(),
|
|
149
|
+
});
|
|
150
|
+
const listingTypePolicySchema = z.object({
|
|
151
|
+
categoryId: z.string().optional(),
|
|
152
|
+
categoryTreeId: z.string().optional(),
|
|
153
|
+
digitalGoodDeliveryEnabled: z.boolean().optional(),
|
|
154
|
+
listingDurations: z.array(listingDurationSchema).optional(),
|
|
155
|
+
pickupDropOffEnabled: z.boolean().optional(),
|
|
156
|
+
});
|
|
157
|
+
const listingTypePoliciesResponseSchema = z.object({
|
|
158
|
+
listingTypePolicies: z.array(listingTypePolicySchema).optional(),
|
|
159
|
+
warnings: z.array(errorSchema).optional(),
|
|
160
|
+
});
|
|
161
|
+
// ============================================================================
|
|
162
|
+
// Negotiated Price Policy Schemas
|
|
163
|
+
// ============================================================================
|
|
164
|
+
const negotiatedPricePolicySchema = z.object({
|
|
165
|
+
bestOfferAutoAcceptEnabled: z.boolean().optional(),
|
|
166
|
+
bestOfferAutoDeclineEnabled: z.boolean().optional(),
|
|
167
|
+
bestOfferCounterEnabled: z.boolean().optional(),
|
|
168
|
+
categoryId: z.string().optional(),
|
|
169
|
+
categoryTreeId: z.string().optional(),
|
|
170
|
+
});
|
|
171
|
+
const negotiatedPricePolicyResponseSchema = z.object({
|
|
172
|
+
negotiatedPricePolicies: z.array(negotiatedPricePolicySchema).optional(),
|
|
173
|
+
warnings: z.array(errorSchema).optional(),
|
|
174
|
+
});
|
|
175
|
+
// ============================================================================
|
|
176
|
+
// Shipping Policy Schemas
|
|
177
|
+
// ============================================================================
|
|
178
|
+
const shippingPolicySchema = z.object({
|
|
179
|
+
categoryId: z.string().optional(),
|
|
180
|
+
categoryTreeId: z.string().optional(),
|
|
181
|
+
globalShippingEnabled: z.boolean().optional(),
|
|
182
|
+
group1MaxFlatShippingCost: amountSchema.optional(),
|
|
183
|
+
group2MaxFlatShippingCost: amountSchema.optional(),
|
|
184
|
+
group3MaxFlatShippingCost: amountSchema.optional(),
|
|
185
|
+
handlingTimeEnabled: z.boolean().optional(),
|
|
186
|
+
maxFlatShippingCost: amountSchema.optional(),
|
|
187
|
+
shippingTermsRequired: z.boolean().optional(),
|
|
188
|
+
});
|
|
189
|
+
const shippingPoliciesResponseSchema = z.object({
|
|
190
|
+
shippingPolicies: z.array(shippingPolicySchema).optional(),
|
|
191
|
+
warnings: z.array(errorSchema).optional(),
|
|
192
|
+
});
|
|
193
|
+
// ============================================================================
|
|
194
|
+
// Automotive Parts Compatibility Policy Schemas
|
|
195
|
+
// ============================================================================
|
|
196
|
+
const automotivePartsCompatibilityPolicySchema = z.object({
|
|
197
|
+
categoryId: z.string().optional(),
|
|
198
|
+
categoryTreeId: z.string().optional(),
|
|
199
|
+
compatibilityBasedOn: z.string().optional(),
|
|
200
|
+
compatibleVehicleTypes: z.array(z.string()).optional(),
|
|
201
|
+
maxNumberOfCompatibleVehicles: z.number().int().optional(),
|
|
202
|
+
});
|
|
203
|
+
const automotivePartsCompatibilityPolicyResponseSchema = z.object({
|
|
204
|
+
automotivePartsCompatibilityPolicies: z
|
|
205
|
+
.array(automotivePartsCompatibilityPolicySchema)
|
|
206
|
+
.optional(),
|
|
207
|
+
warnings: z.array(errorSchema).optional(),
|
|
208
|
+
});
|
|
209
|
+
// ============================================================================
|
|
210
|
+
// Classified Ad Policy Schemas
|
|
211
|
+
// ============================================================================
|
|
212
|
+
const classifiedAdPolicySchema = z.object({
|
|
213
|
+
adFormatEnabled: z.string().optional(),
|
|
214
|
+
categoryId: z.string().optional(),
|
|
215
|
+
categoryTreeId: z.string().optional(),
|
|
216
|
+
classifiedAdAutoAcceptEnabled: z.boolean().optional(),
|
|
217
|
+
classifiedAdAutoDeclineEnabled: z.boolean().optional(),
|
|
218
|
+
classifiedAdBestOfferEnabled: z.string().optional(),
|
|
219
|
+
classifiedAdCompanyNameEnabled: z.boolean().optional(),
|
|
220
|
+
classifiedAdContactByAddressEnabled: z.boolean().optional(),
|
|
221
|
+
classifiedAdContactByEmailEnabled: z.boolean().optional(),
|
|
222
|
+
classifiedAdContactByPhoneEnabled: z.boolean().optional(),
|
|
223
|
+
classifiedAdCounterOfferEnabled: z.boolean().optional(),
|
|
224
|
+
classifiedAdPaymentMethodEnabled: z.string().optional(),
|
|
225
|
+
classifiedAdPhoneCount: z.number().int().optional(),
|
|
226
|
+
classifiedAdShippingMethodEnabled: z.boolean().optional(),
|
|
227
|
+
classifiedAdStreetCount: z.number().int().optional(),
|
|
228
|
+
sellerContactDetailsEnabled: z.boolean().optional(),
|
|
229
|
+
});
|
|
230
|
+
const classifiedAdPolicyResponseSchema = z.object({
|
|
231
|
+
classifiedAdPolicies: z.array(classifiedAdPolicySchema).optional(),
|
|
232
|
+
warnings: z.array(errorSchema).optional(),
|
|
233
|
+
});
|
|
234
|
+
// ============================================================================
|
|
235
|
+
// Motors Listing Policy Schemas
|
|
236
|
+
// ============================================================================
|
|
237
|
+
const localListingDistanceSchema = z.object({
|
|
238
|
+
distances: z.array(z.number()).optional(),
|
|
239
|
+
distanceType: z.string().optional(),
|
|
240
|
+
});
|
|
241
|
+
const motorsListingPolicySchema = z.object({
|
|
242
|
+
categoryId: z.string().optional(),
|
|
243
|
+
categoryTreeId: z.string().optional(),
|
|
244
|
+
depositSupported: z.boolean().optional(),
|
|
245
|
+
ebayMotorsProAdFormatEnabled: z.string().optional(),
|
|
246
|
+
ebayMotorsProAutoAcceptEnabled: z.boolean().optional(),
|
|
247
|
+
ebayMotorsProAutoDeclineEnabled: z.boolean().optional(),
|
|
248
|
+
ebayMotorsProBestOfferEnabled: z.string().optional(),
|
|
249
|
+
ebayMotorsProCompanyNameEnabled: z.boolean().optional(),
|
|
250
|
+
ebayMotorsProContactByAddressEnabled: z.boolean().optional(),
|
|
251
|
+
ebayMotorsProContactByEmailEnabled: z.boolean().optional(),
|
|
252
|
+
ebayMotorsProContactByPhoneEnabled: z.boolean().optional(),
|
|
253
|
+
ebayMotorsProCounterOfferEnabled: z.boolean().optional(),
|
|
254
|
+
ebayMotorsProPaymentMethodCheckOutEnabled: z.string().optional(),
|
|
255
|
+
ebayMotorsProPhoneCount: z.number().int().optional(),
|
|
256
|
+
ebayMotorsProSellerContactDetailsEnabled: z.boolean().optional(),
|
|
257
|
+
ebayMotorsProShippingMethodEnabled: z.boolean().optional(),
|
|
258
|
+
ebayMotorsProStreetCount: z.number().int().optional(),
|
|
259
|
+
epidSupported: z.boolean().optional(),
|
|
260
|
+
kTypeSupported: z.boolean().optional(),
|
|
261
|
+
localListingDistances: z.array(localListingDistanceSchema).optional(),
|
|
262
|
+
localMarketAdFormatEnabled: z.string().optional(),
|
|
263
|
+
localMarketAutoAcceptEnabled: z.boolean().optional(),
|
|
264
|
+
localMarketAutoDeclineEnabled: z.boolean().optional(),
|
|
265
|
+
localMarketBestOfferEnabled: z.string().optional(),
|
|
266
|
+
localMarketCompanyNameEnabled: z.boolean().optional(),
|
|
267
|
+
localMarketContactByAddressEnabled: z.boolean().optional(),
|
|
268
|
+
localMarketContactByEmailEnabled: z.boolean().optional(),
|
|
269
|
+
localMarketContactByPhoneEnabled: z.boolean().optional(),
|
|
270
|
+
localMarketCounterOfferEnabled: z.boolean().optional(),
|
|
271
|
+
localMarketNonSubscription: z.boolean().optional(),
|
|
272
|
+
localMarketPaymentMethodCheckOutEnabled: z.string().optional(),
|
|
273
|
+
localMarketPhoneCount: z.number().int().optional(),
|
|
274
|
+
localMarketPremiumSubscription: z.boolean().optional(),
|
|
275
|
+
localMarketRegularSubscription: z.boolean().optional(),
|
|
276
|
+
localMarketSellerContactDetailsEnabled: z.boolean().optional(),
|
|
277
|
+
localMarketShippingMethodEnabled: z.boolean().optional(),
|
|
278
|
+
localMarketSpecialitySubscription: z.boolean().optional(),
|
|
279
|
+
localMarketStreetCount: z.number().int().optional(),
|
|
280
|
+
maxGranularFitmentCount: z.number().int().optional(),
|
|
281
|
+
maxItemCompatibility: z.number().int().optional(),
|
|
282
|
+
minItemCompatibility: z.number().int().optional(),
|
|
283
|
+
nonSubscription: z.string().optional(),
|
|
284
|
+
premiumSubscription: z.string().optional(),
|
|
285
|
+
regularSubscription: z.string().optional(),
|
|
286
|
+
sellerProvidedTitleSupported: z.boolean().optional(),
|
|
287
|
+
specialitySubscription: z.string().optional(),
|
|
288
|
+
vinSupported: z.boolean().optional(),
|
|
289
|
+
vrmSupported: z.boolean().optional(),
|
|
290
|
+
});
|
|
291
|
+
const motorsListingPoliciesResponseSchema = z.object({
|
|
292
|
+
motorsListingPolicies: z.array(motorsListingPolicySchema).optional(),
|
|
293
|
+
warnings: z.array(errorSchema).optional(),
|
|
294
|
+
});
|
|
295
|
+
// ============================================================================
|
|
296
|
+
// Currency Schemas
|
|
297
|
+
// ============================================================================
|
|
298
|
+
const currencySchema = z.object({
|
|
299
|
+
code: z.string().optional(),
|
|
300
|
+
description: z.string().optional(),
|
|
301
|
+
});
|
|
302
|
+
const getCurrenciesResponseSchema = z.object({
|
|
303
|
+
defaultCurrency: currencySchema.optional(),
|
|
304
|
+
marketplaceId: z.string().optional(),
|
|
305
|
+
});
|
|
306
|
+
// ============================================================================
|
|
307
|
+
// Extended Producer Responsibility Schemas
|
|
308
|
+
// ============================================================================
|
|
309
|
+
const extendedProducerResponsibilitySchema = z.object({
|
|
310
|
+
enabledForVariations: z.boolean().optional(),
|
|
311
|
+
name: z.string().optional(),
|
|
312
|
+
usage: z.string().optional(),
|
|
313
|
+
});
|
|
314
|
+
const extendedProducerResponsibilityPolicySchema = z.object({
|
|
315
|
+
categoryId: z.string().optional(),
|
|
316
|
+
categoryTreeId: z.string().optional(),
|
|
317
|
+
supportedAttributes: z.array(extendedProducerResponsibilitySchema).optional(),
|
|
318
|
+
});
|
|
319
|
+
const extendedProducerResponsibilityPolicyResponseSchema = z.object({
|
|
320
|
+
extendedProducerResponsibilities: z.array(extendedProducerResponsibilityPolicySchema).optional(),
|
|
321
|
+
warnings: z.array(errorSchema).optional(),
|
|
322
|
+
});
|
|
323
|
+
// ============================================================================
|
|
324
|
+
// Hazardous Materials Label Schemas
|
|
325
|
+
// ============================================================================
|
|
326
|
+
const signalWordSchema = z.object({
|
|
327
|
+
signalWordId: z.string().optional(),
|
|
328
|
+
signalWordDescription: z.string().optional(),
|
|
329
|
+
});
|
|
330
|
+
const hazardStatementSchema = z.object({
|
|
331
|
+
statementId: z.string().optional(),
|
|
332
|
+
statementDescription: z.string().optional(),
|
|
333
|
+
});
|
|
334
|
+
const pictogramSchema = z.object({
|
|
335
|
+
pictogramId: z.string().optional(),
|
|
336
|
+
pictogramDescription: z.string().optional(),
|
|
337
|
+
pictogramUrl: z.string().optional(),
|
|
338
|
+
});
|
|
339
|
+
const hazardousMaterialDetailsResponseSchema = z.object({
|
|
340
|
+
signalWords: z.array(signalWordSchema).optional(),
|
|
341
|
+
statements: z.array(hazardStatementSchema).optional(),
|
|
342
|
+
pictograms: z.array(pictogramSchema).optional(),
|
|
343
|
+
});
|
|
344
|
+
// ============================================================================
|
|
345
|
+
// Product Safety Label Schemas
|
|
346
|
+
// ============================================================================
|
|
347
|
+
const productSafetyLabelPictogramSchema = z.object({
|
|
348
|
+
pictogramDescription: z.string().optional(),
|
|
349
|
+
pictogramId: z.string().optional(),
|
|
350
|
+
pictogramUrl: z.string().optional(),
|
|
351
|
+
});
|
|
352
|
+
const productSafetyLabelStatementSchema = z.object({
|
|
353
|
+
statementDescription: z.string().optional(),
|
|
354
|
+
statementId: z.string().optional(),
|
|
355
|
+
});
|
|
356
|
+
const productSafetyLabelsResponseSchema = z.object({
|
|
357
|
+
pictograms: z.array(productSafetyLabelPictogramSchema).optional(),
|
|
358
|
+
statements: z.array(productSafetyLabelStatementSchema).optional(),
|
|
359
|
+
});
|
|
360
|
+
// ============================================================================
|
|
361
|
+
// Regulatory Policy Schemas
|
|
362
|
+
// ============================================================================
|
|
363
|
+
const regulatoryAttributeSchema = z.object({
|
|
364
|
+
name: z.string().optional(),
|
|
365
|
+
usage: z.string().optional(),
|
|
366
|
+
});
|
|
367
|
+
const regulatoryPolicySchema = z.object({
|
|
368
|
+
categoryId: z.string().optional(),
|
|
369
|
+
categoryTreeId: z.string().optional(),
|
|
370
|
+
supportedAttributes: z.array(regulatoryAttributeSchema).optional(),
|
|
371
|
+
});
|
|
372
|
+
const regulatoryPolicyResponseSchema = z.object({
|
|
373
|
+
regulatoryPolicies: z.array(regulatoryPolicySchema).optional(),
|
|
374
|
+
warnings: z.array(errorSchema).optional(),
|
|
375
|
+
});
|
|
376
|
+
// ============================================================================
|
|
377
|
+
// Site Visibility Policy Schemas
|
|
378
|
+
// ============================================================================
|
|
379
|
+
const siteVisibilityPolicySchema = z.object({
|
|
380
|
+
categoryId: z.string().optional(),
|
|
381
|
+
categoryTreeId: z.string().optional(),
|
|
382
|
+
crossBorderTradeAustraliaEnabled: z.boolean().optional(),
|
|
383
|
+
crossBorderTradeGBEnabled: z.boolean().optional(),
|
|
384
|
+
crossBorderTradeNorthAmericaEnabled: z.boolean().optional(),
|
|
385
|
+
});
|
|
386
|
+
const siteVisibilityPoliciesResponseSchema = z.object({
|
|
387
|
+
siteVisibilityPolicies: z.array(siteVisibilityPolicySchema).optional(),
|
|
388
|
+
warnings: z.array(errorSchema).optional(),
|
|
389
|
+
});
|
|
390
|
+
// ============================================================================
|
|
391
|
+
// Compatibility Schemas
|
|
392
|
+
// ============================================================================
|
|
393
|
+
const compatibilityDetailsSchema = z.object({
|
|
394
|
+
propertyName: z.string().optional(),
|
|
395
|
+
propertyValue: z.string().optional(),
|
|
396
|
+
});
|
|
397
|
+
const compatibilitySchema = z.object({
|
|
398
|
+
compatibilityDetails: z.array(compatibilityDetailsSchema).optional(),
|
|
399
|
+
});
|
|
400
|
+
const propertyFilterInnerSchema = z.object({
|
|
401
|
+
propertyName: z.string().optional(),
|
|
402
|
+
propertyValue: z.string().optional(),
|
|
403
|
+
unitOfMeasurement: z.string().optional(),
|
|
404
|
+
url: z.string().optional(),
|
|
405
|
+
});
|
|
406
|
+
const propertyNamesResponsePropertyNameMetadataSchema = z.object({
|
|
407
|
+
displaySequence: z.number().int().optional(),
|
|
408
|
+
});
|
|
409
|
+
const propertyNamesResponsePropertyNamesSchema = z.object({
|
|
410
|
+
propertyDisplayName: z.string().optional(),
|
|
411
|
+
propertyName: z.string().optional(),
|
|
412
|
+
propertyNameMetadata: propertyNamesResponsePropertyNameMetadataSchema.optional(),
|
|
413
|
+
});
|
|
414
|
+
const propertyNamesResponsePropertiesSchema = z.object({
|
|
415
|
+
dataset: z.string().optional(),
|
|
416
|
+
propertyNames: z.array(propertyNamesResponsePropertyNamesSchema).optional(),
|
|
417
|
+
});
|
|
418
|
+
const propertyNamesResponseSchema = z.object({
|
|
419
|
+
categoryId: z.string().optional(),
|
|
420
|
+
properties: z.array(propertyNamesResponsePropertiesSchema).optional(),
|
|
421
|
+
});
|
|
422
|
+
const propertyValuesResponseSchema = z.object({
|
|
423
|
+
metadataVersion: z.string().optional(),
|
|
424
|
+
propertyName: z.string().optional(),
|
|
425
|
+
propertyValues: z.array(z.string()).optional(),
|
|
426
|
+
});
|
|
427
|
+
const multiCompatibilityPropertyValuesResponseSchema = z.object({
|
|
428
|
+
compatibilities: z.array(compatibilitySchema).optional(),
|
|
429
|
+
metadataVersion: z.string().optional(),
|
|
430
|
+
});
|
|
431
|
+
const paginationSchema = z.object({
|
|
432
|
+
count: z.number().int().optional(),
|
|
433
|
+
limit: z.number().int().optional(),
|
|
434
|
+
offset: z.number().int().optional(),
|
|
435
|
+
total: z.number().int().optional(),
|
|
436
|
+
});
|
|
437
|
+
const paginationInputSchema = z.object({
|
|
438
|
+
limit: z.number().int().optional(),
|
|
439
|
+
offset: z.number().int().optional(),
|
|
440
|
+
});
|
|
441
|
+
const productIdentifierSchema = z.object({
|
|
442
|
+
ean: z.string().optional(),
|
|
443
|
+
epid: z.string().optional(),
|
|
444
|
+
isbn: z.string().optional(),
|
|
445
|
+
productId: z.string().optional(),
|
|
446
|
+
upc: z.string().optional(),
|
|
447
|
+
});
|
|
448
|
+
const propertyValuesSchema = z.object({
|
|
449
|
+
propertyName: z.string().optional(),
|
|
450
|
+
propertyValue: z.string().optional(),
|
|
451
|
+
});
|
|
452
|
+
const productResponseCompatibilityDetailsSchema = z.object({
|
|
453
|
+
noteDetails: z.array(propertyFilterInnerSchema).optional(),
|
|
454
|
+
productDetails: z.array(propertyValuesSchema).optional(),
|
|
455
|
+
});
|
|
456
|
+
const productResponseSchema = z.object({
|
|
457
|
+
compatibilityDetails: z.array(productResponseCompatibilityDetailsSchema).optional(),
|
|
458
|
+
pagination: paginationSchema.optional(),
|
|
459
|
+
});
|
|
460
|
+
const specificationResponseSchema = z.object({
|
|
461
|
+
compatibilityDetails: z.array(compatibilitySchema).optional(),
|
|
462
|
+
pagination: paginationSchema.optional(),
|
|
463
|
+
});
|
|
464
|
+
// ============================================================================
|
|
465
|
+
// Input Schemas
|
|
466
|
+
// ============================================================================
|
|
467
|
+
const propertyNamesRequestSchema = z.object({
|
|
468
|
+
categoryId: z.string().optional(),
|
|
469
|
+
dataset: z.array(z.string()).optional(),
|
|
470
|
+
});
|
|
471
|
+
const propertyValuesRequestSchema = z.object({
|
|
472
|
+
categoryId: z.string().optional(),
|
|
473
|
+
propertyFilters: z.array(propertyFilterInnerSchema).optional(),
|
|
474
|
+
propertyName: z.string().optional(),
|
|
475
|
+
sortOrder: z.string().optional(),
|
|
476
|
+
});
|
|
477
|
+
const multiCompatibilityPropertyValuesRequestSchema = z.object({
|
|
478
|
+
categoryId: z.string().optional(),
|
|
479
|
+
propertyFilters: z.array(propertyFilterInnerSchema).optional(),
|
|
480
|
+
propertyNames: z.array(z.string()).optional(),
|
|
481
|
+
});
|
|
482
|
+
const disabledProductFilterSchema = z.object({
|
|
483
|
+
excludeForEbayReviews: z.boolean().optional(),
|
|
484
|
+
excludeForEbaySelling: z.boolean().optional(),
|
|
485
|
+
});
|
|
486
|
+
const sortOrderPropertiesSchema = z.object({
|
|
487
|
+
order: z.string().optional(),
|
|
488
|
+
propertyName: z.string().optional(),
|
|
489
|
+
});
|
|
490
|
+
const sortOrderInnerSchema = z.object({
|
|
491
|
+
sortOrder: sortOrderPropertiesSchema.optional(),
|
|
492
|
+
sortPriority: z.string().optional(),
|
|
493
|
+
});
|
|
494
|
+
const productRequestSchema = z.object({
|
|
495
|
+
applicationPropertyFilters: z.array(propertyFilterInnerSchema).optional(),
|
|
496
|
+
dataset: z.array(z.string()).optional(),
|
|
497
|
+
datasetPropertyName: z.array(z.string()).optional(),
|
|
498
|
+
disabledProductFilter: disabledProductFilterSchema.optional(),
|
|
499
|
+
paginationInput: paginationInputSchema.optional(),
|
|
500
|
+
productIdentifier: productIdentifierSchema.optional(),
|
|
501
|
+
sortOrders: z.array(sortOrderInnerSchema).optional(),
|
|
502
|
+
});
|
|
503
|
+
const specificationRequestSchema = z.object({
|
|
504
|
+
categoryId: z.string().optional(),
|
|
505
|
+
compatibilityPropertyFilters: z.array(propertyFilterInnerSchema).optional(),
|
|
506
|
+
dataset: z.string().optional(),
|
|
507
|
+
datasetPropertyName: z.array(z.string()).optional(),
|
|
508
|
+
exactMatch: z.boolean().optional(),
|
|
509
|
+
paginationInput: paginationInputSchema.optional(),
|
|
510
|
+
sortOrders: z.array(sortOrderInnerSchema).optional(),
|
|
511
|
+
specifications: z.array(propertyFilterInnerSchema).optional(),
|
|
512
|
+
});
|
|
513
|
+
// ============================================================================
|
|
514
|
+
// JSON Schema Conversion Functions
|
|
515
|
+
// ============================================================================
|
|
516
|
+
/**
|
|
517
|
+
* Convert Zod schemas to JSON Schema format for MCP tools
|
|
518
|
+
*/
|
|
519
|
+
export function getTaxonomyJsonSchemas() {
|
|
520
|
+
return {
|
|
521
|
+
// Category Policies
|
|
522
|
+
getCategoryPoliciesOutput: zodToJsonSchema(categoryPolicyResponseSchema, 'getCategoryPoliciesOutput'),
|
|
523
|
+
// Item Condition Policies
|
|
524
|
+
getItemConditionPoliciesOutput: zodToJsonSchema(itemConditionPolicyResponseSchema, 'getItemConditionPoliciesOutput'),
|
|
525
|
+
// Return Policies
|
|
526
|
+
getReturnPoliciesOutput: zodToJsonSchema(returnPolicyResponseSchema, 'getReturnPoliciesOutput'),
|
|
527
|
+
// Listing Structure Policies
|
|
528
|
+
getListingStructurePoliciesOutput: zodToJsonSchema(listingStructurePolicyResponseSchema, 'getListingStructurePoliciesOutput'),
|
|
529
|
+
// Listing Type Policies
|
|
530
|
+
getListingTypePoliciesOutput: zodToJsonSchema(listingTypePoliciesResponseSchema, 'getListingTypePoliciesOutput'),
|
|
531
|
+
// Negotiated Price Policies
|
|
532
|
+
getNegotiatedPricePoliciesOutput: zodToJsonSchema(negotiatedPricePolicyResponseSchema, 'getNegotiatedPricePoliciesOutput'),
|
|
533
|
+
// Shipping Policies
|
|
534
|
+
getShippingPoliciesOutput: zodToJsonSchema(shippingPoliciesResponseSchema, 'getShippingPoliciesOutput'),
|
|
535
|
+
// Automotive Parts Compatibility Policies
|
|
536
|
+
getAutomotivePartsCompatibilityPoliciesOutput: zodToJsonSchema(automotivePartsCompatibilityPolicyResponseSchema, 'getAutomotivePartsCompatibilityPoliciesOutput'),
|
|
537
|
+
// Classified Ad Policies
|
|
538
|
+
getClassifiedAdPoliciesOutput: zodToJsonSchema(classifiedAdPolicyResponseSchema, 'getClassifiedAdPoliciesOutput'),
|
|
539
|
+
// Motors Listing Policies
|
|
540
|
+
getMotorsListingPoliciesOutput: zodToJsonSchema(motorsListingPoliciesResponseSchema, 'getMotorsListingPoliciesOutput'),
|
|
541
|
+
// Currencies
|
|
542
|
+
getCurrenciesOutput: zodToJsonSchema(getCurrenciesResponseSchema, 'getCurrenciesOutput'),
|
|
543
|
+
// Extended Producer Responsibility
|
|
544
|
+
getExtendedProducerResponsibilityPoliciesOutput: zodToJsonSchema(extendedProducerResponsibilityPolicyResponseSchema, 'getExtendedProducerResponsibilityPoliciesOutput'),
|
|
545
|
+
// Hazardous Materials Labels
|
|
546
|
+
getHazardousMaterialsLabelsOutput: zodToJsonSchema(hazardousMaterialDetailsResponseSchema, 'getHazardousMaterialsLabelsOutput'),
|
|
547
|
+
// Product Safety Labels
|
|
548
|
+
getProductSafetyLabelsOutput: zodToJsonSchema(productSafetyLabelsResponseSchema, 'getProductSafetyLabelsOutput'),
|
|
549
|
+
// Regulatory Policies
|
|
550
|
+
getRegulatoryPoliciesOutput: zodToJsonSchema(regulatoryPolicyResponseSchema, 'getRegulatoryPoliciesOutput'),
|
|
551
|
+
// Site Visibility Policies
|
|
552
|
+
getSiteVisibilityPoliciesOutput: zodToJsonSchema(siteVisibilityPoliciesResponseSchema, 'getSiteVisibilityPoliciesOutput'),
|
|
553
|
+
// Compatibility Methods
|
|
554
|
+
getCompatibilityPropertyNamesInput: zodToJsonSchema(propertyNamesRequestSchema, 'getCompatibilityPropertyNamesInput'),
|
|
555
|
+
getCompatibilityPropertyNamesOutput: zodToJsonSchema(propertyNamesResponseSchema, 'getCompatibilityPropertyNamesOutput'),
|
|
556
|
+
getCompatibilityPropertyValuesInput: zodToJsonSchema(propertyValuesRequestSchema, 'getCompatibilityPropertyValuesInput'),
|
|
557
|
+
getCompatibilityPropertyValuesOutput: zodToJsonSchema(propertyValuesResponseSchema, 'getCompatibilityPropertyValuesOutput'),
|
|
558
|
+
getMultiCompatibilityPropertyValuesInput: zodToJsonSchema(multiCompatibilityPropertyValuesRequestSchema, 'getMultiCompatibilityPropertyValuesInput'),
|
|
559
|
+
getMultiCompatibilityPropertyValuesOutput: zodToJsonSchema(multiCompatibilityPropertyValuesResponseSchema, 'getMultiCompatibilityPropertyValuesOutput'),
|
|
560
|
+
getProductCompatibilitiesInput: zodToJsonSchema(productRequestSchema, 'getProductCompatibilitiesInput'),
|
|
561
|
+
getProductCompatibilitiesOutput: zodToJsonSchema(productResponseSchema, 'getProductCompatibilitiesOutput'),
|
|
562
|
+
getCompatibilitiesBySpecificationInput: zodToJsonSchema(specificationRequestSchema, 'getCompatibilitiesBySpecificationInput'),
|
|
563
|
+
getCompatibilitiesBySpecificationOutput: zodToJsonSchema(specificationResponseSchema, 'getCompatibilitiesBySpecificationOutput'),
|
|
564
|
+
// Common Types
|
|
565
|
+
amount: zodToJsonSchema(amountSchema, 'amount'),
|
|
566
|
+
error: zodToJsonSchema(errorSchema, 'error'),
|
|
567
|
+
errorParameter: zodToJsonSchema(errorParameterSchema, 'errorParameter'),
|
|
568
|
+
timeDuration: zodToJsonSchema(timeDurationSchema, 'timeDuration'),
|
|
569
|
+
pagination: zodToJsonSchema(paginationSchema, 'pagination'),
|
|
570
|
+
compatibility: zodToJsonSchema(compatibilitySchema, 'compatibility'),
|
|
571
|
+
compatibilityDetails: zodToJsonSchema(compatibilityDetailsSchema, 'compatibilityDetails'),
|
|
572
|
+
propertyFilterInner: zodToJsonSchema(propertyFilterInnerSchema, 'propertyFilterInner'),
|
|
573
|
+
productIdentifier: zodToJsonSchema(productIdentifierSchema, 'productIdentifier'),
|
|
574
|
+
};
|
|
575
|
+
}
|