ebay-mcp 2.0.5 → 2.0.6

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 (198) hide show
  1. package/README.md +18 -18
  2. package/build/auth/credentialSession.js +2 -2
  3. package/build/auth/oauth.js +6 -6
  4. package/build/auth/oauthHelper.js +2 -2
  5. package/build/auth/oauthMiddleware.js +1 -1
  6. package/build/auth/scopeUtils.js +1 -1
  7. package/build/{tools/categories/tokenManagement.js → auth/tokenManagementTools.js} +5 -5
  8. package/build/auth/tokenVerifier.js +2 -2
  9. package/build/{scripts → cli}/autoSetup.js +2 -2
  10. package/build/{scripts → cli}/diagnostics.js +10 -10
  11. package/build/{scripts → cli}/interactiveSetup.js +6 -6
  12. package/build/{scripts → cli}/scopeHelper.js +2 -2
  13. package/build/{scripts → cli}/securityChecker.js +1 -1
  14. package/build/{scripts → cli}/setup.js +10 -10
  15. package/build/{scripts → cli}/setupValidator.js +4 -4
  16. package/build/{scripts → cli}/setupWizard.js +1 -1
  17. package/build/{skills → cli/skills}/content.js +3 -3
  18. package/build/{skills → cli/skills}/index.js +11 -11
  19. package/build/{skills → cli/skills}/install.js +1 -1
  20. package/build/{skills → cli/skills}/registrySnapshot.js +1 -1
  21. package/build/{skills → cli/skills}/render.js +1 -1
  22. package/build/{scripts → cli}/skills.js +4 -4
  23. package/build/{api/account-management/account.js → ebay-apis/account/accountApi.js} +1 -1
  24. package/build/{schemas/account-management/account.js → ebay-apis/account/accountSchemas.js} +1 -1
  25. package/build/{tools/categories/account.js → ebay-apis/account/accountTools.js} +2 -2
  26. package/build/{api/account-management/accountV2.js → ebay-apis/account/accountV2Api.js} +1 -1
  27. package/build/{schemas/account-management/accountV2.js → ebay-apis/account/accountV2Schemas.js} +1 -1
  28. package/build/{tools/categories/accountV2.js → ebay-apis/account/accountV2Tools.js} +2 -2
  29. package/build/{api/analytics-and-report/analytics.js → ebay-apis/analytics/analyticsApi.js} +1 -1
  30. package/build/{tools/categories/analytics.js → ebay-apis/analytics/analyticsTools.js} +3 -3
  31. package/build/{api/other/browse.js → ebay-apis/browse/browseApi.js} +5 -5
  32. package/build/{api/other → ebay-apis/browse}/browseFilter.js +1 -1
  33. package/build/{api/other → ebay-apis/browse}/browseMappers.js +2 -2
  34. package/build/{tools/categories/browse.js → ebay-apis/browse/browseTools.js} +2 -2
  35. package/build/{api/other → ebay-apis/browse}/browseValidators.js +2 -2
  36. package/build/{tools/categories/communication.js → ebay-apis/communication/communicationTools.js} +5 -5
  37. package/build/{api/communication/feedback.js → ebay-apis/communication/feedbackApi.js} +1 -1
  38. package/build/{api/communication/message.js → ebay-apis/communication/messageApi.js} +1 -1
  39. package/build/{schemas/communication/messages.js → ebay-apis/communication/messageSchemas.js} +1 -1
  40. package/build/{api/communication/negotiation.js → ebay-apis/communication/negotiationApi.js} +1 -1
  41. package/build/{api/communication/notification.js → ebay-apis/communication/notificationApi.js} +1 -1
  42. package/build/{utils/communication/notification.js → ebay-apis/communication/notificationHelpers.js} +1 -1
  43. package/build/{api/developer/developer.js → ebay-apis/developer/developerApi.js} +2 -2
  44. package/build/{tools/categories/developer.js → ebay-apis/developer/developerTools.js} +4 -4
  45. package/build/ebay-apis/ebaySellerApi.js +175 -0
  46. package/build/{api/listing-management/feed.js → ebay-apis/feed/feedApi.js} +3 -3
  47. package/build/{api/listing-management/feedReportTasks.js → ebay-apis/feed/feedReportTasksApi.js} +3 -3
  48. package/build/{api/listing-management/feedRequest.js → ebay-apis/feed/feedRequestApi.js} +3 -3
  49. package/build/{api/listing-management/feedSchedules.js → ebay-apis/feed/feedSchedulesApi.js} +3 -3
  50. package/build/{api/listing-management/feedTasks.js → ebay-apis/feed/feedTasksApi.js} +3 -3
  51. package/build/{tools/categories/feed.js → ebay-apis/feed/feedTools.js} +5 -5
  52. package/build/{api/account-management/finances.js → ebay-apis/finances/financesApi.js} +3 -3
  53. package/build/{tools/categories/finances.js → ebay-apis/finances/financesTools.js} +3 -3
  54. package/build/{api/order-management/dispute.js → ebay-apis/fulfillment/disputeApi.js} +3 -3
  55. package/build/{api/order-management/fulfillment.js → ebay-apis/fulfillment/fulfillmentApi.js} +1 -1
  56. package/build/{tools/categories/fulfillment.js → ebay-apis/fulfillment/fulfillmentTools.js} +4 -4
  57. package/build/{schemas/fulfillment/orders.js → ebay-apis/fulfillment/ordersSchemas.js} +1 -1
  58. package/build/{api/listing-management/inventory.js → ebay-apis/inventory/inventoryApi.js} +3 -3
  59. package/build/{schemas/inventory-management/inventory.js → ebay-apis/inventory/inventorySchemas.js} +1 -1
  60. package/build/{tools/categories/inventory.js → ebay-apis/inventory/inventoryTools.js} +4 -4
  61. package/build/{api/listing-management/items.js → ebay-apis/inventory/itemsApi.js} +2 -2
  62. package/build/{api/listing-management/locations.js → ebay-apis/inventory/locationsApi.js} +2 -2
  63. package/build/{api/listing-management/media.js → ebay-apis/inventory/mediaApi.js} +5 -5
  64. package/build/{api/listing-management/mediaAttach.js → ebay-apis/inventory/mediaAttachApi.js} +2 -2
  65. package/build/{api/listing-management/mediaResources.js → ebay-apis/inventory/mediaResourcesApi.js} +4 -4
  66. package/build/{tools/categories/media.js → ebay-apis/inventory/mediaTools.js} +5 -5
  67. package/build/{api/listing-management/offerFormat.js → ebay-apis/inventory/offerFormatApi.js} +3 -3
  68. package/build/{api/listing-management/offers.js → ebay-apis/inventory/offersApi.js} +3 -3
  69. package/build/{api/order-management/logistics.js → ebay-apis/logistics/logisticsApi.js} +2 -2
  70. package/build/{schemas/fulfillment/logistics.js → ebay-apis/logistics/logisticsSchemas.js} +2 -2
  71. package/build/{tools/categories/logistics.js → ebay-apis/logistics/logisticsTools.js} +4 -4
  72. package/build/{api/marketing-and-promotions/ads.js → ebay-apis/marketing/adsApi.js} +2 -2
  73. package/build/{schemas/marketing/ads.js → ebay-apis/marketing/adsSchemas.js} +2 -2
  74. package/build/{api/marketing-and-promotions/campaigns.js → ebay-apis/marketing/campaignsApi.js} +2 -2
  75. package/build/{schemas/marketing/campaigns.js → ebay-apis/marketing/campaignsSchemas.js} +1 -1
  76. package/build/{api/marketing-and-promotions/marketing.js → ebay-apis/marketing/marketingApi.js} +4 -4
  77. package/build/ebay-apis/marketing/marketingSchemas.js +13 -0
  78. package/build/{tools/categories/marketing.js → ebay-apis/marketing/marketingTools.js} +2 -2
  79. package/build/{api/marketing-and-promotions/promotions.js → ebay-apis/marketing/promotionsApi.js} +2 -2
  80. package/build/{schemas/marketing/promotions.js → ebay-apis/marketing/promotionsSchemas.js} +2 -2
  81. package/build/{api/marketing-and-promotions/recommendation.js → ebay-apis/marketing/recommendationApi.js} +1 -1
  82. package/build/{api/marketing-and-promotions/reports.js → ebay-apis/marketing/reportsApi.js} +2 -2
  83. package/build/{schemas/marketing/reports.js → ebay-apis/marketing/reportsSchemas.js} +1 -1
  84. package/build/{api/listing-metadata/metadata.js → ebay-apis/metadata/metadataApi.js} +2 -2
  85. package/build/{api/listing-metadata/metadataShipping.js → ebay-apis/metadata/metadataShippingApi.js} +2 -2
  86. package/build/{schemas/metadata/shipping.js → ebay-apis/metadata/metadataShippingSchemas.js} +1 -1
  87. package/build/{tools/categories/metadata.js → ebay-apis/metadata/metadataTools.js} +3 -3
  88. package/build/{api/other/edelivery.js → ebay-apis/other/edelivery/edeliveryApi.js} +1 -1
  89. package/build/{api/other/identity.js → ebay-apis/other/identity/identityApi.js} +2 -2
  90. package/build/{utils/other/identity.js → ebay-apis/other/identity/identityHelpers.js} +2 -2
  91. package/build/{tools/categories/other.js → ebay-apis/other/otherTools.js} +2 -2
  92. package/build/{api/other/translation.js → ebay-apis/other/translation/translationApi.js} +1 -1
  93. package/build/{utils/other/translation.js → ebay-apis/other/translation/translationHelpers.js} +2 -2
  94. package/build/{api/other/vero.js → ebay-apis/other/vero/veroApi.js} +1 -1
  95. package/build/{utils/other/vero.js → ebay-apis/other/vero/veroHelpers.js} +2 -2
  96. package/build/{api/listing-management/stores.js → ebay-apis/stores/storesApi.js} +2 -2
  97. package/build/{tools/categories/stores.js → ebay-apis/stores/storesTools.js} +2 -2
  98. package/build/{api/listing-metadata/charity.js → ebay-apis/taxonomy/charityApi.js} +2 -2
  99. package/build/{tools/categories/charity.js → ebay-apis/taxonomy/charityTools.js} +2 -2
  100. package/build/{api/listing-metadata/taxonomy.js → ebay-apis/taxonomy/taxonomyApi.js} +3 -3
  101. package/build/{tools/categories/taxonomy.js → ebay-apis/taxonomy/taxonomyTools.js} +3 -3
  102. package/build/{api/trading/listingFormat.js → ebay-apis/trading/listingFormatHelpers.js} +4 -4
  103. package/build/{api/trading/trading.js → ebay-apis/trading/tradingApi.js} +4 -4
  104. package/build/{utils/trading/trading.js → ebay-apis/trading/tradingHelpers.js} +1 -1
  105. package/build/{tools/categories/trading.js → ebay-apis/trading/tradingTools.js} +2 -2
  106. package/build/{api/shared → ebay-client}/download.js +1 -1
  107. package/build/{api/client → ebay-client}/ebayApiClient.js +9 -9
  108. package/build/{api/shared → ebay-client}/location.js +1 -1
  109. package/build/{api/shared → ebay-client}/request.js +1 -1
  110. package/build/{api/client → ebay-client}/tradingApiClient.js +7 -7
  111. package/build/index.js +8 -8
  112. package/build/{tools/categories/connector.js → server/connectorTools.js} +1 -1
  113. package/build/{mcp → server}/httpTransport.js +5 -5
  114. package/build/{mcp → server}/readOnlyFilter.js +6 -0
  115. package/build/{mcp → server}/runtime.js +9 -9
  116. package/build/{mcp → server}/toolGating.js +3 -3
  117. package/build/{mcp → server}/uiBridge.js +3 -3
  118. package/build/serverHttp.js +5 -5
  119. package/build/{utils → shared}/apiStatusFeed.js +1 -1
  120. package/build/{config → shared}/credentialFile.js +1 -1
  121. package/build/{config → shared}/environment.js +6 -6
  122. package/build/{utils → shared}/http.js +2 -2
  123. package/build/{utils → shared}/localMedia.js +1 -1
  124. package/build/{utils → shared}/logger.js +2 -2
  125. package/build/{config → shared}/toolFamilies.js +3 -3
  126. package/build/{tools → tool-registry}/contracts.js +1 -1
  127. package/build/{tools → tool-registry}/defineTool.js +3 -3
  128. package/build/{tools → tool-registry}/index.js +2 -2
  129. package/build/{tools → tool-registry}/registry.js +1 -1
  130. package/build/{tools → tool-registry}/schemas.js +16 -1
  131. package/build/{tools/categories/index.js → tool-registry/toolCategories.js} +21 -21
  132. package/build/{tools → tool-registry}/ui/maps.js +2 -2
  133. package/build/{tools → tool-registry}/ui/viewModels.js +1 -1
  134. package/package.json +10 -15
  135. package/build/api/ebaySellerApi.js +0 -175
  136. package/build/schemas/marketing/marketing.js +0 -13
  137. package/build/scripts/buildMcpApps.js +0 -49
  138. package/build/scripts/devSync.js +0 -432
  139. package/build/scripts/specCoverage.js +0 -78
  140. package/build/scripts/specDownload.js +0 -42
  141. package/build/scripts/specRefs.js +0 -54
  142. package/build/scripts/specSources.js +0 -142
  143. package/build/scripts/specTypeNames.js +0 -23
  144. /package/build/{scripts → cli}/setupShared.js +0 -0
  145. /package/build/{skills → cli/skills}/markers.js +0 -0
  146. /package/build/{skills → cli/skills}/targets.js +0 -0
  147. /package/build/{skills → cli/skills}/types.js +0 -0
  148. /package/build/{schemas/analytics/analytics.js → ebay-apis/analytics/analyticsSchemas.js} +0 -0
  149. /package/build/{schemas/other/browse.js → ebay-apis/browse/browseSchemas.js} +0 -0
  150. /package/build/{api/other → ebay-apis/browse}/browseTypes.js +0 -0
  151. /package/build/{utils/communication/feedback.js → ebay-apis/communication/feedbackHelpers.js} +0 -0
  152. /package/build/{utils/communication/message.js → ebay-apis/communication/messageHelpers.js} +0 -0
  153. /package/build/{utils/communication/negotiation.js → ebay-apis/communication/negotiationHelpers.js} +0 -0
  154. /package/build/{schemas/developer/developer.js → ebay-apis/developer/developerSchemas.js} +0 -0
  155. /package/build/{schemas/inventory-management/feed.js → ebay-apis/feed/feedSchemas.js} +0 -0
  156. /package/build/{schemas/account-management/finances.js → ebay-apis/finances/financesSchemas.js} +0 -0
  157. /package/build/{api/order-management → ebay-apis/fulfillment}/orderIssueHelpers.js +0 -0
  158. /package/build/{api/listing-management/shared.js → ebay-apis/inventory/inventorySharedApi.js} +0 -0
  159. /package/build/{schemas/inventory-management/mediaDocuments.js → ebay-apis/inventory/mediaDocumentsSchemas.js} +0 -0
  160. /package/build/{schemas/inventory-management/media.js → ebay-apis/inventory/mediaSchemas.js} +0 -0
  161. /package/build/{schemas/marketing/common.js → ebay-apis/marketing/marketingCommonSchemas.js} +0 -0
  162. /package/build/{api/marketing-and-promotions/shared.js → ebay-apis/marketing/marketingSharedApi.js} +0 -0
  163. /package/build/{schemas/metadata/metadata.js → ebay-apis/metadata/metadataSchemas.js} +0 -0
  164. /package/build/{schemas/other/otherApis.js → ebay-apis/other/otherApisSchemas.js} +0 -0
  165. /package/build/{schemas/inventory-management/stores.js → ebay-apis/stores/storesSchemas.js} +0 -0
  166. /package/build/{schemas/taxonomy/categoryTree.js → ebay-apis/taxonomy/categoryTreeSchemas.js} +0 -0
  167. /package/build/{schemas/taxonomy/charity.js → ebay-apis/taxonomy/charitySchemas.js} +0 -0
  168. /package/build/{schemas/taxonomy/taxonomy.js → ebay-apis/taxonomy/taxonomySchemas.js} +0 -0
  169. /package/build/{api/shared → ebay-client}/auctionPricing.js +0 -0
  170. /package/build/{api/client → ebay-client}/ebayClientRequestError.js +0 -0
  171. /package/build/{api/client → ebay-client}/rateLimitTracker.js +0 -0
  172. /package/build/{api/client → ebay-client}/signEbayRequest.js +0 -0
  173. /package/build/{api/client → ebay-client}/tradingApiFailure.js +0 -0
  174. /package/build/{utils → shared}/cliOutput.js +0 -0
  175. /package/build/{utils → shared}/cliUi.js +0 -0
  176. /package/build/{utils → shared}/dateConverter.js +0 -0
  177. /package/build/{types → shared}/ebay.js +0 -0
  178. /package/build/{types → shared}/ebayEnums.js +0 -0
  179. /package/build/{utils → shared}/entryModule.js +0 -0
  180. /package/build/{utils → shared}/envFile.js +0 -0
  181. /package/build/{utils → shared}/envParser.js +0 -0
  182. /package/build/{utils → shared}/errors.js +0 -0
  183. /package/build/{types → shared}/index.js +0 -0
  184. /package/build/{utils → shared}/llmClientDetector.js +0 -0
  185. /package/build/{utils → shared}/localFeedFiles.js +0 -0
  186. /package/build/{utils → shared}/logRedaction.js +0 -0
  187. /package/build/{config → shared}/mediaAccess.js +0 -0
  188. /package/build/{config → shared}/oauthScopes.js +0 -0
  189. /package/build/{utils → shared}/objects.js +0 -0
  190. /package/build/{utils → shared}/schemaHelpers.js +0 -0
  191. /package/build/{utils → shared}/tokenUtils.js +0 -0
  192. /package/build/{utils → shared}/typeGuards.js +0 -0
  193. /package/build/{utils → shared}/version.js +0 -0
  194. /package/build/{utils → shared}/zodIssues.js +0 -0
  195. /package/build/{tools → tool-registry}/fileResult.js +0 -0
  196. /package/build/{tools → tool-registry}/types.js +0 -0
  197. /package/build/{tools → tool-registry}/ui/archetypes.js +0 -0
  198. /package/build/{tools → tool-registry}/ui/mapHelpers.js +0 -0
