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,390 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
|
-
/**
|
|
4
|
-
* Other eBay APIs Schemas
|
|
5
|
-
*
|
|
6
|
-
* This file contains Zod schemas for various eBay APIs including:
|
|
7
|
-
* - Commerce Identity API
|
|
8
|
-
* - Sell Compliance API
|
|
9
|
-
* - Commerce Translation API
|
|
10
|
-
* - Commerce VERO API
|
|
11
|
-
* - Sell eDelivery International Shipping API
|
|
12
|
-
*/
|
|
13
|
-
// ============================================================================
|
|
14
|
-
// Common Schemas
|
|
15
|
-
// ============================================================================
|
|
16
|
-
const errorParameterSchema = z.object({
|
|
17
|
-
name: z.string().optional(),
|
|
18
|
-
value: z.string().optional(),
|
|
19
|
-
});
|
|
20
|
-
const errorSchema = z.object({
|
|
21
|
-
category: z.string().optional(),
|
|
22
|
-
domain: z.string().optional(),
|
|
23
|
-
errorId: z.number().int().optional(),
|
|
24
|
-
inputRefIds: z.array(z.string()).optional(),
|
|
25
|
-
longMessage: z.string().optional(),
|
|
26
|
-
message: z.string().optional(),
|
|
27
|
-
outputRefIds: z.array(z.string()).optional(),
|
|
28
|
-
parameters: z.array(errorParameterSchema).optional(),
|
|
29
|
-
subdomain: z.string().optional(),
|
|
30
|
-
});
|
|
31
|
-
// ============================================================================
|
|
32
|
-
// Commerce Identity API Schemas
|
|
33
|
-
// ============================================================================
|
|
34
|
-
const userConsentSchema = z.object({
|
|
35
|
-
consentState: z.string().optional(),
|
|
36
|
-
consentType: z.string().optional(),
|
|
37
|
-
});
|
|
38
|
-
const getUserConsentResponseSchema = z.object({
|
|
39
|
-
consents: z.array(userConsentSchema).optional(),
|
|
40
|
-
});
|
|
41
|
-
// ============================================================================
|
|
42
|
-
// Sell Compliance API Schemas
|
|
43
|
-
// ============================================================================
|
|
44
|
-
const nameValueListSchema = z.object({
|
|
45
|
-
name: z.string().optional(),
|
|
46
|
-
value: z.string().optional(),
|
|
47
|
-
});
|
|
48
|
-
const correctiveRecommendationsSchema = z.object({
|
|
49
|
-
complianceDetail: z.string().optional(),
|
|
50
|
-
complianceDetailDescription: z.string().optional(),
|
|
51
|
-
correctiveActionDetails: z.string().optional(),
|
|
52
|
-
productRecommendation: z
|
|
53
|
-
.object({
|
|
54
|
-
epid: z.string().optional(),
|
|
55
|
-
})
|
|
56
|
-
.optional(),
|
|
57
|
-
});
|
|
58
|
-
const variationDetailsSchema = z.object({
|
|
59
|
-
sku: z.string().optional(),
|
|
60
|
-
variationAspects: z.array(nameValueListSchema).optional(),
|
|
61
|
-
});
|
|
62
|
-
const complianceDetailSchema = z.object({
|
|
63
|
-
complianceState: z.string().optional(),
|
|
64
|
-
complianceType: z.string().optional(),
|
|
65
|
-
message: z.string().optional(),
|
|
66
|
-
reasons: z
|
|
67
|
-
.array(z.object({
|
|
68
|
-
complianceDetailType: z.string().optional(),
|
|
69
|
-
message: z.string().optional(),
|
|
70
|
-
variation: variationDetailsSchema.optional(),
|
|
71
|
-
violationData: z.array(nameValueListSchema).optional(),
|
|
72
|
-
}))
|
|
73
|
-
.optional(),
|
|
74
|
-
correctiveRecommendations: correctiveRecommendationsSchema.optional(),
|
|
75
|
-
});
|
|
76
|
-
const complianceSummaryInfoSchema = z.object({
|
|
77
|
-
complianceSummary: z
|
|
78
|
-
.object({
|
|
79
|
-
violationSummaries: z
|
|
80
|
-
.array(z.object({
|
|
81
|
-
complianceType: z.string().optional(),
|
|
82
|
-
listingCount: z.number().int().optional(),
|
|
83
|
-
}))
|
|
84
|
-
.optional(),
|
|
85
|
-
})
|
|
86
|
-
.optional(),
|
|
87
|
-
});
|
|
88
|
-
const complianceViolationSchema = z.object({
|
|
89
|
-
listingId: z.string().optional(),
|
|
90
|
-
offerId: z.string().optional(),
|
|
91
|
-
sku: z.string().optional(),
|
|
92
|
-
complianceType: z.string().optional(),
|
|
93
|
-
complianceDetails: z.array(complianceDetailSchema).optional(),
|
|
94
|
-
});
|
|
95
|
-
const pageMetadataSchema = z.object({
|
|
96
|
-
href: z.string().optional(),
|
|
97
|
-
limit: z.number().int().optional(),
|
|
98
|
-
next: z.string().optional(),
|
|
99
|
-
offset: z.number().int().optional(),
|
|
100
|
-
prev: z.string().optional(),
|
|
101
|
-
total: z.number().int().optional(),
|
|
102
|
-
});
|
|
103
|
-
const listingViolationSummaryResponseSchema = z.object({
|
|
104
|
-
href: z.string().optional(),
|
|
105
|
-
limit: z.number().int().optional(),
|
|
106
|
-
listingViolations: z.array(complianceViolationSchema).optional(),
|
|
107
|
-
next: z.string().optional(),
|
|
108
|
-
offset: z.number().int().optional(),
|
|
109
|
-
prev: z.string().optional(),
|
|
110
|
-
total: z.number().int().optional(),
|
|
111
|
-
});
|
|
112
|
-
const suppressViolationRequestSchema = z.object({
|
|
113
|
-
complianceType: z.string().optional(),
|
|
114
|
-
listingId: z.string().optional(),
|
|
115
|
-
});
|
|
116
|
-
// ============================================================================
|
|
117
|
-
// Commerce Translation API Schemas
|
|
118
|
-
// ============================================================================
|
|
119
|
-
const translationSchema = z.object({
|
|
120
|
-
from: z.string().optional(),
|
|
121
|
-
to: z.string().optional(),
|
|
122
|
-
translatedText: z.string().optional(),
|
|
123
|
-
});
|
|
124
|
-
const translateRequestSchema = z.object({
|
|
125
|
-
from: z.string().optional(),
|
|
126
|
-
to: z.string(),
|
|
127
|
-
text: z.array(z.string()),
|
|
128
|
-
translationContext: z.string().optional(),
|
|
129
|
-
});
|
|
130
|
-
const translateResponseSchema = z.object({
|
|
131
|
-
translations: z.array(translationSchema).optional(),
|
|
132
|
-
});
|
|
133
|
-
// ============================================================================
|
|
134
|
-
// Commerce VERO API Schemas
|
|
135
|
-
// ============================================================================
|
|
136
|
-
const itemLocationSchema = z.object({
|
|
137
|
-
countryCode: z.string().optional(),
|
|
138
|
-
location: z.string().optional(),
|
|
139
|
-
postalCode: z.string().optional(),
|
|
140
|
-
});
|
|
141
|
-
const amountSchema = z.object({
|
|
142
|
-
currency: z.string().optional(),
|
|
143
|
-
value: z.string().optional(),
|
|
144
|
-
});
|
|
145
|
-
const reportedListingDetailsSchema = z.object({
|
|
146
|
-
categoryId: z.string().optional(),
|
|
147
|
-
imageUrl: z.string().optional(),
|
|
148
|
-
itemId: z.string().optional(),
|
|
149
|
-
itemLocation: itemLocationSchema.optional(),
|
|
150
|
-
price: amountSchema.optional(),
|
|
151
|
-
quantity: z.number().int().optional(),
|
|
152
|
-
sellerId: z.string().optional(),
|
|
153
|
-
title: z.string().optional(),
|
|
154
|
-
});
|
|
155
|
-
const veroReportItemsRequestSchema = z.object({
|
|
156
|
-
reportingReason: z.string().optional(),
|
|
157
|
-
reportedListingIds: z.array(z.string()).optional(),
|
|
158
|
-
});
|
|
159
|
-
const veroReportItemsResponseSchema = z.object({
|
|
160
|
-
reportedListings: z
|
|
161
|
-
.array(z.object({
|
|
162
|
-
itemId: z.string().optional(),
|
|
163
|
-
statusCode: z.number().int().optional(),
|
|
164
|
-
statusMessage: z.string().optional(),
|
|
165
|
-
}))
|
|
166
|
-
.optional(),
|
|
167
|
-
});
|
|
168
|
-
const veroReportedListingSchema = z.object({
|
|
169
|
-
itemId: z.string().optional(),
|
|
170
|
-
reasonForReport: z.string().optional(),
|
|
171
|
-
reportedDate: z.string().optional(),
|
|
172
|
-
reportedListingDetails: reportedListingDetailsSchema.optional(),
|
|
173
|
-
});
|
|
174
|
-
const veroReportedListingsResponseSchema = z.object({
|
|
175
|
-
href: z.string().optional(),
|
|
176
|
-
limit: z.number().int().optional(),
|
|
177
|
-
next: z.string().optional(),
|
|
178
|
-
offset: z.number().int().optional(),
|
|
179
|
-
prev: z.string().optional(),
|
|
180
|
-
reportedListings: z.array(veroReportedListingSchema).optional(),
|
|
181
|
-
total: z.number().int().optional(),
|
|
182
|
-
});
|
|
183
|
-
// ============================================================================
|
|
184
|
-
// Sell eDelivery International Shipping API Schemas
|
|
185
|
-
// ============================================================================
|
|
186
|
-
const addressSchema = z.object({
|
|
187
|
-
addressLine1: z.string().optional(),
|
|
188
|
-
addressLine2: z.string().optional(),
|
|
189
|
-
city: z.string().optional(),
|
|
190
|
-
stateOrProvince: z.string().optional(),
|
|
191
|
-
postalCode: z.string().optional(),
|
|
192
|
-
countryCode: z.string().optional(),
|
|
193
|
-
});
|
|
194
|
-
const contactSchema = z.object({
|
|
195
|
-
companyName: z.string().optional(),
|
|
196
|
-
contactAddress: addressSchema.optional(),
|
|
197
|
-
email: z.string().optional(),
|
|
198
|
-
fullName: z.string().optional(),
|
|
199
|
-
primaryPhone: z
|
|
200
|
-
.object({
|
|
201
|
-
phoneNumber: z.string().optional(),
|
|
202
|
-
})
|
|
203
|
-
.optional(),
|
|
204
|
-
});
|
|
205
|
-
const dimensionsSchema = z.object({
|
|
206
|
-
height: z.number().optional(),
|
|
207
|
-
length: z.number().optional(),
|
|
208
|
-
width: z.number().optional(),
|
|
209
|
-
unit: z.string().optional(),
|
|
210
|
-
});
|
|
211
|
-
const weightSchema = z.object({
|
|
212
|
-
value: z.number().optional(),
|
|
213
|
-
unit: z.string().optional(),
|
|
214
|
-
});
|
|
215
|
-
const packageDetailsSchema = z.object({
|
|
216
|
-
dimensions: dimensionsSchema.optional(),
|
|
217
|
-
weight: weightSchema.optional(),
|
|
218
|
-
});
|
|
219
|
-
const lineItemInputSchema = z.object({
|
|
220
|
-
lineItemId: z.string().optional(),
|
|
221
|
-
quantity: z.number().int().optional(),
|
|
222
|
-
});
|
|
223
|
-
const createShippingQuoteRequestSchema = z.object({
|
|
224
|
-
orders: z
|
|
225
|
-
.array(z.object({
|
|
226
|
-
lineItems: z.array(lineItemInputSchema).optional(),
|
|
227
|
-
orderId: z.string().optional(),
|
|
228
|
-
}))
|
|
229
|
-
.optional(),
|
|
230
|
-
shippingDestination: contactSchema.optional(),
|
|
231
|
-
});
|
|
232
|
-
const rateSchema = z.object({
|
|
233
|
-
maxEstimatedDeliveryDate: z.string().optional(),
|
|
234
|
-
minEstimatedDeliveryDate: z.string().optional(),
|
|
235
|
-
rateId: z.string().optional(),
|
|
236
|
-
shippingCost: amountSchema.optional(),
|
|
237
|
-
shippingServiceCode: z.string().optional(),
|
|
238
|
-
shippingServiceName: z.string().optional(),
|
|
239
|
-
});
|
|
240
|
-
const packageSchema = z.object({
|
|
241
|
-
lineItems: z
|
|
242
|
-
.array(z.object({
|
|
243
|
-
itemId: z.string().optional(),
|
|
244
|
-
lineItemId: z.string().optional(),
|
|
245
|
-
orderId: z.string().optional(),
|
|
246
|
-
quantity: z.number().int().optional(),
|
|
247
|
-
}))
|
|
248
|
-
.optional(),
|
|
249
|
-
packageDetails: packageDetailsSchema.optional(),
|
|
250
|
-
packageId: z.string().optional(),
|
|
251
|
-
rates: z.array(rateSchema).optional(),
|
|
252
|
-
});
|
|
253
|
-
const shippingQuoteSchema = z.object({
|
|
254
|
-
creationDate: z.string().optional(),
|
|
255
|
-
expirationDate: z.string().optional(),
|
|
256
|
-
packages: z.array(packageSchema).optional(),
|
|
257
|
-
quoteId: z.string().optional(),
|
|
258
|
-
shippingDestination: contactSchema.optional(),
|
|
259
|
-
warnings: z.array(errorSchema).optional(),
|
|
260
|
-
});
|
|
261
|
-
const createShippingQuoteResponseSchema = z.object({
|
|
262
|
-
shippingQuote: shippingQuoteSchema.optional(),
|
|
263
|
-
});
|
|
264
|
-
const purchaseLabelRequestSchema = z.object({
|
|
265
|
-
labelFormat: z.string().optional(),
|
|
266
|
-
rateId: z.string(),
|
|
267
|
-
shipFromAddress: contactSchema.optional(),
|
|
268
|
-
});
|
|
269
|
-
const labelSchema = z.object({
|
|
270
|
-
labelData: z.string().optional(),
|
|
271
|
-
labelFormat: z.string().optional(),
|
|
272
|
-
labelId: z.string().optional(),
|
|
273
|
-
});
|
|
274
|
-
const purchasedRateSchema = z.object({
|
|
275
|
-
baseShippingCost: amountSchema.optional(),
|
|
276
|
-
destinationTimeZone: z.string().optional(),
|
|
277
|
-
maxEstimatedDeliveryDate: z.string().optional(),
|
|
278
|
-
minEstimatedDeliveryDate: z.string().optional(),
|
|
279
|
-
rateId: z.string().optional(),
|
|
280
|
-
shippingCost: amountSchema.optional(),
|
|
281
|
-
shippingServiceCode: z.string().optional(),
|
|
282
|
-
shippingServiceName: z.string().optional(),
|
|
283
|
-
});
|
|
284
|
-
const shipmentSchema = z.object({
|
|
285
|
-
creationDate: z.string().optional(),
|
|
286
|
-
labels: z.array(labelSchema).optional(),
|
|
287
|
-
packages: z
|
|
288
|
-
.array(z.object({
|
|
289
|
-
packageId: z.string().optional(),
|
|
290
|
-
trackingNumber: z.string().optional(),
|
|
291
|
-
}))
|
|
292
|
-
.optional(),
|
|
293
|
-
rate: purchasedRateSchema.optional(),
|
|
294
|
-
shipFromAddress: contactSchema.optional(),
|
|
295
|
-
shipmentId: z.string().optional(),
|
|
296
|
-
shipmentTrackingNumber: z.string().optional(),
|
|
297
|
-
shippingDestination: contactSchema.optional(),
|
|
298
|
-
});
|
|
299
|
-
const purchaseLabelResponseSchema = z.object({
|
|
300
|
-
shipment: shipmentSchema.optional(),
|
|
301
|
-
warnings: z.array(errorSchema).optional(),
|
|
302
|
-
});
|
|
303
|
-
const getShipmentResponseSchema = z.object({
|
|
304
|
-
shipment: shipmentSchema.optional(),
|
|
305
|
-
});
|
|
306
|
-
const cancelShipmentResponseSchema = z.object({
|
|
307
|
-
shipment: shipmentSchema.optional(),
|
|
308
|
-
warnings: z.array(errorSchema).optional(),
|
|
309
|
-
});
|
|
310
|
-
const downloadLabelResponseSchema = z.object({
|
|
311
|
-
labelData: z.string().optional(),
|
|
312
|
-
labelFormat: z.string().optional(),
|
|
313
|
-
warnings: z.array(errorSchema).optional(),
|
|
314
|
-
});
|
|
315
|
-
// ============================================================================
|
|
316
|
-
// Input Schemas for Operations
|
|
317
|
-
// ============================================================================
|
|
318
|
-
const getListingViolationsInputSchema = z.object({
|
|
319
|
-
compliance_type: z.string().optional(),
|
|
320
|
-
offset: z.number().int().optional(),
|
|
321
|
-
listing_id: z.string().optional(),
|
|
322
|
-
limit: z.number().int().optional(),
|
|
323
|
-
filter: z.string().optional(),
|
|
324
|
-
});
|
|
325
|
-
const getVeroReportedListingsInputSchema = z.object({
|
|
326
|
-
limit: z.number().int().optional(),
|
|
327
|
-
offset: z.number().int().optional(),
|
|
328
|
-
});
|
|
329
|
-
// ============================================================================
|
|
330
|
-
// JSON Schema Conversion Functions
|
|
331
|
-
// ============================================================================
|
|
332
|
-
/**
|
|
333
|
-
* Convert Zod schemas to JSON Schema format for MCP tools
|
|
334
|
-
*/
|
|
335
|
-
export function getOtherApisJsonSchemas() {
|
|
336
|
-
return {
|
|
337
|
-
// Commerce Identity API
|
|
338
|
-
getUserConsentOutput: zodToJsonSchema(getUserConsentResponseSchema, 'getUserConsentOutput'),
|
|
339
|
-
// Sell Compliance API
|
|
340
|
-
getComplianceSummaryOutput: zodToJsonSchema(complianceSummaryInfoSchema, 'getComplianceSummaryOutput'),
|
|
341
|
-
getListingViolationsInput: zodToJsonSchema(getListingViolationsInputSchema, 'getListingViolationsInput'),
|
|
342
|
-
getListingViolationsOutput: zodToJsonSchema(listingViolationSummaryResponseSchema, 'getListingViolationsOutput'),
|
|
343
|
-
suppressViolationInput: zodToJsonSchema(suppressViolationRequestSchema, 'suppressViolationInput'),
|
|
344
|
-
// Commerce Translation API
|
|
345
|
-
translateInput: zodToJsonSchema(translateRequestSchema, 'translateInput'),
|
|
346
|
-
translateOutput: zodToJsonSchema(translateResponseSchema, 'translateOutput'),
|
|
347
|
-
// Commerce VERO API
|
|
348
|
-
reportItemsInput: zodToJsonSchema(veroReportItemsRequestSchema, 'reportItemsInput'),
|
|
349
|
-
reportItemsOutput: zodToJsonSchema(veroReportItemsResponseSchema, 'reportItemsOutput'),
|
|
350
|
-
getVeroReportedListingsInput: zodToJsonSchema(getVeroReportedListingsInputSchema, 'getVeroReportedListingsInput'),
|
|
351
|
-
getVeroReportedListingsOutput: zodToJsonSchema(veroReportedListingsResponseSchema, 'getVeroReportedListingsOutput'),
|
|
352
|
-
// Sell eDelivery International Shipping API
|
|
353
|
-
createShippingQuoteInput: zodToJsonSchema(createShippingQuoteRequestSchema, 'createShippingQuoteInput'),
|
|
354
|
-
createShippingQuoteOutput: zodToJsonSchema(createShippingQuoteResponseSchema, 'createShippingQuoteOutput'),
|
|
355
|
-
purchaseLabelInput: zodToJsonSchema(purchaseLabelRequestSchema, 'purchaseLabelInput'),
|
|
356
|
-
purchaseLabelOutput: zodToJsonSchema(purchaseLabelResponseSchema, 'purchaseLabelOutput'),
|
|
357
|
-
getShipmentOutput: zodToJsonSchema(getShipmentResponseSchema, 'getShipmentOutput'),
|
|
358
|
-
cancelShipmentOutput: zodToJsonSchema(cancelShipmentResponseSchema, 'cancelShipmentOutput'),
|
|
359
|
-
downloadLabelOutput: zodToJsonSchema(downloadLabelResponseSchema, 'downloadLabelOutput'),
|
|
360
|
-
// Common Types
|
|
361
|
-
error: zodToJsonSchema(errorSchema, 'error'),
|
|
362
|
-
errorParameter: zodToJsonSchema(errorParameterSchema, 'errorParameter'),
|
|
363
|
-
amount: zodToJsonSchema(amountSchema, 'amount'),
|
|
364
|
-
address: zodToJsonSchema(addressSchema, 'address'),
|
|
365
|
-
contact: zodToJsonSchema(contactSchema, 'contact'),
|
|
366
|
-
dimensions: zodToJsonSchema(dimensionsSchema, 'dimensions'),
|
|
367
|
-
weight: zodToJsonSchema(weightSchema, 'weight'),
|
|
368
|
-
pageMetadata: zodToJsonSchema(pageMetadataSchema, 'pageMetadata'),
|
|
369
|
-
// Compliance Types
|
|
370
|
-
complianceViolation: zodToJsonSchema(complianceViolationSchema, 'complianceViolation'),
|
|
371
|
-
complianceDetail: zodToJsonSchema(complianceDetailSchema, 'complianceDetail'),
|
|
372
|
-
correctiveRecommendations: zodToJsonSchema(correctiveRecommendationsSchema, 'correctiveRecommendations'),
|
|
373
|
-
variationDetails: zodToJsonSchema(variationDetailsSchema, 'variationDetails'),
|
|
374
|
-
nameValueList: zodToJsonSchema(nameValueListSchema, 'nameValueList'),
|
|
375
|
-
// Translation Types
|
|
376
|
-
translation: zodToJsonSchema(translationSchema, 'translation'),
|
|
377
|
-
// VERO Types
|
|
378
|
-
veroReportedListing: zodToJsonSchema(veroReportedListingSchema, 'veroReportedListing'),
|
|
379
|
-
reportedListingDetails: zodToJsonSchema(reportedListingDetailsSchema, 'reportedListingDetails'),
|
|
380
|
-
itemLocation: zodToJsonSchema(itemLocationSchema, 'itemLocation'),
|
|
381
|
-
// eDelivery International Shipping Types
|
|
382
|
-
shippingQuote: zodToJsonSchema(shippingQuoteSchema, 'shippingQuote'),
|
|
383
|
-
shipment: zodToJsonSchema(shipmentSchema, 'shipment'),
|
|
384
|
-
package: zodToJsonSchema(packageSchema, 'package'),
|
|
385
|
-
rate: zodToJsonSchema(rateSchema, 'rate'),
|
|
386
|
-
label: zodToJsonSchema(labelSchema, 'label'),
|
|
387
|
-
packageDetails: zodToJsonSchema(packageDetailsSchema, 'packageDetails'),
|
|
388
|
-
userConsent: zodToJsonSchema(userConsentSchema, 'userConsent'),
|
|
389
|
-
};
|
|
390
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fetches the eBay API Status RSS feed and writes the latest items to docs/API_STATUS.md.
|
|
3
|
-
* Used by the GitHub Action to keep an in-repo snapshot. Run with: npx tsx src/scripts/update-api-status-doc.ts
|
|
4
|
-
*/
|
|
5
|
-
import { writeFileSync } from 'node:fs';
|
|
6
|
-
import { join } from 'node:path';
|
|
7
|
-
import { getApiStatusFeed } from '../utils/api-status-feed.js';
|
|
8
|
-
const DEFAULT_LIMIT = 15;
|
|
9
|
-
const OUT_PATH = join(process.cwd(), 'docs', 'API_STATUS.md');
|
|
10
|
-
function escapeCell(s) {
|
|
11
|
-
return s.replace(/\|/g, '\\|').replace(/\n/g, ' ');
|
|
12
|
-
}
|
|
13
|
-
function buildMarkdown(items) {
|
|
14
|
-
const lines = [
|
|
15
|
-
'# eBay API Status (latest)',
|
|
16
|
-
'',
|
|
17
|
-
'Auto-updated snapshot from the [eBay API Status RSS feed](https://developer.ebay.com/rss/api-status).',
|
|
18
|
-
'Full list: [developer.ebay.com/support/api-status](https://developer.ebay.com/support/api-status).',
|
|
19
|
-
'',
|
|
20
|
-
`*Last updated: ${new Date().toISOString()}*`,
|
|
21
|
-
'',
|
|
22
|
-
'| Title | API | Site | Status | Last updated | Link |',
|
|
23
|
-
'|-------|-----|------|--------|--------------|------|',
|
|
24
|
-
];
|
|
25
|
-
for (const item of items) {
|
|
26
|
-
const link = item.link ? `[Details](${item.link})` : '';
|
|
27
|
-
lines.push(`| ${escapeCell(item.title)} | ${escapeCell(item.api)} | ${escapeCell(item.site)} | ${escapeCell(item.status)} | ${escapeCell(item.lastUpdated)} | ${link} |`);
|
|
28
|
-
}
|
|
29
|
-
lines.push('', '---', '', '*Generated by [ebay-mcp](https://github.com/YosefHayim/ebay-mcp) API status sync.*');
|
|
30
|
-
return lines.join('\n');
|
|
31
|
-
}
|
|
32
|
-
async function main() {
|
|
33
|
-
const { items, error } = await getApiStatusFeed({ limit: DEFAULT_LIMIT });
|
|
34
|
-
if (error && items.length === 0) {
|
|
35
|
-
throw new Error(`Failed to fetch API status feed: ${error}`);
|
|
36
|
-
}
|
|
37
|
-
const markdown = buildMarkdown(items);
|
|
38
|
-
writeFileSync(OUT_PATH, markdown, 'utf8');
|
|
39
|
-
console.log(`Wrote ${items.length} items to ${OUT_PATH}`);
|
|
40
|
-
}
|
|
41
|
-
main().catch((err) => {
|
|
42
|
-
console.error(err);
|
|
43
|
-
process.exitCode = 1;
|
|
44
|
-
});
|
package/build/server-http.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* eBay API MCP Server with HTTP Transport and OAuth 2.1 Authorization.
|
|
3
|
-
*/
|
|
4
|
-
import { resolve } from 'path';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
import { validateEnvironmentConfig } from './config/environment.js';
|
|
7
|
-
import { createHttpMcpApp, createHttpTransportConfigFromEnv, getHttpServerUrl, } from './mcp/http-transport.js';
|
|
8
|
-
const CONFIG = createHttpTransportConfigFromEnv();
|
|
9
|
-
function logEnvironmentValidation() {
|
|
10
|
-
const validation = validateEnvironmentConfig();
|
|
11
|
-
validation.infos.forEach((info) => {
|
|
12
|
-
console.log(` ℹ ${info}`);
|
|
13
|
-
});
|
|
14
|
-
if (validation.warnings.length > 0) {
|
|
15
|
-
console.log('Environment Configuration Warnings:');
|
|
16
|
-
validation.warnings.forEach((warning) => {
|
|
17
|
-
console.log(` • ${warning}`);
|
|
18
|
-
});
|
|
19
|
-
console.log();
|
|
20
|
-
}
|
|
21
|
-
if (!validation.isValid) {
|
|
22
|
-
console.error('Environment Configuration Errors:');
|
|
23
|
-
validation.errors.forEach((error) => {
|
|
24
|
-
console.error(` • ${error}`);
|
|
25
|
-
});
|
|
26
|
-
console.error('\nPlease fix the configuration errors and restart the server.\n');
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function logConfiguration() {
|
|
31
|
-
console.log('Configuration:');
|
|
32
|
-
console.log(`Host: ${CONFIG.host}`);
|
|
33
|
-
console.log(`Port: ${CONFIG.port}`);
|
|
34
|
-
console.log(`OAuth Enabled: ${CONFIG.authEnabled}`);
|
|
35
|
-
if (CONFIG.authEnabled) {
|
|
36
|
-
console.log(`Auth Server: ${CONFIG.oauth.authServerUrl}`);
|
|
37
|
-
console.log(`Required Scopes: ${CONFIG.oauth.requiredScopes.join(', ')}`);
|
|
38
|
-
console.log(`Verification Method: ${CONFIG.oauth.useIntrospection ? 'Introspection' : 'JWT'}`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function logStartupUrls(serverUrl) {
|
|
42
|
-
console.log('Server is running!');
|
|
43
|
-
console.log();
|
|
44
|
-
console.log(`MCP endpoint: ${serverUrl}/`);
|
|
45
|
-
console.log(`Protected Resource Metadata: ${serverUrl}/.well-known/oauth-protected-resource`);
|
|
46
|
-
console.log(`Health check: ${serverUrl}/health`);
|
|
47
|
-
console.log();
|
|
48
|
-
if (CONFIG.authEnabled) {
|
|
49
|
-
console.log('Authorization is ENABLED');
|
|
50
|
-
console.log('Clients must provide valid Bearer tokens to access MCP endpoints');
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
console.log('Authorization is DISABLED');
|
|
54
|
-
console.log('Set OAUTH_ENABLED=true (or remove OAUTH_ENABLED=false) to enable OAuth protection');
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
async function main() {
|
|
58
|
-
try {
|
|
59
|
-
console.log('Starting eBay API MCP Server (HTTP + OAuth)...');
|
|
60
|
-
console.log();
|
|
61
|
-
logEnvironmentValidation();
|
|
62
|
-
logConfiguration();
|
|
63
|
-
const app = await createHttpMcpApp(CONFIG);
|
|
64
|
-
const serverUrl = getHttpServerUrl(CONFIG);
|
|
65
|
-
const server = app.listen(CONFIG.port, CONFIG.host, () => {
|
|
66
|
-
logStartupUrls(serverUrl);
|
|
67
|
-
});
|
|
68
|
-
process.on('SIGINT', () => {
|
|
69
|
-
console.log('\n Shutting down...');
|
|
70
|
-
server.close(() => {
|
|
71
|
-
console.log('✓ Server closed');
|
|
72
|
-
process.exit(0);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
console.error('Fatal error starting server:', error);
|
|
78
|
-
process.exit(1);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const entryPath = process.argv[1] ? resolve(process.argv[1]) : undefined;
|
|
82
|
-
const modulePath = resolve(fileURLToPath(import.meta.url));
|
|
83
|
-
if (entryPath && modulePath === entryPath) {
|
|
84
|
-
await main();
|
|
85
|
-
}
|