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.
Files changed (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +755 -0
  3. package/build/api/account-management/account.js +301 -0
  4. package/build/api/analytics-and-report/analytics.js +102 -0
  5. package/build/api/client-trading.js +96 -0
  6. package/build/api/client.js +173 -0
  7. package/build/api/communication/feedback.js +119 -0
  8. package/build/api/communication/message.js +131 -0
  9. package/build/api/communication/negotiation.js +97 -0
  10. package/build/api/communication/notification.js +373 -0
  11. package/build/api/developer/developer.js +81 -0
  12. package/build/api/index.js +109 -0
  13. package/build/api/listing-management/inventory.js +640 -0
  14. package/build/api/listing-metadata/metadata.js +485 -0
  15. package/build/api/listing-metadata/taxonomy.js +58 -0
  16. package/build/api/marketing-and-promotions/marketing.js +768 -0
  17. package/build/api/marketing-and-promotions/recommendation.js +32 -0
  18. package/build/api/order-management/dispute.js +69 -0
  19. package/build/api/order-management/fulfillment.js +89 -0
  20. package/build/api/other/compliance.js +47 -0
  21. package/build/api/other/edelivery.js +219 -0
  22. package/build/api/other/identity.js +24 -0
  23. package/build/api/other/translation.js +22 -0
  24. package/build/api/other/vero.js +48 -0
  25. package/build/api/trading/trading.js +78 -0
  26. package/build/auth/kv-store.js +40 -0
  27. package/build/auth/multi-user-store.js +120 -0
  28. package/build/auth/oauth-metadata.js +59 -0
  29. package/build/auth/oauth-middleware.js +99 -0
  30. package/build/auth/oauth-types.js +4 -0
  31. package/build/auth/oauth.js +235 -0
  32. package/build/auth/scope-utils.js +304 -0
  33. package/build/auth/token-store.js +46 -0
  34. package/build/auth/token-verifier.js +172 -0
  35. package/build/config/environment.js +297 -0
  36. package/build/index.d.ts +1 -0
  37. package/build/index.js +129 -0
  38. package/build/schemas/account-management/account.js +375 -0
  39. package/build/schemas/analytics/analytics.js +191 -0
  40. package/build/schemas/communication/messages.js +345 -0
  41. package/build/schemas/fulfillment/orders.js +338 -0
  42. package/build/schemas/index.js +68 -0
  43. package/build/schemas/inventory-management/inventory.js +471 -0
  44. package/build/schemas/marketing/marketing.js +1103 -0
  45. package/build/schemas/metadata/metadata.js +618 -0
  46. package/build/schemas/other/other-apis.js +390 -0
  47. package/build/schemas/taxonomy/taxonomy.js +575 -0
  48. package/build/scripts/auto-setup.js +364 -0
  49. package/build/scripts/dev-sync.js +512 -0
  50. package/build/scripts/diagnostics.js +301 -0
  51. package/build/scripts/download-specs.js +116 -0
  52. package/build/scripts/interactive-setup.js +757 -0
  53. package/build/scripts/setup.js +1515 -0
  54. package/build/scripts/update-api-status-doc.js +44 -0
  55. package/build/server-http.d.ts +1 -0
  56. package/build/server-http.js +581 -0
  57. package/build/tools/definitions/account-with-schemas.js +170 -0
  58. package/build/tools/definitions/account.js +428 -0
  59. package/build/tools/definitions/analytics.js +66 -0
  60. package/build/tools/definitions/communication.js +394 -0
  61. package/build/tools/definitions/developer.js +195 -0
  62. package/build/tools/definitions/fulfillment.js +326 -0
  63. package/build/tools/definitions/index.js +41 -0
  64. package/build/tools/definitions/inventory.js +464 -0
  65. package/build/tools/definitions/marketing.js +1486 -0
  66. package/build/tools/definitions/metadata.js +188 -0
  67. package/build/tools/definitions/other.js +309 -0
  68. package/build/tools/definitions/taxonomy.js +64 -0
  69. package/build/tools/definitions/token-management.js +148 -0
  70. package/build/tools/definitions/trading.js +71 -0
  71. package/build/tools/index.js +1200 -0
  72. package/build/tools/schemas.js +667 -0
  73. package/build/tools/tool-definitions.js +3534 -0
  74. package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
  75. package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
  76. package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
  77. package/build/types/ebay-enums.js +1330 -0
  78. package/build/types/ebay.js +123 -0
  79. package/build/types/index.js +10 -0
  80. package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
  81. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
  82. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
  83. package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
  84. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
  85. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
  86. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
  87. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
  88. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
  89. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
  90. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
  91. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
  92. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
  93. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
  94. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
  95. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
  96. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
  97. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
  98. package/build/utils/account-management/account.js +831 -0
  99. package/build/utils/api-status-feed.js +83 -0
  100. package/build/utils/communication/feedback.js +216 -0
  101. package/build/utils/communication/message.js +242 -0
  102. package/build/utils/communication/negotiation.js +150 -0
  103. package/build/utils/communication/notification.js +369 -0
  104. package/build/utils/date-converter.js +160 -0
  105. package/build/utils/llm-client-detector.js +758 -0
  106. package/build/utils/logger.js +198 -0
  107. package/build/utils/oauth-helper.js +315 -0
  108. package/build/utils/order-management/dispute.js +369 -0
  109. package/build/utils/order-management/fulfillment.js +205 -0
  110. package/build/utils/other/compliance.js +76 -0
  111. package/build/utils/other/edelivery.js +241 -0
  112. package/build/utils/other/identity.js +13 -0
  113. package/build/utils/other/translation.js +41 -0
  114. package/build/utils/other/vero.js +90 -0
  115. package/build/utils/scope-helper.js +207 -0
  116. package/build/utils/security-checker.js +248 -0
  117. package/build/utils/setup-validator.js +305 -0
  118. package/build/utils/token-utils.js +40 -0
  119. package/build/utils/version.js +56 -0
  120. package/docs/auth/production_scopes.json +111 -0
  121. package/docs/auth/sandbox_scopes.json +142 -0
  122. package/package.json +122 -0
  123. package/public/icons/1024x1024.png +0 -0
  124. package/public/icons/128x128.png +0 -0
  125. package/public/icons/16x16.png +0 -0
  126. package/public/icons/256x256.png +0 -0
  127. package/public/icons/32x32.png +0 -0
  128. package/public/icons/48x48.png +0 -0
  129. package/public/icons/512x512.png +0 -0
@@ -0,0 +1,373 @@
1
+ /**
2
+ * Notification API - Event notifications and subscriptions
3
+ * Based on: docs/sell-apps/communication/commerce_notification_v1_oas3.json
4
+ */
5
+ export class NotificationApi {
6
+ client;
7
+ basePath = '/commerce/notification/v1';
8
+ constructor(client) {
9
+ this.client = client;
10
+ }
11
+ /**
12
+ * Get public key for validating notifications
13
+ * @throws Error if required parameters are missing or invalid
14
+ */
15
+ async getPublicKey(publicKeyId) {
16
+ if (!publicKeyId || typeof publicKeyId !== 'string') {
17
+ throw new Error('publicKeyId is required and must be a string');
18
+ }
19
+ try {
20
+ return await this.client.get(`${this.basePath}/public_key/${publicKeyId}`);
21
+ }
22
+ catch (error) {
23
+ throw new Error(`Failed to get public key: ${error instanceof Error ? error.message : 'Unknown error'}`);
24
+ }
25
+ }
26
+ /**
27
+ * Get notification config
28
+ * @throws Error if the request fails
29
+ */
30
+ async getConfig() {
31
+ try {
32
+ return await this.client.get(`${this.basePath}/config`);
33
+ }
34
+ catch (error) {
35
+ throw new Error(`Failed to get config: ${error instanceof Error ? error.message : 'Unknown error'}`);
36
+ }
37
+ }
38
+ /**
39
+ * Update notification config
40
+ * @throws Error if required parameters are missing or invalid
41
+ */
42
+ async updateConfig(config) {
43
+ if (!config || typeof config !== 'object') {
44
+ throw new Error('config is required and must be an object');
45
+ }
46
+ try {
47
+ return await this.client.put(`${this.basePath}/config`, config);
48
+ }
49
+ catch (error) {
50
+ throw new Error(`Failed to update config: ${error instanceof Error ? error.message : 'Unknown error'}`);
51
+ }
52
+ }
53
+ /**
54
+ * Get all destinations (paginated)
55
+ * @throws Error if the request fails
56
+ */
57
+ async getDestinations(limit, continuationToken) {
58
+ const params = {};
59
+ if (limit !== undefined)
60
+ params.limit = String(limit);
61
+ if (continuationToken)
62
+ params.continuation_token = continuationToken;
63
+ try {
64
+ return await this.client.get(`${this.basePath}/destination`, params);
65
+ }
66
+ catch (error) {
67
+ throw new Error(`Failed to get destinations: ${error instanceof Error ? error.message : 'Unknown error'}`);
68
+ }
69
+ }
70
+ /**
71
+ * Get destination
72
+ * @throws Error if required parameters are missing or invalid
73
+ */
74
+ async getDestination(destinationId) {
75
+ if (!destinationId || typeof destinationId !== 'string') {
76
+ throw new Error('destinationId is required and must be a string');
77
+ }
78
+ try {
79
+ return await this.client.get(`${this.basePath}/destination/${destinationId}`);
80
+ }
81
+ catch (error) {
82
+ throw new Error(`Failed to get destination: ${error instanceof Error ? error.message : 'Unknown error'}`);
83
+ }
84
+ }
85
+ /**
86
+ * Create destination
87
+ * @throws Error if required parameters are missing or invalid
88
+ */
89
+ async createDestination(destination) {
90
+ if (!destination || typeof destination !== 'object') {
91
+ throw new Error('destination is required and must be an object');
92
+ }
93
+ try {
94
+ return await this.client.post(`${this.basePath}/destination`, destination);
95
+ }
96
+ catch (error) {
97
+ throw new Error(`Failed to create destination: ${error instanceof Error ? error.message : 'Unknown error'}`);
98
+ }
99
+ }
100
+ /**
101
+ * Update destination
102
+ * @throws Error if required parameters are missing or invalid
103
+ */
104
+ async updateDestination(destinationId, destination) {
105
+ if (!destinationId || typeof destinationId !== 'string') {
106
+ throw new Error('destinationId is required and must be a string');
107
+ }
108
+ if (!destination || typeof destination !== 'object') {
109
+ throw new Error('destination is required and must be an object');
110
+ }
111
+ try {
112
+ return await this.client.put(`${this.basePath}/destination/${destinationId}`, destination);
113
+ }
114
+ catch (error) {
115
+ throw new Error(`Failed to update destination: ${error instanceof Error ? error.message : 'Unknown error'}`);
116
+ }
117
+ }
118
+ /**
119
+ * Delete destination
120
+ * @throws Error if required parameters are missing or invalid
121
+ */
122
+ async deleteDestination(destinationId) {
123
+ if (!destinationId || typeof destinationId !== 'string') {
124
+ throw new Error('destinationId is required and must be a string');
125
+ }
126
+ try {
127
+ return await this.client.delete(`${this.basePath}/destination/${destinationId}`);
128
+ }
129
+ catch (error) {
130
+ throw new Error(`Failed to delete destination: ${error instanceof Error ? error.message : 'Unknown error'}`);
131
+ }
132
+ }
133
+ /**
134
+ * Get all subscriptions
135
+ * Endpoint: GET /subscription
136
+ * @throws Error if the request fails
137
+ */
138
+ async getSubscriptions(limit, continuationToken) {
139
+ const params = {};
140
+ if (limit !== undefined) {
141
+ if (typeof limit !== 'number' || limit < 1) {
142
+ throw new Error('limit must be a positive number when provided');
143
+ }
144
+ params.limit = limit;
145
+ }
146
+ if (continuationToken !== undefined) {
147
+ if (typeof continuationToken !== 'string') {
148
+ throw new Error('continuationToken must be a string when provided');
149
+ }
150
+ params.continuation_token = continuationToken;
151
+ }
152
+ try {
153
+ return await this.client.get(`${this.basePath}/subscription`, params);
154
+ }
155
+ catch (error) {
156
+ throw new Error(`Failed to get subscriptions: ${error instanceof Error ? error.message : 'Unknown error'}`);
157
+ }
158
+ }
159
+ /**
160
+ * Create a subscription
161
+ * Endpoint: POST /subscription
162
+ * @throws Error if required parameters are missing or invalid
163
+ */
164
+ async createSubscription(subscription) {
165
+ if (!subscription || typeof subscription !== 'object') {
166
+ throw new Error('subscription is required and must be an object');
167
+ }
168
+ try {
169
+ return await this.client.post(`${this.basePath}/subscription`, subscription);
170
+ }
171
+ catch (error) {
172
+ throw new Error(`Failed to create subscription: ${error instanceof Error ? error.message : 'Unknown error'}`);
173
+ }
174
+ }
175
+ /**
176
+ * Get a subscription
177
+ * Endpoint: GET /subscription/{subscription_id}
178
+ * @throws Error if required parameters are missing or invalid
179
+ */
180
+ async getSubscription(subscriptionId) {
181
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
182
+ throw new Error('subscriptionId is required and must be a string');
183
+ }
184
+ try {
185
+ return await this.client.get(`${this.basePath}/subscription/${subscriptionId}`);
186
+ }
187
+ catch (error) {
188
+ throw new Error(`Failed to get subscription: ${error instanceof Error ? error.message : 'Unknown error'}`);
189
+ }
190
+ }
191
+ /**
192
+ * Update a subscription
193
+ * Endpoint: PUT /subscription/{subscription_id}
194
+ * @throws Error if required parameters are missing or invalid
195
+ */
196
+ async updateSubscription(subscriptionId, subscription) {
197
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
198
+ throw new Error('subscriptionId is required and must be a string');
199
+ }
200
+ if (!subscription || typeof subscription !== 'object') {
201
+ throw new Error('subscription is required and must be an object');
202
+ }
203
+ try {
204
+ return await this.client.put(`${this.basePath}/subscription/${subscriptionId}`, subscription);
205
+ }
206
+ catch (error) {
207
+ throw new Error(`Failed to update subscription: ${error instanceof Error ? error.message : 'Unknown error'}`);
208
+ }
209
+ }
210
+ /**
211
+ * Delete a subscription
212
+ * Endpoint: DELETE /subscription/{subscription_id}
213
+ * @throws Error if required parameters are missing or invalid
214
+ */
215
+ async deleteSubscription(subscriptionId) {
216
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
217
+ throw new Error('subscriptionId is required and must be a string');
218
+ }
219
+ try {
220
+ return await this.client.delete(`${this.basePath}/subscription/${subscriptionId}`);
221
+ }
222
+ catch (error) {
223
+ throw new Error(`Failed to delete subscription: ${error instanceof Error ? error.message : 'Unknown error'}`);
224
+ }
225
+ }
226
+ /**
227
+ * Disable a subscription
228
+ * Endpoint: POST /subscription/{subscription_id}/disable
229
+ * @throws Error if required parameters are missing or invalid
230
+ */
231
+ async disableSubscription(subscriptionId) {
232
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
233
+ throw new Error('subscriptionId is required and must be a string');
234
+ }
235
+ try {
236
+ return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/disable`, {});
237
+ }
238
+ catch (error) {
239
+ throw new Error(`Failed to disable subscription: ${error instanceof Error ? error.message : 'Unknown error'}`);
240
+ }
241
+ }
242
+ /**
243
+ * Enable a subscription
244
+ * Endpoint: POST /subscription/{subscription_id}/enable
245
+ * @throws Error if required parameters are missing or invalid
246
+ */
247
+ async enableSubscription(subscriptionId) {
248
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
249
+ throw new Error('subscriptionId is required and must be a string');
250
+ }
251
+ try {
252
+ return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/enable`, {});
253
+ }
254
+ catch (error) {
255
+ throw new Error(`Failed to enable subscription: ${error instanceof Error ? error.message : 'Unknown error'}`);
256
+ }
257
+ }
258
+ /**
259
+ * Test a subscription
260
+ * Endpoint: POST /subscription/{subscription_id}/test
261
+ * @throws Error if required parameters are missing or invalid
262
+ */
263
+ async testSubscription(subscriptionId) {
264
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
265
+ throw new Error('subscriptionId is required and must be a string');
266
+ }
267
+ try {
268
+ return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/test`, {});
269
+ }
270
+ catch (error) {
271
+ throw new Error(`Failed to test subscription: ${error instanceof Error ? error.message : 'Unknown error'}`);
272
+ }
273
+ }
274
+ /**
275
+ * Get a topic
276
+ * Endpoint: GET /topic/{topic_id}
277
+ * @throws Error if required parameters are missing or invalid
278
+ */
279
+ async getTopic(topicId) {
280
+ if (!topicId || typeof topicId !== 'string') {
281
+ throw new Error('topicId is required and must be a string');
282
+ }
283
+ try {
284
+ return await this.client.get(`${this.basePath}/topic/${topicId}`);
285
+ }
286
+ catch (error) {
287
+ throw new Error(`Failed to get topic: ${error instanceof Error ? error.message : 'Unknown error'}`);
288
+ }
289
+ }
290
+ /**
291
+ * Get all topics
292
+ * Endpoint: GET /topic
293
+ * @throws Error if the request fails
294
+ */
295
+ async getTopics(limit, continuationToken) {
296
+ const params = {};
297
+ if (limit !== undefined) {
298
+ if (typeof limit !== 'number' || limit < 1) {
299
+ throw new Error('limit must be a positive number when provided');
300
+ }
301
+ params.limit = limit;
302
+ }
303
+ if (continuationToken !== undefined) {
304
+ if (typeof continuationToken !== 'string') {
305
+ throw new Error('continuationToken must be a string when provided');
306
+ }
307
+ params.continuation_token = continuationToken;
308
+ }
309
+ try {
310
+ return await this.client.get(`${this.basePath}/topic`, params);
311
+ }
312
+ catch (error) {
313
+ throw new Error(`Failed to get topics: ${error instanceof Error ? error.message : 'Unknown error'}`);
314
+ }
315
+ }
316
+ /**
317
+ * Create a subscription filter
318
+ * Endpoint: POST /subscription/{subscription_id}/filter
319
+ * @throws Error if required parameters are missing or invalid
320
+ */
321
+ async createSubscriptionFilter(subscriptionId, filter) {
322
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
323
+ throw new Error('subscriptionId is required and must be a string');
324
+ }
325
+ if (!filter || typeof filter !== 'object') {
326
+ throw new Error('filter is required and must be an object');
327
+ }
328
+ try {
329
+ return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/filter`, filter);
330
+ }
331
+ catch (error) {
332
+ throw new Error(`Failed to create subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}`);
333
+ }
334
+ }
335
+ /**
336
+ * Get a subscription filter
337
+ * Endpoint: GET /subscription/{subscription_id}/filter/{filter_id}
338
+ * @throws Error if required parameters are missing or invalid
339
+ */
340
+ async getSubscriptionFilter(subscriptionId, filterId) {
341
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
342
+ throw new Error('subscriptionId is required and must be a string');
343
+ }
344
+ if (!filterId || typeof filterId !== 'string') {
345
+ throw new Error('filterId is required and must be a string');
346
+ }
347
+ try {
348
+ return await this.client.get(`${this.basePath}/subscription/${subscriptionId}/filter/${filterId}`);
349
+ }
350
+ catch (error) {
351
+ throw new Error(`Failed to get subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}`);
352
+ }
353
+ }
354
+ /**
355
+ * Delete a subscription filter
356
+ * Endpoint: DELETE /subscription/{subscription_id}/filter/{filter_id}
357
+ * @throws Error if required parameters are missing or invalid
358
+ */
359
+ async deleteSubscriptionFilter(subscriptionId, filterId) {
360
+ if (!subscriptionId || typeof subscriptionId !== 'string') {
361
+ throw new Error('subscriptionId is required and must be a string');
362
+ }
363
+ if (!filterId || typeof filterId !== 'string') {
364
+ throw new Error('filterId is required and must be a string');
365
+ }
366
+ try {
367
+ return await this.client.delete(`${this.basePath}/subscription/${subscriptionId}/filter/${filterId}`);
368
+ }
369
+ catch (error) {
370
+ throw new Error(`Failed to delete subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}`);
371
+ }
372
+ }
373
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Developer API - Rate limits, client registration, and signing keys
3
+ * Based on:
4
+ * - docs/sell-apps/application-settings/developer_analytics_v1_beta_oas3.json
5
+ * - docs/sell-apps/application-settings/developer_client_registration_v1_oas3.json
6
+ * - docs/sell-apps/application-settings/developer_key_management_v1_oas3.json
7
+ */
8
+ export class DeveloperApi {
9
+ client;
10
+ analyticsBasePath = '/developer/analytics/v1_beta';
11
+ clientBasePath = '/developer/client_registration/v1';
12
+ keyBasePath = '/developer/key_management/v1';
13
+ constructor(client) {
14
+ this.client = client;
15
+ }
16
+ // ========================================
17
+ // RATE LIMITS (Analytics API)
18
+ // ========================================
19
+ /**
20
+ * Get application rate limits
21
+ * Endpoint: GET /rate_limit/
22
+ */
23
+ async getRateLimits(apiContext, apiName) {
24
+ const params = {};
25
+ if (apiContext)
26
+ params.api_context = apiContext;
27
+ if (apiName)
28
+ params.api_name = apiName;
29
+ return await this.client.get(`${this.analyticsBasePath}/rate_limit/`, Object.keys(params).length > 0 ? params : undefined);
30
+ }
31
+ /**
32
+ * Get user rate limits
33
+ * Endpoint: GET /user_rate_limit/
34
+ */
35
+ async getUserRateLimits(apiContext, apiName) {
36
+ const params = {};
37
+ if (apiContext)
38
+ params.api_context = apiContext;
39
+ if (apiName)
40
+ params.api_name = apiName;
41
+ return await this.client.get(`${this.analyticsBasePath}/user_rate_limit/`, Object.keys(params).length > 0 ? params : undefined);
42
+ }
43
+ // ========================================
44
+ // CLIENT REGISTRATION
45
+ // ========================================
46
+ /**
47
+ * Register a new third party financial application with eBay
48
+ * Endpoint: POST /client/register
49
+ * Note: This is primarily for Open Banking / PSD2 compliance
50
+ */
51
+ async registerClient(clientSettings) {
52
+ return await this.client.post(`${this.clientBasePath}/client/register`, clientSettings);
53
+ }
54
+ // ========================================
55
+ // SIGNING KEY MANAGEMENT
56
+ // ========================================
57
+ /**
58
+ * Get all signing keys for the application
59
+ * Endpoint: GET /signing_key
60
+ */
61
+ async getSigningKeys() {
62
+ return await this.client.get(`${this.keyBasePath}/signing_key`);
63
+ }
64
+ /**
65
+ * Create a new signing key
66
+ * Endpoint: POST /signing_key
67
+ */
68
+ async createSigningKey(request) {
69
+ return await this.client.post(`${this.keyBasePath}/signing_key`, request || {});
70
+ }
71
+ /**
72
+ * Get a specific signing key by ID
73
+ * Endpoint: GET /signing_key/{signing_key_id}
74
+ */
75
+ async getSigningKey(signingKeyId) {
76
+ if (!signingKeyId || typeof signingKeyId !== 'string') {
77
+ throw new Error('signingKeyId is required and must be a string');
78
+ }
79
+ return await this.client.get(`${this.keyBasePath}/signing_key/${signingKeyId}`);
80
+ }
81
+ }
@@ -0,0 +1,109 @@
1
+ import { AccountApi } from '../api/account-management/account.js';
2
+ import { AnalyticsApi } from '../api/analytics-and-report/analytics.js';
3
+ import { EbayApiClient } from '../api/client.js';
4
+ import { FeedbackApi } from '../api/communication/feedback.js';
5
+ import { MessageApi } from '../api/communication/message.js';
6
+ import { NegotiationApi } from '../api/communication/negotiation.js';
7
+ import { NotificationApi } from '../api/communication/notification.js';
8
+ import { DeveloperApi } from '../api/developer/developer.js';
9
+ import { InventoryApi } from '../api/listing-management/inventory.js';
10
+ import { MetadataApi } from '../api/listing-metadata/metadata.js';
11
+ import { TaxonomyApi } from '../api/listing-metadata/taxonomy.js';
12
+ import { MarketingApi } from '../api/marketing-and-promotions/marketing.js';
13
+ import { RecommendationApi } from '../api/marketing-and-promotions/recommendation.js';
14
+ import { DisputeApi } from '../api/order-management/dispute.js';
15
+ import { FulfillmentApi } from '../api/order-management/fulfillment.js';
16
+ import { ComplianceApi } from '../api/other/compliance.js';
17
+ import { EDeliveryApi } from '../api/other/edelivery.js';
18
+ import { IdentityApi } from '../api/other/identity.js';
19
+ import { TranslationApi } from '../api/other/translation.js';
20
+ import { VeroApi } from '../api/other/vero.js';
21
+ import { TradingApiClient } from '../api/client-trading.js';
22
+ import { TradingApi } from '../api/trading/trading.js';
23
+ export class EbaySellerApi {
24
+ client;
25
+ account;
26
+ inventory;
27
+ fulfillment;
28
+ dispute;
29
+ marketing;
30
+ recommendation;
31
+ analytics;
32
+ metadata;
33
+ taxonomy;
34
+ negotiation;
35
+ message;
36
+ notification;
37
+ feedback;
38
+ identity;
39
+ compliance;
40
+ vero;
41
+ translation;
42
+ edelivery;
43
+ developer;
44
+ trading;
45
+ constructor(config, context) {
46
+ this.client = new EbayApiClient(config, context);
47
+ this.account = new AccountApi(this.client);
48
+ this.inventory = new InventoryApi(this.client);
49
+ this.fulfillment = new FulfillmentApi(this.client);
50
+ this.dispute = new DisputeApi(this.client);
51
+ this.marketing = new MarketingApi(this.client);
52
+ this.recommendation = new RecommendationApi(this.client);
53
+ this.analytics = new AnalyticsApi(this.client);
54
+ this.metadata = new MetadataApi(this.client);
55
+ this.taxonomy = new TaxonomyApi(this.client);
56
+ this.negotiation = new NegotiationApi(this.client);
57
+ this.message = new MessageApi(this.client);
58
+ this.notification = new NotificationApi(this.client);
59
+ this.feedback = new FeedbackApi(this.client);
60
+ this.identity = new IdentityApi(this.client);
61
+ this.compliance = new ComplianceApi(this.client);
62
+ this.vero = new VeroApi(this.client);
63
+ this.translation = new TranslationApi(this.client);
64
+ this.edelivery = new EDeliveryApi(this.client);
65
+ this.developer = new DeveloperApi(this.client);
66
+ const tradingClient = new TradingApiClient(this.client);
67
+ this.trading = new TradingApi(tradingClient);
68
+ }
69
+ async initialize() {
70
+ await this.client.initialize();
71
+ }
72
+ isAuthenticated() {
73
+ return this.client.isAuthenticated();
74
+ }
75
+ hasUserTokens() {
76
+ return this.client.hasUserTokens();
77
+ }
78
+ async setUserTokens(accessToken, refreshToken, accessTokenExpiry, refreshTokenExpiry) {
79
+ await this.client.setUserTokens(accessToken, refreshToken, accessTokenExpiry, refreshTokenExpiry);
80
+ }
81
+ getAuthClient() {
82
+ return this.client;
83
+ }
84
+ getTokenInfo() {
85
+ return this.client.getTokenInfo();
86
+ }
87
+ }
88
+ export * from '../api/account-management/account.js';
89
+ export * from '../api/analytics-and-report/analytics.js';
90
+ export * from '../api/client.js';
91
+ export * from '../api/communication/feedback.js';
92
+ export * from '../api/communication/message.js';
93
+ export * from '../api/communication/negotiation.js';
94
+ export * from '../api/communication/notification.js';
95
+ export * from '../api/listing-management/inventory.js';
96
+ export * from '../api/listing-metadata/metadata.js';
97
+ export * from '../api/listing-metadata/taxonomy.js';
98
+ export * from '../api/marketing-and-promotions/marketing.js';
99
+ export * from '../api/marketing-and-promotions/recommendation.js';
100
+ export * from '../api/order-management/dispute.js';
101
+ export * from '../api/order-management/fulfillment.js';
102
+ export * from '../api/other/compliance.js';
103
+ export * from '../api/other/edelivery.js';
104
+ export * from '../api/other/identity.js';
105
+ export * from '../api/other/translation.js';
106
+ export * from '../api/other/vero.js';
107
+ export * from '../api/developer/developer.js';
108
+ export * from '../api/trading/trading.js';
109
+ export * from '../api/client-trading.js';