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,248 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Security Checker - Pre-flight security and environment checks
|
|
3
|
-
*/
|
|
4
|
-
import { existsSync, readFileSync } from 'fs';
|
|
5
|
-
import { join } from 'path';
|
|
6
|
-
import { execSync } from 'child_process';
|
|
7
|
-
import chalk from 'chalk';
|
|
8
|
-
/**
|
|
9
|
-
* Check Node.js version meets requirements
|
|
10
|
-
*/
|
|
11
|
-
export function checkNodeVersion() {
|
|
12
|
-
const requiredVersion = 18;
|
|
13
|
-
const currentVersion = parseInt(process.version.slice(1).split('.')[0], 10);
|
|
14
|
-
if (currentVersion >= requiredVersion) {
|
|
15
|
-
return {
|
|
16
|
-
check: 'Node.js Version',
|
|
17
|
-
passed: true,
|
|
18
|
-
message: `Node.js ${process.version} meets requirements (>= ${requiredVersion})`,
|
|
19
|
-
severity: 'info',
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
check: 'Node.js Version',
|
|
24
|
-
passed: false,
|
|
25
|
-
message: `Node.js ${process.version} is below required version ${requiredVersion}`,
|
|
26
|
-
severity: 'critical',
|
|
27
|
-
fix: `Install Node.js ${requiredVersion} or higher from https://nodejs.org/`,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Check if .env is in .gitignore
|
|
32
|
-
*/
|
|
33
|
-
export function checkGitignore(projectRoot) {
|
|
34
|
-
const gitignorePath = join(projectRoot, '.gitignore');
|
|
35
|
-
if (!existsSync(gitignorePath)) {
|
|
36
|
-
return {
|
|
37
|
-
check: '.gitignore Security',
|
|
38
|
-
passed: false,
|
|
39
|
-
message: 'No .gitignore file found',
|
|
40
|
-
severity: 'warning',
|
|
41
|
-
fix: 'Create a .gitignore file and add .env to it',
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
const gitignoreContent = readFileSync(gitignorePath, 'utf-8');
|
|
45
|
-
const hasEnv = gitignoreContent.split('\n').some((line) => {
|
|
46
|
-
const trimmed = line.trim();
|
|
47
|
-
return trimmed === '.env' || trimmed === '*.env' || trimmed.startsWith('.env');
|
|
48
|
-
});
|
|
49
|
-
if (hasEnv) {
|
|
50
|
-
return {
|
|
51
|
-
check: '.gitignore Security',
|
|
52
|
-
passed: true,
|
|
53
|
-
message: '.env files are properly ignored by git',
|
|
54
|
-
severity: 'info',
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
check: '.gitignore Security',
|
|
59
|
-
passed: false,
|
|
60
|
-
message: '.env is not in .gitignore - credentials could be committed!',
|
|
61
|
-
severity: 'critical',
|
|
62
|
-
fix: 'Add ".env" to your .gitignore file immediately',
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Check network connectivity to eBay APIs
|
|
67
|
-
*/
|
|
68
|
-
export async function checkNetworkConnectivity() {
|
|
69
|
-
try {
|
|
70
|
-
const controller = new AbortController();
|
|
71
|
-
const timeout = setTimeout(() => controller.abort(), 5000);
|
|
72
|
-
const response = await fetch('https://api.ebay.com/health', {
|
|
73
|
-
signal: controller.signal,
|
|
74
|
-
});
|
|
75
|
-
clearTimeout(timeout);
|
|
76
|
-
if (response.ok || response.status === 404) {
|
|
77
|
-
// 404 is fine, means we can reach eBay servers
|
|
78
|
-
return {
|
|
79
|
-
check: 'Network Connectivity',
|
|
80
|
-
passed: true,
|
|
81
|
-
message: 'Successfully connected to eBay API servers',
|
|
82
|
-
severity: 'info',
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
check: 'Network Connectivity',
|
|
87
|
-
passed: false,
|
|
88
|
-
message: `Unexpected response from eBay API: ${response.status}`,
|
|
89
|
-
severity: 'warning',
|
|
90
|
-
fix: 'Check your internet connection and firewall settings',
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
return {
|
|
95
|
-
check: 'Network Connectivity',
|
|
96
|
-
passed: false,
|
|
97
|
-
message: 'Cannot reach eBay API servers',
|
|
98
|
-
severity: 'critical',
|
|
99
|
-
fix: 'Check your internet connection, proxy settings, and firewall',
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Check if project is built
|
|
105
|
-
*/
|
|
106
|
-
export function checkProjectBuild(projectRoot) {
|
|
107
|
-
const buildPath = join(projectRoot, 'build', 'index.js');
|
|
108
|
-
if (existsSync(buildPath)) {
|
|
109
|
-
return {
|
|
110
|
-
check: 'Project Build',
|
|
111
|
-
passed: true,
|
|
112
|
-
message: 'Project is built and ready',
|
|
113
|
-
severity: 'info',
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
check: 'Project Build',
|
|
118
|
-
passed: false,
|
|
119
|
-
message: 'Project has not been built yet',
|
|
120
|
-
severity: 'warning',
|
|
121
|
-
fix: 'Run "npm run build" to build the project',
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Check if dependencies are installed
|
|
126
|
-
*/
|
|
127
|
-
export function checkDependencies(projectRoot) {
|
|
128
|
-
const nodeModulesPath = join(projectRoot, 'node_modules');
|
|
129
|
-
if (existsSync(nodeModulesPath)) {
|
|
130
|
-
return {
|
|
131
|
-
check: 'Dependencies',
|
|
132
|
-
passed: true,
|
|
133
|
-
message: 'Dependencies are installed',
|
|
134
|
-
severity: 'info',
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
return {
|
|
138
|
-
check: 'Project Dependencies',
|
|
139
|
-
passed: false,
|
|
140
|
-
message: 'Dependencies not installed',
|
|
141
|
-
severity: 'critical',
|
|
142
|
-
fix: 'Run "npm install" to install dependencies',
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Check if git repo is initialized and .env is not tracked
|
|
147
|
-
*/
|
|
148
|
-
export function checkGitTracking(projectRoot) {
|
|
149
|
-
const gitPath = join(projectRoot, '.git');
|
|
150
|
-
const envPath = join(projectRoot, '.env');
|
|
151
|
-
if (!existsSync(gitPath)) {
|
|
152
|
-
return {
|
|
153
|
-
check: 'Git Repository',
|
|
154
|
-
passed: true,
|
|
155
|
-
message: 'Not a git repository (no tracking risk)',
|
|
156
|
-
severity: 'info',
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
if (!existsSync(envPath)) {
|
|
160
|
-
return {
|
|
161
|
-
check: 'Git Tracking',
|
|
162
|
-
passed: true,
|
|
163
|
-
message: '.env file does not exist yet',
|
|
164
|
-
severity: 'info',
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
try {
|
|
168
|
-
const result = execSync('git ls-files .env', {
|
|
169
|
-
cwd: projectRoot,
|
|
170
|
-
encoding: 'utf-8',
|
|
171
|
-
}).trim();
|
|
172
|
-
if (result === '') {
|
|
173
|
-
return {
|
|
174
|
-
check: 'Git Tracking',
|
|
175
|
-
passed: true,
|
|
176
|
-
message: '.env is not tracked by git',
|
|
177
|
-
severity: 'info',
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
return {
|
|
181
|
-
check: 'Git Tracking',
|
|
182
|
-
passed: false,
|
|
183
|
-
message: '.env is tracked by git - SECURITY RISK!',
|
|
184
|
-
severity: 'critical',
|
|
185
|
-
fix: 'Run: git rm --cached .env && git commit -m "Remove .env from tracking"',
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
catch {
|
|
189
|
-
return {
|
|
190
|
-
check: 'Git Tracking',
|
|
191
|
-
passed: true,
|
|
192
|
-
message: 'Unable to check git tracking (likely not tracked)',
|
|
193
|
-
severity: 'info',
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Run all security checks
|
|
199
|
-
*/
|
|
200
|
-
export async function runSecurityChecks(projectRoot) {
|
|
201
|
-
const results = [];
|
|
202
|
-
// Synchronous checks
|
|
203
|
-
results.push(checkNodeVersion());
|
|
204
|
-
results.push(checkGitignore(projectRoot));
|
|
205
|
-
results.push(checkProjectBuild(projectRoot));
|
|
206
|
-
results.push(checkDependencies(projectRoot));
|
|
207
|
-
results.push(checkGitTracking(projectRoot));
|
|
208
|
-
// Asynchronous checks
|
|
209
|
-
results.push(await checkNetworkConnectivity());
|
|
210
|
-
return results;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Display security check results
|
|
214
|
-
*/
|
|
215
|
-
export function displaySecurityResults(results) {
|
|
216
|
-
console.log(chalk.bold.cyan('\n🔒 Security & Environment Checks\n'));
|
|
217
|
-
for (const result of results) {
|
|
218
|
-
const icon = result.passed ? chalk.green('✓') : chalk.red('✗');
|
|
219
|
-
const severity = result.severity === 'critical'
|
|
220
|
-
? chalk.red('[CRITICAL]')
|
|
221
|
-
: result.severity === 'warning'
|
|
222
|
-
? chalk.yellow('[WARNING]')
|
|
223
|
-
: chalk.gray('[INFO]');
|
|
224
|
-
console.log(`${icon} ${chalk.bold(result.check)}: ${severity}`);
|
|
225
|
-
console.log(` ${chalk.gray(result.message)}`);
|
|
226
|
-
if (result.fix) {
|
|
227
|
-
console.log(` ${chalk.yellow('→ Fix:')} ${result.fix}`);
|
|
228
|
-
}
|
|
229
|
-
console.log('');
|
|
230
|
-
}
|
|
231
|
-
const critical = results.filter((r) => !r.passed && r.severity === 'critical');
|
|
232
|
-
const warnings = results.filter((r) => !r.passed && r.severity === 'warning');
|
|
233
|
-
if (critical.length > 0) {
|
|
234
|
-
console.log(chalk.red.bold(`⚠️ ${critical.length} critical issue(s) found. Please fix before continuing.\n`));
|
|
235
|
-
}
|
|
236
|
-
else if (warnings.length > 0) {
|
|
237
|
-
console.log(chalk.yellow.bold(`⚠️ ${warnings.length} warning(s) found. Recommended to fix.\n`));
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
console.log(chalk.green.bold('✅ All security checks passed!\n'));
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Check if there are critical failures
|
|
245
|
-
*/
|
|
246
|
-
export function hasCriticalFailures(results) {
|
|
247
|
-
return results.some((r) => !r.passed && r.severity === 'critical');
|
|
248
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|