@@ -1,4 +1,4 @@
1
- import { buildEndpointParams, optionalPositiveNumberEffect, optionalStringEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
1
+ import { buildEndpointParams, optionalPositiveNumberEffect, optionalStringEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
2
  import { Effect } from 'effect';
3
3
  /**
4
4
  * Notification API - Event notifications and subscriptions
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { idSchema } from '../../utils/schemaHelpers.js';
2
+ import { idSchema } from '../../shared/schemaHelpers.js';
3
3
  /**
4
4
  * Zod schemas for Notification API input validation.
5
5
  * OpenAPI spec: commerce_notification_v1_oas3.json
@@ -1,5 +1,5 @@
1
- import { buildEndpointParams, EbayApiError, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
2
- import { getClientRegistrationBaseUrl, getIdentityBaseUrl } from '../../config/environment.js';
1
+ import { buildEndpointParams, EbayApiError, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
+ import { getClientRegistrationBaseUrl, getIdentityBaseUrl } from '../../shared/environment.js';
3
3
  import { Effect } from 'effect';
4
4
  /**
5
5
  * Developer API - Rate limits, client registration, and signing keys
@@ -1,9 +1,9 @@
1
1
  import { zodToJsonSchema } from 'zod-to-json-schema';
2
2
  import { Effect } from 'effect';
3
- import { defineTool } from '../../tools/defineTool.js';
4
- import { mapRateLimitsToStat, mapUserRateLimitsToStat } from '../../tools/ui/maps.js';
5
- import { clientDetailsSchema, createSigningKeyInputSchema, getApiStatusInputSchema, getRateLimitsInputSchema, getSigningKeyInputSchema, getSigningKeysInputSchema, getUserRateLimitsInputSchema, querySigningKeysResponseSchema, rateLimitsResponseSchema, registerClientInputSchema, signingKeySchema, } from '../../schemas/developer/developer.js';
6
- import { getApiStatusFeed } from '../../utils/apiStatusFeed.js';
3
+ import { defineTool } from '../../tool-registry/defineTool.js';
4
+ import { mapRateLimitsToStat, mapUserRateLimitsToStat } from '../../tool-registry/ui/maps.js';
5
+ import { clientDetailsSchema, createSigningKeyInputSchema, getApiStatusInputSchema, getRateLimitsInputSchema, getSigningKeyInputSchema, getSigningKeysInputSchema, getUserRateLimitsInputSchema, querySigningKeysResponseSchema, rateLimitsResponseSchema, registerClientInputSchema, signingKeySchema, } from '../../ebay-apis/developer/developerSchemas.js';
6
+ import { getApiStatusFeed } from '../../shared/apiStatusFeed.js';
7
7
  /** Developer API tools for eBay application and keyset management. */
8
8
  export const developerEntries = [
9
9
  defineTool({
@@ -0,0 +1,175 @@
1
+ import { AccountApi } from '../ebay-apis/account/accountApi.js';
2
+ import { AccountV2Api } from '../ebay-apis/account/accountV2Api.js';
3
+ import { FinancesApi } from '../ebay-apis/finances/financesApi.js';
4
+ import { AnalyticsApi } from '../ebay-apis/analytics/analyticsApi.js';
5
+ import { EbayApiClient } from '../ebay-client/ebayApiClient.js';
6
+ import { FeedbackApi } from '../ebay-apis/communication/feedbackApi.js';
7
+ import { MessageApi } from '../ebay-apis/communication/messageApi.js';
8
+ import { NegotiationApi } from '../ebay-apis/communication/negotiationApi.js';
9
+ import { NotificationApi } from '../ebay-apis/communication/notificationApi.js';
10
+ import { DeveloperApi } from '../ebay-apis/developer/developerApi.js';
11
+ import { FeedApi } from '../ebay-apis/feed/feedApi.js';
12
+ import { InventoryApi } from '../ebay-apis/inventory/inventoryApi.js';
13
+ import { MediaApi } from '../ebay-apis/inventory/mediaApi.js';
14
+ import { StoresApi } from '../ebay-apis/stores/storesApi.js';
15
+ import { CharityApi } from '../ebay-apis/taxonomy/charityApi.js';
16
+ import { MetadataApi } from '../ebay-apis/metadata/metadataApi.js';
17
+ import { TaxonomyApi } from '../ebay-apis/taxonomy/taxonomyApi.js';
18
+ import { MarketingApi } from '../ebay-apis/marketing/marketingApi.js';
19
+ import { RecommendationApi } from '../ebay-apis/marketing/recommendationApi.js';
20
+ import { DisputeApi } from '../ebay-apis/fulfillment/disputeApi.js';
21
+ import { FulfillmentApi } from '../ebay-apis/fulfillment/fulfillmentApi.js';
22
+ import { LogisticsApi } from '../ebay-apis/logistics/logisticsApi.js';
23
+ import { EDeliveryApi } from '../ebay-apis/other/edelivery/edeliveryApi.js';
24
+ import { BrowseApi } from '../ebay-apis/browse/browseApi.js';
25
+ import { IdentityApi } from '../ebay-apis/other/identity/identityApi.js';
26
+ import { TranslationApi } from '../ebay-apis/other/translation/translationApi.js';
27
+ import { VeroApi } from '../ebay-apis/other/vero/veroApi.js';
28
+ import { TradingApiClient } from '../ebay-client/tradingApiClient.js';
29
+ import { TradingApi } from '../ebay-apis/trading/tradingApi.js';
30
+ /**
31
+ * Main API facade providing access to all eBay APIs
32
+ */
33
+ export class EbaySellerApi {
34
+ client;
35
+ config;
36
+ // API categories
37
+ account;
38
+ accountV2;
39
+ finances;
40
+ inventory;
41
+ media;
42
+ feed;
43
+ stores;
44
+ fulfillment;
45
+ logistics;
46
+ dispute;
47
+ marketing;
48
+ recommendation;
49
+ analytics;
50
+ metadata;
51
+ taxonomy;
52
+ charity;
53
+ negotiation;
54
+ message;
55
+ notification;
56
+ feedback;
57
+ identity;
58
+ vero;
59
+ translation;
60
+ edelivery;
61
+ browse;
62
+ developer;
63
+ trading;
64
+ constructor(config) {
65
+ this.config = config;
66
+ this.client = new EbayApiClient(config);
67
+ // Initialize API category handlers
68
+ this.account = new AccountApi(this.client);
69
+ this.accountV2 = new AccountV2Api(this.client);
70
+ this.finances = new FinancesApi(this.client);
71
+ this.inventory = new InventoryApi(this.client);
72
+ this.media = new MediaApi(this.client, this.inventory);
73
+ this.feed = new FeedApi(this.client);
74
+ this.stores = new StoresApi(this.client);
75
+ this.fulfillment = new FulfillmentApi(this.client);
76
+ this.logistics = new LogisticsApi(this.client);
77
+ this.dispute = new DisputeApi(this.client);
78
+ this.marketing = new MarketingApi(this.client);
79
+ this.recommendation = new RecommendationApi(this.client);
80
+ this.analytics = new AnalyticsApi(this.client);
81
+ this.metadata = new MetadataApi(this.client);
82
+ this.taxonomy = new TaxonomyApi(this.client);
83
+ this.charity = new CharityApi(this.client);
84
+ this.negotiation = new NegotiationApi(this.client);
85
+ this.message = new MessageApi(this.client);
86
+ this.notification = new NotificationApi(this.client);
87
+ this.feedback = new FeedbackApi(this.client);
88
+ this.identity = new IdentityApi(this.client);
89
+ this.vero = new VeroApi(this.client);
90
+ this.translation = new TranslationApi(this.client);
91
+ this.edelivery = new EDeliveryApi(this.client);
92
+ this.browse = new BrowseApi(this.client);
93
+ this.developer = new DeveloperApi(this.client);
94
+ const tradingClient = new TradingApiClient(this.client);
95
+ this.trading = new TradingApi(tradingClient);
96
+ }
97
+ /**
98
+ * Initialize the API (load tokens from storage)
99
+ */
100
+ initialize = () => this.client.initialize();
101
+ /**
102
+ * Check if the API client is authenticated
103
+ */
104
+ isAuthenticated() {
105
+ return this.client.isAuthenticated();
106
+ }
107
+ /**
108
+ * Check if user tokens are available
109
+ */
110
+ hasUserTokens() {
111
+ return this.client.hasUserTokens();
112
+ }
113
+ /**
114
+ * Set user access and refresh tokens
115
+ */
116
+ setUserTokens = (accessToken, refreshToken, accessTokenExpiry, refreshTokenExpiry) => this.client.setUserTokens(accessToken, refreshToken, accessTokenExpiry, refreshTokenExpiry);
117
+ /**
118
+ * Get OAuth client for advanced operations
119
+ */
120
+ getAuthClient() {
121
+ return this.client;
122
+ }
123
+ /**
124
+ * Returns the validated runtime configuration used to construct this API facade.
125
+ *
126
+ * @returns eBay API runtime configuration with credentials, environment, and proxy flags.
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * const environment = api.getConfig().environment;
131
+ * ```
132
+ */
133
+ getConfig() {
134
+ return this.config;
135
+ }
136
+ /**
137
+ * Get token information for debugging
138
+ */
139
+ getTokenInfo() {
140
+ return this.client.getTokenInfo();
141
+ }
142
+ }
143
+ export * from '../ebay-apis/account/accountApi.js';
144
+ export * from '../ebay-apis/account/accountV2Api.js';
145
+ export * from '../ebay-apis/finances/financesApi.js';
146
+ export * from '../ebay-apis/analytics/analyticsApi.js';
147
+ export * from '../ebay-client/ebayApiClient.js';
148
+ export * from '../ebay-apis/communication/feedbackApi.js';
149
+ export * from '../ebay-apis/communication/messageApi.js';
150
+ export * from '../ebay-apis/communication/negotiationApi.js';
151
+ export * from '../ebay-apis/communication/notificationApi.js';
152
+ export * from '../ebay-apis/feed/feedApi.js';
153
+ export * from '../ebay-apis/inventory/inventoryApi.js';
154
+ export * from '../ebay-apis/inventory/mediaApi.js';
155
+ export * from '../ebay-apis/inventory/mediaAttachApi.js';
156
+ export * from '../ebay-apis/stores/storesApi.js';
157
+ export * from '../ebay-apis/taxonomy/charityApi.js';
158
+ export * from '../ebay-apis/metadata/metadataApi.js';
159
+ export * from '../ebay-apis/taxonomy/taxonomyApi.js';
160
+ export * from '../ebay-apis/marketing/marketingApi.js';
161
+ export * from '../ebay-apis/marketing/recommendationApi.js';
162
+ export * from '../ebay-apis/fulfillment/disputeApi.js';
163
+ export * from '../ebay-apis/fulfillment/fulfillmentApi.js';
164
+ export * from '../ebay-apis/logistics/logisticsApi.js';
165
+ export * from '../ebay-apis/other/edelivery/edeliveryApi.js';
166
+ export { BrowseApi } from '../ebay-apis/browse/browseApi.js';
167
+ export { buildBrowseFilter, requireNoPriceFilterConflict, } from '../ebay-apis/browse/browseFilter.js';
168
+ export { mapItemDetailsResponse, mapItemSummary, mapSearchActiveItemsResponse, } from '../ebay-apis/browse/browseMappers.js';
169
+ export { BROWSE_SORT_VALUES, } from '../ebay-apis/browse/browseTypes.js';
170
+ export * from '../ebay-apis/other/identity/identityApi.js';
171
+ export * from '../ebay-apis/other/translation/translationApi.js';
172
+ export * from '../ebay-apis/other/vero/veroApi.js';
173
+ export * from '../ebay-apis/developer/developerApi.js';
174
+ export * from '../ebay-apis/trading/tradingApi.js';
175
+ export * from '../ebay-client/tradingApiClient.js';
@@ -1,6 +1,6 @@
1
- import { createFeedReportTaskMethods } from './feedReportTasks.js';
2
- import { createFeedScheduleMethods } from './feedSchedules.js';
3
- import { createFeedTaskMethods } from './feedTasks.js';
1
+ import { createFeedReportTaskMethods } from './feedReportTasksApi.js';
2
+ import { createFeedScheduleMethods } from './feedSchedulesApi.js';
3
+ import { createFeedTaskMethods } from './feedTasksApi.js';
4
4
  /**
5
5
  * Feed API - asynchronous order, inventory, and customer service metric feed tasks and
6
6
  * schedules. Every member is the eBay operation of the same name; the endpoints live in
@@ -1,7 +1,7 @@
1
- import { decodeEndpointInputEffect, requestGetEffect } from '../../api/shared/request.js';
2
- import { createCustomerServiceMetricTaskInputSchema, createInventoryTaskInputSchema, createOrderTaskInputSchema, feedTaskIdInputSchema, getCustomerServiceMetricTasksInputSchema, getInventoryTasksInputSchema, getOrderTasksInputSchema, } from '../../schemas/inventory-management/feed.js';
1
+ import { decodeEndpointInputEffect, requestGetEffect } from '../../ebay-client/request.js';
2
+ import { createCustomerServiceMetricTaskInputSchema, createInventoryTaskInputSchema, createOrderTaskInputSchema, feedTaskIdInputSchema, getCustomerServiceMetricTasksInputSchema, getInventoryTasksInputSchema, getOrderTasksInputSchema, } from '../../ebay-apis/feed/feedSchemas.js';
3
3
  import { Effect } from 'effect';
4
- import { exclusiveFeedFilters, FEED_BASE_PATH, feedListParams, feedResourcePath, postFeedTask, } from './feedRequest.js';
4
+ import { exclusiveFeedFilters, FEED_BASE_PATH, feedListParams, feedResourcePath, postFeedTask, } from './feedRequestApi.js';
5
5
  /**
6
6
  * Creates the Feed API report-task endpoints that take filter criteria: order reports
7
7
  * (`order_task`), active inventory reports (`inventory_task`) and customer service metric
@@ -1,6 +1,6 @@
1
- import { requestDownloadEffect, } from '../../api/shared/download.js';
2
- import { locatedResourceId } from '../../api/shared/location.js';
3
- import { buildEndpointParams, EbayApiError, EndpointInputError, } from '../../api/shared/request.js';
1
+ import { requestDownloadEffect, } from '../../ebay-client/download.js';
2
+ import { locatedResourceId } from '../../ebay-client/location.js';
3
+ import { buildEndpointParams, EbayApiError, EndpointInputError, } from '../../ebay-client/request.js';
4
4
  import { Effect } from 'effect';
5
5
  /** Feed API base path on the default `api` host. */
6
6
  export const FEED_BASE_PATH = '/sell/feed/v1';
@@ -1,7 +1,7 @@
1
- import { decodeEndpointInputEffect, EndpointInputError, requestDeleteEffect, requestGetEffect, requestPutEffect, } from '../../api/shared/request.js';
2
- import { createFeedScheduleInputSchema, feedScheduleIdInputSchema, feedScheduleTemplateIdInputSchema, feedTypePageInputSchema, updateFeedScheduleInputSchema, } from '../../schemas/inventory-management/feed.js';
1
+ import { decodeEndpointInputEffect, EndpointInputError, requestDeleteEffect, requestGetEffect, requestPutEffect, } from '../../ebay-client/request.js';
2
+ import { createFeedScheduleInputSchema, feedScheduleIdInputSchema, feedScheduleTemplateIdInputSchema, feedTypePageInputSchema, updateFeedScheduleInputSchema, } from '../../ebay-apis/feed/feedSchemas.js';
3
3
  import { Effect } from 'effect';
4
- import { downloadFeedFile, FEED_BASE_PATH, feedListParams, feedResourcePath, postFeedResource, } from './feedRequest.js';
4
+ import { downloadFeedFile, FEED_BASE_PATH, feedListParams, feedResourcePath, postFeedResource, } from './feedRequestApi.js';
5
5
  /**
6
6
  * Creates the Feed API `schedule` resource endpoints: recurring report schedules, their
7
7
  * latest result file, and the templates schedules subscribe to.
@@ -1,7 +1,7 @@
1
- import { decodeEndpointInputEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
2
- import { createFeedTaskInputSchema, feedTaskIdInputSchema, getFeedTasksInputSchema, } from '../../schemas/inventory-management/feed.js';
1
+ import { decodeEndpointInputEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
+ import { createFeedTaskInputSchema, feedTaskIdInputSchema, getFeedTasksInputSchema, } from '../../ebay-apis/feed/feedSchemas.js';
3
3
  import { Effect } from 'effect';
4
- import { downloadFeedFile, exclusiveFeedFilters, FEED_BASE_PATH, feedListParams, feedResourcePath, postFeedTask, } from './feedRequest.js';
4
+ import { downloadFeedFile, exclusiveFeedFilters, FEED_BASE_PATH, feedListParams, feedResourcePath, postFeedTask, } from './feedRequestApi.js';
5
5
  /** Feed files can be up to 15 MB, far larger than JSON calls. */
6
6
  const UPLOAD_TIMEOUT_MS = 10 * 60_000;
7
7
  /** Multipart body documented for uploadFile: fileName, name=file, type=form-data, then the file. */
@@ -1,8 +1,8 @@
1
- import { getMediaAccessConfig } from '../../config/mediaAccess.js';
2
- import { createCustomerServiceMetricTaskInputSchema, createFeedScheduleInputSchema, createFeedTaskInputSchema, createInventoryTaskInputSchema, createOrderTaskInputSchema, feedScheduleIdInputSchema, feedScheduleTemplateIdInputSchema, feedTaskIdInputSchema, feedTypePageInputSchema, getCustomerServiceMetricTasksInputSchema, getFeedTasksInputSchema, getInventoryTasksInputSchema, getOrderTasksInputSchema, updateFeedScheduleInputSchema, uploadFeedFileInputSchema, } from '../../schemas/inventory-management/feed.js';
3
- import { defineTool } from '../../tools/defineTool.js';
4
- import { formatFileResult } from '../../tools/fileResult.js';
5
- import { loadLocalMedia } from '../../utils/localMedia.js';
1
+ import { getMediaAccessConfig } from '../../shared/mediaAccess.js';
2
+ import { createCustomerServiceMetricTaskInputSchema, createFeedScheduleInputSchema, createFeedTaskInputSchema, createInventoryTaskInputSchema, createOrderTaskInputSchema, feedScheduleIdInputSchema, feedScheduleTemplateIdInputSchema, feedTaskIdInputSchema, feedTypePageInputSchema, getCustomerServiceMetricTasksInputSchema, getFeedTasksInputSchema, getInventoryTasksInputSchema, getOrderTasksInputSchema, updateFeedScheduleInputSchema, uploadFeedFileInputSchema, } from '../../ebay-apis/feed/feedSchemas.js';
3
+ import { defineTool } from '../../tool-registry/defineTool.js';
4
+ import { formatFileResult } from '../../tool-registry/fileResult.js';
5
+ import { loadLocalMedia } from '../../shared/localMedia.js';
6
6
  import { Effect } from 'effect';
7
7
  const TASK_SCOPE_NOTE = 'The OAuth scope depends on the feed type: sell.inventory for LMS listing and inventory feeds, sell.fulfillment for LMS_ORDER_ACK and LMS_ORDER_REPORT (sell.marketing and commerce.catalog.readonly feed types are reserved by eBay).';
8
8
  const SCHEDULE_SCOPE_NOTE = 'Schedules exist only for LMS_ORDER_REPORT, which requires sell.fulfillment.';
@@ -1,6 +1,6 @@
1
- import { buildEndpointParams, decodeEndpointInputEffect, EbayApiError, requestGetEffect, } from '../../api/shared/request.js';
2
- import { getIdentityBaseUrl } from '../../config/environment.js';
3
- import { getBillingActivitiesInputSchema, getOrderEarningsByIdInputSchema, getOrderEarningsInputSchema, getOrderEarningsSummaryInputSchema, getPayoutInputSchema, getPayoutSummaryInputSchema, getPayoutsInputSchema, getSellerFundsSummaryInputSchema, getTransactionSummaryInputSchema, getTransactionsInputSchema, getTransferInputSchema, } from '../../schemas/account-management/finances.js';
1
+ import { buildEndpointParams, decodeEndpointInputEffect, EbayApiError, requestGetEffect, } from '../../ebay-client/request.js';
2
+ import { getIdentityBaseUrl } from '../../shared/environment.js';
3
+ import { getBillingActivitiesInputSchema, getOrderEarningsByIdInputSchema, getOrderEarningsInputSchema, getOrderEarningsSummaryInputSchema, getPayoutInputSchema, getPayoutSummaryInputSchema, getPayoutsInputSchema, getSellerFundsSummaryInputSchema, getTransactionSummaryInputSchema, getTransactionsInputSchema, getTransferInputSchema, } from '../../ebay-apis/finances/financesSchemas.js';
4
4
  import { Effect } from 'effect';
5
5
  const BASE_PATH = '/sell/finances/v1';
6
6
  /** Maps the shared filter/limit/offset/sort fields to their eBay query names. */
@@ -1,6 +1,6 @@
1
- import { FINANCES_EARNINGS_SCOPE } from '../../config/environment.js';
2
- import { getBillingActivitiesInputSchema, getOrderEarningsByIdInputSchema, getOrderEarningsInputSchema, getOrderEarningsSummaryInputSchema, getPayoutInputSchema, getPayoutSummaryInputSchema, getPayoutsInputSchema, getSellerFundsSummaryInputSchema, getTransactionSummaryInputSchema, getTransactionsInputSchema, getTransferInputSchema, } from '../../schemas/account-management/finances.js';
3
- import { defineTool } from '../../tools/defineTool.js';
1
+ import { FINANCES_EARNINGS_SCOPE } from '../../shared/environment.js';
2
+ import { getBillingActivitiesInputSchema, getOrderEarningsByIdInputSchema, getOrderEarningsInputSchema, getOrderEarningsSummaryInputSchema, getPayoutInputSchema, getPayoutSummaryInputSchema, getPayoutsInputSchema, getSellerFundsSummaryInputSchema, getTransactionSummaryInputSchema, getTransactionsInputSchema, getTransferInputSchema, } from '../../ebay-apis/finances/financesSchemas.js';
3
+ import { defineTool } from '../../tool-registry/defineTool.js';
4
4
  import { Effect } from 'effect';
5
5
  const FINANCES_SCOPE_NOTE = 'Requires the sell.finances scope. eBay requires Digital Signatures on Finances API calls for EU/UK sellers; set EBAY_SIGNING_KEY_JWE and EBAY_SIGNING_PRIVATE_KEY to sign them.';
6
6
  const EARNINGS_SCOPE_NOTE = `Requires the optional ${FINANCES_EARNINGS_SCOPE} scope, which is not requested by default: add it to EBAY_OAUTH_SCOPES and re-run OAuth consent. eBay grants it only to approved US, CN, or HK sellers with USD payouts. eBay requires Digital Signatures on Finances API calls for EU/UK sellers; set EBAY_SIGNING_KEY_JWE and EBAY_SIGNING_PRIVATE_KEY to sign them.`;
@@ -1,6 +1,6 @@
1
- import { buildEndpointParams, EndpointInputError, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
2
- import { getIdentityBaseUrl } from '../../config/environment.js';
3
- import { isRecord } from '../../utils/typeGuards.js';
1
+ import { buildEndpointParams, EndpointInputError, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
+ import { getIdentityBaseUrl } from '../../shared/environment.js';
3
+ import { isRecord } from '../../shared/typeGuards.js';
4
4
  import { Effect } from 'effect';
5
5
  const requireUploadEvidenceFileBodyEffect = (evidenceFile) => {
6
6
  if (evidenceFile instanceof ArrayBuffer ||
@@ -1,4 +1,4 @@
1
- import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
1
+ import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
2
  import { Effect } from 'effect';
3
3
  /** eBay Fulfillment order, shipping fulfillment, and refund endpoints. */
4
4
  export class FulfillmentApi {
@@ -1,8 +1,8 @@
1
1
  import { zodToJsonSchema } from 'zod-to-json-schema';
2
- import { defineTool } from '../../tools/defineTool.js';
3
- import { mapDisputeSummariesToTable, mapDisputeToCard, mapFulfillmentsToTable, mapOrdersToTable, mapOrderToCard, } from '../../tools/ui/maps.js';
4
- import { filterOrdersWithCancellationRequests, filterRefundedOrders, } from '../../api/order-management/orderIssueHelpers.js';
5
- import { acceptPaymentDisputeInputSchema, addEvidenceInputSchema, contestPaymentDisputeInputSchema, createShippingFulfillmentInputSchema, getCancellationRequestsInputSchema, getOrdersOutputSchema, getOrdersInputSchema, getOrderOutputSchema, getOrderInputSchema, createShippingFulfillmentOutputSchema, fetchEvidenceContentInputSchema, getActivitiesInputSchema, getRefundedOrdersInputSchema, getShippingFulfillmentsOutputSchema, getShippingFulfillmentsInputSchema, getShippingFulfillmentOutputSchema, getShippingFulfillmentInputSchema, getPaymentDisputeInputSchema, issueRefundOutputSchema, issueRefundInputSchema, getPaymentDisputeSummariesOutputSchema, getPaymentDisputeSummariesInputSchema, uploadEvidenceFileInputSchema, updateEvidenceInputSchema, } from '../../schemas/fulfillment/orders.js';
2
+ import { defineTool } from '../../tool-registry/defineTool.js';
3
+ import { mapDisputeSummariesToTable, mapDisputeToCard, mapFulfillmentsToTable, mapOrdersToTable, mapOrderToCard, } from '../../tool-registry/ui/maps.js';
4
+ import { filterOrdersWithCancellationRequests, filterRefundedOrders, } from '../../ebay-apis/fulfillment/orderIssueHelpers.js';
5
+ import { acceptPaymentDisputeInputSchema, addEvidenceInputSchema, contestPaymentDisputeInputSchema, createShippingFulfillmentInputSchema, getCancellationRequestsInputSchema, getOrdersOutputSchema, getOrdersInputSchema, getOrderOutputSchema, getOrderInputSchema, createShippingFulfillmentOutputSchema, fetchEvidenceContentInputSchema, getActivitiesInputSchema, getRefundedOrdersInputSchema, getShippingFulfillmentsOutputSchema, getShippingFulfillmentsInputSchema, getShippingFulfillmentOutputSchema, getShippingFulfillmentInputSchema, getPaymentDisputeInputSchema, issueRefundOutputSchema, issueRefundInputSchema, getPaymentDisputeSummariesOutputSchema, getPaymentDisputeSummariesInputSchema, uploadEvidenceFileInputSchema, updateEvidenceInputSchema, } from '../../ebay-apis/fulfillment/ordersSchemas.js';
6
6
  import { Effect } from 'effect';
7
7
  /** Default number of recent orders scanned by cancellation/refund helpers. */
8
8
  const DEFAULT_ORDER_SCAN_LIMIT = 50;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { ReasonForRefund } from '../../types/ebayEnums.js';
2
+ import { ReasonForRefund } from '../../shared/ebayEnums.js';
3
3
  /**
4
4
  * Fulfillment/Order Management API Schemas
5
5
  *
@@ -1,6 +1,6 @@
1
- import { createInventoryItemsMethods } from './items.js';
2
- import { createInventoryLocationsMethods } from './locations.js';
3
- import { createInventoryOffersMethods } from './offers.js';
1
+ import { createInventoryItemsMethods } from './itemsApi.js';
2
+ import { createInventoryLocationsMethods } from './locationsApi.js';
3
+ import { createInventoryOffersMethods } from './offersApi.js';
4
4
  /**
5
5
  * Composes Inventory subdomain method maps onto one facade instance.
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { Condition, LengthUnit, WeightUnit, PricingVisibility, FormatType, ListingDuration, LocationType, MerchantLocationStatus, DayOfWeek, MarketplaceId, } from '../../types/ebayEnums.js';
2
+ import { Condition, LengthUnit, WeightUnit, PricingVisibility, FormatType, ListingDuration, LocationType, MerchantLocationStatus, DayOfWeek, MarketplaceId, } from '../../shared/ebayEnums.js';
3
3
  /**
4
4
  * Inventory Management API Schemas
5
5
  *
@@ -1,10 +1,10 @@
1
1
  import { Effect } from 'effect';
2
2
  import { z } from 'zod';
3
3
  import { zodToJsonSchema } from 'zod-to-json-schema';
4
- import { defineTool } from '../../tools/defineTool.js';
5
- import { mapInventoryItemsToTable, mapInventoryItemToCard, mapLocationsToTable, mapOffersToTable, mapOfferToCard, } from '../../tools/ui/maps.js';
6
- import { MarketplaceId } from '../../types/ebayEnums.js';
7
- import { bulkInventoryItemResponseSchema, bulkOfferRequestSchema, bulkOfferResponseSchema, bulkPublishResponseSchema, createInventoryItemOutputSchema, createInventoryLocationOutputSchema, createOfferOutputSchema, getInventoryItemGroupOutputSchema, getInventoryItemOutputSchema, getInventoryItemsOutputSchema, getInventoryLocationsOutputSchema, getOffersInputSchema, getOffersOutputSchema, getOffersBySkusOutputSchema, getProductCompatibilityOutputSchema, inventoryItemSchema, offerResponseSchema, offerSchema, publishOfferOutputSchema, updateOfferBodySchema, } from '../../schemas/inventory-management/inventory.js';
4
+ import { defineTool } from '../../tool-registry/defineTool.js';
5
+ import { mapInventoryItemsToTable, mapInventoryItemToCard, mapLocationsToTable, mapOffersToTable, mapOfferToCard, } from '../../tool-registry/ui/maps.js';
6
+ import { MarketplaceId } from '../../shared/ebayEnums.js';
7
+ import { bulkInventoryItemResponseSchema, bulkOfferRequestSchema, bulkOfferResponseSchema, bulkPublishResponseSchema, createInventoryItemOutputSchema, createInventoryLocationOutputSchema, createOfferOutputSchema, getInventoryItemGroupOutputSchema, getInventoryItemOutputSchema, getInventoryItemsOutputSchema, getInventoryLocationsOutputSchema, getOffersInputSchema, getOffersOutputSchema, getOffersBySkusOutputSchema, getProductCompatibilityOutputSchema, inventoryItemSchema, offerResponseSchema, offerSchema, publishOfferOutputSchema, updateOfferBodySchema, } from '../../ebay-apis/inventory/inventorySchemas.js';
8
8
  const emptyOutputSchema = {
9
9
  type: 'object',
10
10
  properties: {},
@@ -1,6 +1,6 @@
1
- import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
1
+ import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
2
  import { Effect } from 'effect';
3
- import { INVENTORY_BASE_PATH } from './shared.js';
3
+ import { INVENTORY_BASE_PATH } from './inventorySharedApi.js';
4
4
  /** Inventory API — items methods closed over a shared client. */
5
5
  export const createInventoryItemsMethods = (client) => ({
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
1
+ import { buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
2
  import { Effect } from 'effect';
3
- import { INVENTORY_BASE_PATH } from './shared.js';
3
+ import { INVENTORY_BASE_PATH } from './inventorySharedApi.js';
4
4
  /** Inventory API — locations methods closed over a shared client. */
5
5
  export const createInventoryLocationsMethods = (client) => ({
6
6
  /**
@@ -1,9 +1,9 @@
1
- import { EbayApiError, EndpointInputError, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
2
- import { getMediaBaseUrl } from '../../config/environment.js';
3
- import { getErrorMessage } from '../../utils/errors.js';
1
+ import { EbayApiError, EndpointInputError, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
+ import { getMediaBaseUrl } from '../../shared/environment.js';
3
+ import { getErrorMessage } from '../../shared/errors.js';
4
4
  import { Data, Effect } from 'effect';
5
- import { createMediaAttachMethods } from './mediaAttach.js';
6
- import { createMediaResourceMethods } from './mediaResources.js';
5
+ import { createMediaAttachMethods } from './mediaAttachApi.js';
6
+ import { createMediaResourceMethods } from './mediaResourcesApi.js';
7
7
  /** Media API base path; the host is `apim` rather than `api` (see {@link getMediaBaseUrl}). */
8
8
  export const MEDIA_BASE_PATH = '/commerce/media/v1_beta';
9
9
  /** Timeout for binary uploads, which can be far larger than JSON calls. */
@@ -1,5 +1,5 @@
1
- import { EndpointInputError } from '../../api/shared/request.js';
2
- import { getErrorMessage } from '../../utils/errors.js';
1
+ import { EndpointInputError } from '../../ebay-client/request.js';
2
+ import { getErrorMessage } from '../../shared/errors.js';
3
3
  import { Data, Effect } from 'effect';
4
4
  /** Attach run that uploaded media but left the inventory item untouched. */
5
5
  export class MediaAttachError extends Data.TaggedError('MediaAttachError') {
@@ -1,7 +1,7 @@
1
- import { locatedResourceId } from '../../api/shared/location.js';
2
- import { decodeEndpointInputEffect, EbayApiError } from '../../api/shared/request.js';
3
- import { getIdentityBaseUrl, getMediaBaseUrl } from '../../config/environment.js';
4
- import { createDocumentFromUrlInputSchema, createDocumentInputSchema, createImageFromUrlInputSchema, documentIdInputSchema, postOrderDocumentMetadataSchema, } from '../../schemas/inventory-management/mediaDocuments.js';
1
+ import { locatedResourceId } from '../../ebay-client/location.js';
2
+ import { decodeEndpointInputEffect, EbayApiError } from '../../ebay-client/request.js';
3
+ import { getIdentityBaseUrl, getMediaBaseUrl } from '../../shared/environment.js';
4
+ import { createDocumentFromUrlInputSchema, createDocumentInputSchema, createImageFromUrlInputSchema, documentIdInputSchema, postOrderDocumentMetadataSchema, } from '../../ebay-apis/inventory/mediaDocumentsSchemas.js';
5
5
  import { Effect } from 'effect';
6
6
  const BASE_PATH = '/commerce/media/v1_beta';
7
7
  const UPLOAD_TIMEOUT_MS = 10 * 60_000;
@@ -1,8 +1,8 @@
1
- import { createImageFromUrlInputSchema, createDocumentInputSchema, createDocumentFromUrlInputSchema, documentIdInputSchema, uploadDocumentInputSchema, uploadPostOrderDocumentInputSchema, } from '../../schemas/inventory-management/mediaDocuments.js';
2
- import { getMediaAccessConfig } from '../../config/mediaAccess.js';
3
- import { attachMediaInputSchema, attachMediaOutputSchema, uploadImagesInputSchema, uploadImagesOutputSchema, uploadVideoInputSchema, videoIdInputSchema, videoOutputSchema, } from '../../schemas/inventory-management/media.js';
4
- import { defineTool } from '../../tools/defineTool.js';
5
- import { loadLocalMedia, loadLocalMediaList } from '../../utils/localMedia.js';
1
+ import { createImageFromUrlInputSchema, createDocumentInputSchema, createDocumentFromUrlInputSchema, documentIdInputSchema, uploadDocumentInputSchema, uploadPostOrderDocumentInputSchema, } from '../../ebay-apis/inventory/mediaDocumentsSchemas.js';
2
+ import { getMediaAccessConfig } from '../../shared/mediaAccess.js';
3
+ import { attachMediaInputSchema, attachMediaOutputSchema, uploadImagesInputSchema, uploadImagesOutputSchema, uploadVideoInputSchema, videoIdInputSchema, videoOutputSchema, } from '../../ebay-apis/inventory/mediaSchemas.js';
4
+ import { defineTool } from '../../tool-registry/defineTool.js';
5
+ import { loadLocalMedia, loadLocalMediaList } from '../../shared/localMedia.js';
6
6
  import { Effect } from 'effect';
7
7
  import { zodToJsonSchema } from 'zod-to-json-schema';
8
8
  const MEDIA_ACCESS_NOTE = 'Local file access is opt-in: the file must sit inside a directory listed in EBAY_MCP_MEDIA_DIRS (or under EBAY_MCP_MEDIA_ROOT, which also anchors media://<relative-path> references). Symlinks are resolved before the check.';
@@ -1,6 +1,6 @@
1
- import { BUY_IT_NOW_MARGIN_LABEL, meetsBuyItNowMargin } from '../../api/shared/auctionPricing.js';
2
- import { EndpointInputError } from '../../api/shared/request.js';
3
- import { FormatType, ListingDuration } from '../../types/ebayEnums.js';
1
+ import { BUY_IT_NOW_MARGIN_LABEL, meetsBuyItNowMargin } from '../../ebay-client/auctionPricing.js';
2
+ import { EndpointInputError } from '../../ebay-client/request.js';
3
+ import { FormatType, ListingDuration } from '../../shared/ebayEnums.js';
4
4
  import { Effect } from 'effect';
5
5
  /** The only `availableQuantity` eBay accepts on an auction offer. */
6
6
  const AUCTION_QUANTITY = 1;
@@ -1,7 +1,7 @@
1
- import { EndpointInputError, buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
1
+ import { EndpointInputError, buildEndpointParams, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
2
2
  import { Effect, Either } from 'effect';
3
- import { validateOfferFormatEffect } from './offerFormat.js';
4
- import { INVENTORY_BASE_PATH } from './shared.js';
3
+ import { validateOfferFormatEffect } from './offerFormatApi.js';
4
+ import { INVENTORY_BASE_PATH } from './inventorySharedApi.js';
5
5
  /** Maximum number of SKU entries accepted by one batch lookup. */
6
6
  export const MAX_BATCH_GET_OFFERS_SKUS = 25;
7
7
  /** Maximum number of simultaneous eBay requests made by a batch lookup. */
@@ -1,5 +1,5 @@
1
- import { requestDownloadEffect, } from '../../api/shared/download.js';
2
- import { optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
1
+ import { requestDownloadEffect, } from '../../ebay-client/download.js';
2
+ import { optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../ebay-client/request.js';
3
3
  import { Effect } from 'effect';
4
4
  /**
5
5
  * Builds the per-call marketplace header; without an override the client's configured
@@ -1,9 +1,9 @@
1
- import { LengthUnit, MarketplaceId, WeightUnit } from '../../types/ebayEnums.js';
1
+ import { LengthUnit, MarketplaceId, WeightUnit } from '../../shared/ebayEnums.js';
2
2
  import { z } from 'zod';
3
3
  /**
4
4
  * Logistics API input schemas. The request bodies mirror the generated
5
5
  * `ShippingQuoteRequest` and `CreateShipmentFromQuoteRequest` DTOs in
6
- * `@/types/sell-apps/order-management/sellLogisticsV1Oas3.js`.
6
+ * `@/ebay-openapi-types/sellLogisticsV1Oas3.js`.
7
7
  */
8
8
  const nonempty = z.string().min(1).regex(/\S/, 'Must contain a non-whitespace character');
9
9
  const decimalString = z.string().regex(/^\d*\.?\d+$/, 'Must be a decimal number string');
@@ -1,7 +1,7 @@
1
- import { LOGISTICS_SCOPE, OAUTH_SCOPES_ENV } from '../../config/environment.js';
2
- import { createFromShippingQuoteInputSchema, createShippingQuoteInputSchema, shipmentIdInputSchema, shippingQuoteIdInputSchema, } from '../../schemas/fulfillment/logistics.js';
3
- import { defineTool } from '../../tools/defineTool.js';
4
- import { formatFileResult } from '../../tools/fileResult.js';
1
+ import { LOGISTICS_SCOPE, OAUTH_SCOPES_ENV } from '../../shared/environment.js';
2
+ import { createFromShippingQuoteInputSchema, createShippingQuoteInputSchema, shipmentIdInputSchema, shippingQuoteIdInputSchema, } from '../../ebay-apis/logistics/logisticsSchemas.js';
3
+ import { defineTool } from '../../tool-registry/defineTool.js';
4
+ import { formatFileResult } from '../../tool-registry/fileResult.js';
5
5
  import { Effect } from 'effect';
6
6
  const LOGISTICS_ACCESS_NOTE = `Logistics API is limited release (eBay-approved developers only, USPS rates and labels only) and needs the ${LOGISTICS_SCOPE} scope, which is not requested by default: eligible keysets add it to ${OAUTH_SCOPES_ENV} and re-consent.`;
7
7
  /** Logistics API tools for shipping quotes, shipments, and shipping labels. */
@@ -1,5 +1,5 @@
1
- import { buildEndpointParams, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, } from '../../api/shared/request.js';
2
- import { MARKETING_BASE_PATH } from './shared.js';
1
+ import { buildEndpointParams, requestDeleteEffect, requestGetEffect, requestPostEffect, requestPutEffect, } from '../../ebay-client/request.js';
2
+ import { MARKETING_BASE_PATH } from './marketingSharedApi.js';
3
3
  /** Marketing API — ads methods closed over a shared client. */
4
4
  export const createMarketingAdsMethods = (client) => ({
5
5
  /**
@@ -4,8 +4,8 @@
4
4
  * Zod schemas for Marketing endpoints. The barrel `marketing.ts` re-exports all slices.
5
5
  */
6
6
  import { z } from 'zod';
7
- import { errorSchema, amountSchema, alertSchema, marketingInventoryItemSchema } from './common.js';
8
- import { updateBidPercentageRequestSchema } from './campaigns.js';
7
+ import { errorSchema, amountSchema, alertSchema, marketingInventoryItemSchema, } from './marketingCommonSchemas.js';
8
+ import { updateBidPercentageRequestSchema } from './campaignsSchemas.js';
9
9
  // ============================================================================
10
10
  // Ad Group Management Schemas
11
11
  // ============================================================================
@@ -1,5 +1,5 @@
1
- import { buildEndpointParams, marketplaceHeader, requestDeleteEffect, requestGetEffect, requestPostEffect, } from '../../api/shared/request.js';
2
- import { MARKETING_BASE_PATH } from './shared.js';
1
+ import { buildEndpointParams, marketplaceHeader, requestDeleteEffect, requestGetEffect, requestPostEffect, } from '../../ebay-client/request.js';
2
+ import { MARKETING_BASE_PATH } from './marketingSharedApi.js';
3
3
  /** Marketing API — campaigns methods closed over a shared client. */
4
4
  export const createMarketingCampaignsMethods = (client) => ({
5
5
  /**
@@ -4,7 +4,7 @@
4
4
  * Zod schemas for Marketing endpoints. The barrel `marketing.ts` re-exports all slices.
5
5
  */
6
6
  import { z } from 'zod';
7
- import { amountSchema, alertSchema } from './common.js';
7
+ import { amountSchema, alertSchema } from './marketingCommonSchemas.js';
8
8
  // ============================================================================
9
9
  // Campaign Management Schemas
10
10
  // ============================================================================
@@ -1,7 +1,7 @@
1
- import { createMarketingAdsMethods } from './ads.js';
2
- import { createMarketingCampaignsMethods } from './campaigns.js';
3
- import { createMarketingPromotionsMethods } from './promotions.js';
4
- import { createMarketingReportsMethods } from './reports.js';
1
+ import { createMarketingAdsMethods } from './adsApi.js';
2
+ import { createMarketingCampaignsMethods } from './campaignsApi.js';
3
+ import { createMarketingPromotionsMethods } from './promotionsApi.js';
4
+ import { createMarketingReportsMethods } from './reportsApi.js';
5
5
  /**
6
6
  * Composes Marketing subdomain method maps onto one facade instance.
7
7
  */