ebay-mcp 1.18.0 → 1.18.2

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 (161) hide show
  1. package/README.md +24 -35
  2. package/build/api/account-management/accountV2.js +22 -22
  3. package/build/api/account-management/finances.js +10 -10
  4. package/build/api/analytics-and-report/analytics.js +1 -1
  5. package/build/api/{client.js → client/ebayApiClient.js} +37 -41
  6. package/build/api/{clientTrading.js → client/tradingApiClient.js} +22 -22
  7. package/build/api/communication/feedback.js +21 -21
  8. package/build/api/communication/message.js +23 -23
  9. package/build/api/communication/negotiation.js +7 -7
  10. package/build/api/communication/notification.js +52 -52
  11. package/build/api/developer/developer.js +3 -3
  12. package/build/api/{index.js → ebaySellerApi.js} +4 -4
  13. package/build/api/listing-management/feedReportTasks.js +6 -6
  14. package/build/api/listing-management/feedRequest.js +6 -6
  15. package/build/api/listing-management/feedSchedules.js +4 -4
  16. package/build/api/listing-management/feedTasks.js +2 -2
  17. package/build/api/listing-management/items.js +22 -22
  18. package/build/api/listing-management/locations.js +4 -4
  19. package/build/api/listing-management/media.js +14 -14
  20. package/build/api/listing-management/mediaAttach.js +14 -14
  21. package/build/api/listing-management/mediaResources.js +15 -13
  22. package/build/api/listing-management/offerFormat.js +1 -1
  23. package/build/api/listing-management/offers.js +23 -23
  24. package/build/api/listing-management/stores.js +9 -9
  25. package/build/api/listing-metadata/metadata.js +10 -10
  26. package/build/api/marketing-and-promotions/ads.js +34 -34
  27. package/build/api/marketing-and-promotions/campaigns.js +19 -19
  28. package/build/api/marketing-and-promotions/promotions.js +22 -22
  29. package/build/api/marketing-and-promotions/reports.js +7 -7
  30. package/build/api/order-management/dispute.js +11 -9
  31. package/build/api/order-management/fulfillment.js +4 -4
  32. package/build/api/order-management/logistics.js +7 -7
  33. package/build/api/other/browseMappers.js +15 -13
  34. package/build/api/other/browseValidators.js +4 -4
  35. package/build/api/other/edelivery.js +19 -19
  36. package/build/api/other/finding.js +13 -13
  37. package/build/api/other/translation.js +2 -2
  38. package/build/api/other/vero.js +2 -2
  39. package/build/api/shared/download.js +7 -7
  40. package/build/api/shared/request.js +28 -19
  41. package/build/api/trading/listingFormat.js +37 -30
  42. package/build/api/trading/trading.js +33 -33
  43. package/build/auth/credentialSession.js +5 -5
  44. package/build/auth/oauth.js +3 -3
  45. package/build/auth/oauthHelper.js +24 -24
  46. package/build/auth/oauthMetadata.js +4 -4
  47. package/build/auth/oauthMiddleware.js +16 -16
  48. package/build/auth/scopeUtils.js +2 -2
  49. package/build/auth/tokenVerifier.js +23 -23
  50. package/build/config/environment.js +4 -45
  51. package/build/config/oauthScopes.js +132 -0
  52. package/build/index.js +5 -5
  53. package/build/mcp/httpTransport.js +32 -20
  54. package/build/mcp/runtime.js +12 -12
  55. package/build/mcp/toolGating.js +6 -12
  56. package/build/mcp/uiBridge.js +3 -3
  57. package/build/schemas/account-management/account.js +2 -52
  58. package/build/schemas/account-management/accountV2.js +2 -2
  59. package/build/schemas/account-management/finances.js +1 -1
  60. package/build/schemas/analytics/analytics.js +2 -48
  61. package/build/schemas/communication/messages.js +2 -46
  62. package/build/schemas/developer/developer.js +1 -27
  63. package/build/schemas/fulfillment/logistics.js +1 -1
  64. package/build/schemas/fulfillment/orders.js +2 -47
  65. package/build/schemas/inventory-management/feed.js +1 -1
  66. package/build/schemas/inventory-management/inventory.js +2 -50
  67. package/build/schemas/inventory-management/media.js +2 -2
  68. package/build/schemas/inventory-management/mediaDocuments.js +1 -1
  69. package/build/schemas/inventory-management/stores.js +1 -1
  70. package/build/schemas/marketing/ads.js +2 -2
  71. package/build/schemas/marketing/campaigns.js +2 -2
  72. package/build/schemas/marketing/common.js +2 -2
  73. package/build/schemas/marketing/marketing.js +0 -1
  74. package/build/schemas/marketing/promotions.js +2 -2
  75. package/build/schemas/marketing/reports.js +2 -2
  76. package/build/schemas/metadata/metadata.js +2 -90
  77. package/build/schemas/metadata/shipping.js +1 -1
  78. package/build/schemas/other/browse.js +2 -2
  79. package/build/schemas/other/finding.js +2 -2
  80. package/build/schemas/other/otherApis.js +2 -114
  81. package/build/schemas/taxonomy/categoryTree.js +1 -1
  82. package/build/schemas/taxonomy/charity.js +1 -1
  83. package/build/schemas/taxonomy/taxonomy.js +2 -69
  84. package/build/scripts/autoSetup.js +3 -3
  85. package/build/scripts/{buildUi.js → buildMcpApps.js} +13 -13
  86. package/build/scripts/devSync.js +19 -68
  87. package/build/scripts/diagnostics.js +15 -16
  88. package/build/scripts/interactiveSetup.js +25 -25
  89. package/build/scripts/scopeHelper.js +2 -2
  90. package/build/scripts/securityChecker.js +20 -20
  91. package/build/scripts/setup.js +76 -76
  92. package/build/scripts/setupShared.js +5 -30
  93. package/build/scripts/setupValidator.js +9 -9
  94. package/build/scripts/setupWizard.js +23 -23
  95. package/build/scripts/skills.js +14 -17
  96. package/build/scripts/specRefs.js +1 -1
  97. package/build/scripts/specSources.js +144 -0
  98. package/build/serverHttp.js +4 -7
  99. package/build/skills/content.js +13 -13
  100. package/build/skills/install.js +9 -9
  101. package/build/skills/render.js +2 -2
  102. package/build/tools/categories/communication.js +1 -1
  103. package/build/tools/categories/connector.js +19 -16
  104. package/build/tools/categories/fulfillment.js +4 -4
  105. package/build/tools/categories/inventory.js +1 -1
  106. package/build/tools/categories/metadata.js +1 -1
  107. package/build/tools/categories/taxonomy.js +1 -1
  108. package/build/tools/categories/tokenManagement.js +8 -8
  109. package/build/tools/contracts.js +2 -2
  110. package/build/tools/defineTool.js +27 -12
  111. package/build/tools/registry.js +2 -2
  112. package/build/tools/schemas.js +2 -2
  113. package/build/tools/ui/mapHelpers.js +12 -12
  114. package/build/tools/ui/maps.js +101 -97
  115. package/build/tools/ui/viewModels.js +2 -2
  116. package/build/utils/apiStatusFeed.js +12 -12
  117. package/build/utils/communication/feedback.js +3 -3
  118. package/build/utils/communication/message.js +3 -3
  119. package/build/utils/communication/negotiation.js +3 -3
  120. package/build/utils/communication/notification.js +3 -3
  121. package/build/utils/entryModule.js +33 -0
  122. package/build/utils/envFile.js +47 -0
  123. package/build/utils/envParser.js +5 -5
  124. package/build/utils/errors.js +4 -4
  125. package/build/utils/http.js +38 -38
  126. package/build/utils/localFeedFiles.js +3 -3
  127. package/build/utils/logRedaction.js +21 -0
  128. package/build/utils/logger.js +49 -35
  129. package/build/utils/other/compliance.js +3 -3
  130. package/build/utils/other/identity.js +3 -3
  131. package/build/utils/other/translation.js +3 -3
  132. package/build/utils/other/vero.js +3 -3
  133. package/build/utils/schemaHelpers.js +2 -2
  134. package/build/utils/tokenUtils.js +2 -2
  135. package/build/utils/trading/trading.js +1 -1
  136. package/build/utils/version.js +1 -1
  137. package/build/utils/zodIssues.js +14 -0
  138. package/package.json +8 -11
  139. package/README.de.md +0 -426
  140. package/README.es.md +0 -426
  141. package/README.fr.md +0 -426
  142. package/README.ja.md +0 -426
  143. package/README.ko.md +0 -426
  144. package/README.pt-BR.md +0 -426
  145. package/README.ru.md +0 -426
  146. package/README.zh-CN.md +0 -426
  147. package/build/schemas/index.js +0 -76
  148. package/build/schemas/marketing/jsonSchemas.js +0 -118
  149. package/build/scripts/downloadSpecs.js +0 -117
  150. package/build/scripts/updateApiStatusDoc.js +0 -71
  151. package/build/utils/effectSchema.js +0 -203
  152. package/build/utils/effectSchemaAdapter.js +0 -121
  153. package/build/utils/effectSchemaChainMethods.js +0 -146
  154. package/build/utils/effectSchemaRefinements.js +0 -104
  155. package/build/utils/effectSchemaStringMethods.js +0 -63
  156. package/build/utils/effectSchemaTypes.js +0 -47
  157. package/docs/auth/production_scopes.json +0 -111
  158. package/docs/auth/sandbox_scopes.json +0 -142
  159. /package/build/api/{clientRequestError.js → client/ebayClientRequestError.js} +0 -0
  160. /package/build/api/{rateLimitTracker.js → client/rateLimitTracker.js} +0 -0
  161. /package/build/api/{clientTradingError.js → client/tradingApiFailure.js} +0 -0
@@ -10,7 +10,7 @@ export const createMarketingPromotionsMethods = (client) => ({
10
10
  *
11
11
  * @example
12
12
  * ```ts
13
- * const response = await Effect.runPromise(marketingApi.createItemPriceMarkdownPromotion({ request: { ... } }));
13
+ * const createdItemPriceMarkdownPromotion = await Effect.runPromise(marketingApi.createItemPriceMarkdownPromotion({ request: { ... } }));
14
14
  * ```
15
15
  *
16
16
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/createItemPriceMarkdownPromotion
@@ -27,7 +27,7 @@ export const createMarketingPromotionsMethods = (client) => ({
27
27
  *
28
28
  * @example
29
29
  * ```ts
30
- * const response = await Effect.runPromise(marketingApi.getItemPriceMarkdownPromotion({ promotionId: 'promotion-1' }));
30
+ * const itemPriceMarkdownPromotion = await Effect.runPromise(marketingApi.getItemPriceMarkdownPromotion({ promotionId: 'promotion-1' }));
31
31
  * ```
32
32
  *
33
33
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/getItemPriceMarkdownPromotion
@@ -44,7 +44,7 @@ export const createMarketingPromotionsMethods = (client) => ({
44
44
  *
45
45
  * @example
46
46
  * ```ts
47
- * const response = await Effect.runPromise(marketingApi.updateItemPriceMarkdownPromotion({ promotionId: 'promotion-1', request: { ... } }));
47
+ * const updatedItemPriceMarkdownPromotion = await Effect.runPromise(marketingApi.updateItemPriceMarkdownPromotion({ promotionId: 'promotion-1', request: { ... } }));
48
48
  * ```
49
49
  *
50
50
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/updateItemPriceMarkdownPromotion
@@ -61,7 +61,7 @@ export const createMarketingPromotionsMethods = (client) => ({
61
61
  *
62
62
  * @example
63
63
  * ```ts
64
- * const response = await Effect.runPromise(marketingApi.deleteItemPriceMarkdownPromotion({ promotionId: 'promotion-1' }));
64
+ * await Effect.runPromise(marketingApi.deleteItemPriceMarkdownPromotion({ promotionId: 'promotion-1' }));
65
65
  * ```
66
66
  *
67
67
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_price_markdown/methods/deleteItemPriceMarkdownPromotion
@@ -78,7 +78,7 @@ export const createMarketingPromotionsMethods = (client) => ({
78
78
  *
79
79
  * @example
80
80
  * ```ts
81
- * const response = await Effect.runPromise(marketingApi.createItemPromotion({ request: { ... } }));
81
+ * const createdItemPromotion = await Effect.runPromise(marketingApi.createItemPromotion({ request: { ... } }));
82
82
  * ```
83
83
  *
84
84
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/createItemPromotion
@@ -95,7 +95,7 @@ export const createMarketingPromotionsMethods = (client) => ({
95
95
  *
96
96
  * @example
97
97
  * ```ts
98
- * const response = await Effect.runPromise(marketingApi.getItemPromotion({ promotionId: 'promotion-1' }));
98
+ * const itemPromotion = await Effect.runPromise(marketingApi.getItemPromotion({ promotionId: 'promotion-1' }));
99
99
  * ```
100
100
  *
101
101
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/getItemPromotion
@@ -112,7 +112,7 @@ export const createMarketingPromotionsMethods = (client) => ({
112
112
  *
113
113
  * @example
114
114
  * ```ts
115
- * const response = await Effect.runPromise(marketingApi.updateItemPromotion({ promotionId: 'promotion-1', request: { ... } }));
115
+ * const updatedItemPromotion = await Effect.runPromise(marketingApi.updateItemPromotion({ promotionId: 'promotion-1', request: { ... } }));
116
116
  * ```
117
117
  *
118
118
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/updateItemPromotion
@@ -129,7 +129,7 @@ export const createMarketingPromotionsMethods = (client) => ({
129
129
  *
130
130
  * @example
131
131
  * ```ts
132
- * const response = await Effect.runPromise(marketingApi.deleteItemPromotion({ promotionId: 'promotion-1' }));
132
+ * await Effect.runPromise(marketingApi.deleteItemPromotion({ promotionId: 'promotion-1' }));
133
133
  * ```
134
134
  *
135
135
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/item_promotion/methods/deleteItemPromotion
@@ -146,7 +146,7 @@ export const createMarketingPromotionsMethods = (client) => ({
146
146
  *
147
147
  * @example
148
148
  * ```ts
149
- * const response = await Effect.runPromise(marketingApi.getListingSet({ promotionId: 'promotion-1' }));
149
+ * const listingSet = await Effect.runPromise(marketingApi.getListingSet({ promotionId: 'promotion-1' }));
150
150
  * ```
151
151
  *
152
152
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/getListingSet
@@ -170,7 +170,7 @@ export const createMarketingPromotionsMethods = (client) => ({
170
170
  *
171
171
  * @example
172
172
  * ```ts
173
- * const response = await Effect.runPromise(marketingApi.getPromotions({ marketplaceId: 'marketplace-1' }));
173
+ * const promotions = await Effect.runPromise(marketingApi.getPromotions({ marketplaceId: 'marketplace-1' }));
174
174
  * ```
175
175
  *
176
176
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/getPromotions
@@ -196,7 +196,7 @@ export const createMarketingPromotionsMethods = (client) => ({
196
196
  *
197
197
  * @example
198
198
  * ```ts
199
- * const response = await Effect.runPromise(marketingApi.pausePromotion({ promotionId: 'promotion-1' }));
199
+ * await Effect.runPromise(marketingApi.pausePromotion({ promotionId: 'promotion-1' }));
200
200
  * ```
201
201
  *
202
202
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/pausePromotion
@@ -213,7 +213,7 @@ export const createMarketingPromotionsMethods = (client) => ({
213
213
  *
214
214
  * @example
215
215
  * ```ts
216
- * const response = await Effect.runPromise(marketingApi.resumePromotion({ promotionId: 'promotion-1' }));
216
+ * await Effect.runPromise(marketingApi.resumePromotion({ promotionId: 'promotion-1' }));
217
217
  * ```
218
218
  *
219
219
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion/methods/resumePromotion
@@ -230,7 +230,7 @@ export const createMarketingPromotionsMethods = (client) => ({
230
230
  *
231
231
  * @example
232
232
  * ```ts
233
- * const response = await Effect.runPromise(marketingApi.getPromotionReports({ marketplaceId: 'marketplace-1' }));
233
+ * const promotionReports = await Effect.runPromise(marketingApi.getPromotionReports({ marketplaceId: 'marketplace-1' }));
234
234
  * ```
235
235
  *
236
236
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion_report/methods/getPromotionReports
@@ -255,7 +255,7 @@ export const createMarketingPromotionsMethods = (client) => ({
255
255
  *
256
256
  * @example
257
257
  * ```ts
258
- * const response = await Effect.runPromise(marketingApi.getPromotionSummaryReport({ marketplaceId: 'marketplace-1' }));
258
+ * const promotionSummaryReport = await Effect.runPromise(marketingApi.getPromotionSummaryReport({ marketplaceId: 'marketplace-1' }));
259
259
  * ```
260
260
  *
261
261
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/promotion_summary_report/methods/getPromotionSummaryReport
@@ -275,7 +275,7 @@ export const createMarketingPromotionsMethods = (client) => ({
275
275
  *
276
276
  * @example
277
277
  * ```ts
278
- * const response = await Effect.runPromise(marketingApi.getEmailCampaigns());
278
+ * const emailCampaigns = await Effect.runPromise(marketingApi.getEmailCampaigns());
279
279
  * ```
280
280
  *
281
281
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailCampaigns
@@ -298,7 +298,7 @@ export const createMarketingPromotionsMethods = (client) => ({
298
298
  *
299
299
  * @example
300
300
  * ```ts
301
- * const response = await Effect.runPromise(marketingApi.createEmailCampaign({ marketplaceId: 'EBAY_US', request: { ... } }));
301
+ * const createdEmailCampaign = await Effect.runPromise(marketingApi.createEmailCampaign({ marketplaceId: 'EBAY_US', request: { ... } }));
302
302
  * ```
303
303
  *
304
304
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/createEmailCampaign
@@ -316,7 +316,7 @@ export const createMarketingPromotionsMethods = (client) => ({
316
316
  *
317
317
  * @example
318
318
  * ```ts
319
- * const response = await Effect.runPromise(marketingApi.getEmailCampaign({ emailCampaignId: 'emailCampaign-1' }));
319
+ * const emailCampaign = await Effect.runPromise(marketingApi.getEmailCampaign({ emailCampaignId: 'emailCampaign-1' }));
320
320
  * ```
321
321
  *
322
322
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailCampaign
@@ -333,7 +333,7 @@ export const createMarketingPromotionsMethods = (client) => ({
333
333
  *
334
334
  * @example
335
335
  * ```ts
336
- * const response = await Effect.runPromise(marketingApi.updateEmailCampaign({ emailCampaignId: 'emailCampaign-1', request: { ... } }));
336
+ * const updatedEmailCampaign = await Effect.runPromise(marketingApi.updateEmailCampaign({ emailCampaignId: 'emailCampaign-1', request: { ... } }));
337
337
  * ```
338
338
  *
339
339
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/updateEmailCampaign
@@ -350,7 +350,7 @@ export const createMarketingPromotionsMethods = (client) => ({
350
350
  *
351
351
  * @example
352
352
  * ```ts
353
- * const response = await Effect.runPromise(marketingApi.deleteEmailCampaign({ emailCampaignId: 'emailCampaign-1' }));
353
+ * await Effect.runPromise(marketingApi.deleteEmailCampaign({ emailCampaignId: 'emailCampaign-1' }));
354
354
  * ```
355
355
  *
356
356
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/deleteEmailCampaign
@@ -367,7 +367,7 @@ export const createMarketingPromotionsMethods = (client) => ({
367
367
  *
368
368
  * @example
369
369
  * ```ts
370
- * const response = await Effect.runPromise(marketingApi.getAudiences({ emailCampaignType: 'emailCampaignType-1' }));
370
+ * const audiences = await Effect.runPromise(marketingApi.getAudiences({ emailCampaignType: 'emailCampaignType-1' }));
371
371
  * ```
372
372
  *
373
373
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getAudiences
@@ -389,7 +389,7 @@ export const createMarketingPromotionsMethods = (client) => ({
389
389
  *
390
390
  * @example
391
391
  * ```ts
392
- * const response = await Effect.runPromise(marketingApi.getEmailPreview({ emailCampaignId: 'emailCampaign-1' }));
392
+ * const emailPreview = await Effect.runPromise(marketingApi.getEmailPreview({ emailCampaignId: 'emailCampaign-1' }));
393
393
  * ```
394
394
  *
395
395
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailPreview
@@ -406,7 +406,7 @@ export const createMarketingPromotionsMethods = (client) => ({
406
406
  *
407
407
  * @example
408
408
  * ```ts
409
- * const response = await Effect.runPromise(marketingApi.getEmailReport({ endDate: 'endDate-1', startDate: 'startDate-1' }));
409
+ * const emailReport = await Effect.runPromise(marketingApi.getEmailReport({ endDate: 'endDate-1', startDate: 'startDate-1' }));
410
410
  * ```
411
411
  *
412
412
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/email_campaign/methods/getEmailReport
@@ -10,7 +10,7 @@ export const createMarketingReportsMethods = (client) => ({
10
10
  *
11
11
  * @example
12
12
  * ```ts
13
- * const response = await Effect.runPromise(marketingApi.getReport({ reportId: 'report-1' }));
13
+ * const report = await Effect.runPromise(marketingApi.getReport({ reportId: 'report-1' }));
14
14
  * ```
15
15
  *
16
16
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report/methods/getReport
@@ -27,7 +27,7 @@ export const createMarketingReportsMethods = (client) => ({
27
27
  *
28
28
  * @example
29
29
  * ```ts
30
- * const response = await Effect.runPromise(marketingApi.getReportMetadata());
30
+ * const reportMetadata = await Effect.runPromise(marketingApi.getReportMetadata());
31
31
  * ```
32
32
  *
33
33
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_metadata/methods/getReportMetadata
@@ -48,7 +48,7 @@ export const createMarketingReportsMethods = (client) => ({
48
48
  *
49
49
  * @example
50
50
  * ```ts
51
- * const response = await Effect.runPromise(marketingApi.getReportMetadataForReportType({ reportType: 'reportType-1' }));
51
+ * const reportMetadata = await Effect.runPromise(marketingApi.getReportMetadataForReportType({ reportType: 'reportType-1' }));
52
52
  * ```
53
53
  *
54
54
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_metadata/methods/getReportMetadataForReportType
@@ -69,7 +69,7 @@ export const createMarketingReportsMethods = (client) => ({
69
69
  *
70
70
  * @example
71
71
  * ```ts
72
- * const response = await Effect.runPromise(marketingApi.getReportTasks());
72
+ * const reportTasks = await Effect.runPromise(marketingApi.getReportTasks());
73
73
  * ```
74
74
  *
75
75
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/getReportTasks
@@ -91,7 +91,7 @@ export const createMarketingReportsMethods = (client) => ({
91
91
  *
92
92
  * @example
93
93
  * ```ts
94
- * const response = await Effect.runPromise(marketingApi.createReportTask({ request: { ... } }));
94
+ * const createdReportTask = await Effect.runPromise(marketingApi.createReportTask({ request: { ... } }));
95
95
  * ```
96
96
  *
97
97
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/createReportTask
@@ -108,7 +108,7 @@ export const createMarketingReportsMethods = (client) => ({
108
108
  *
109
109
  * @example
110
110
  * ```ts
111
- * const response = await Effect.runPromise(marketingApi.getReportTask({ reportTaskId: 'reportTask-1' }));
111
+ * const reportTask = await Effect.runPromise(marketingApi.getReportTask({ reportTaskId: 'reportTask-1' }));
112
112
  * ```
113
113
  *
114
114
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/getReportTask
@@ -125,7 +125,7 @@ export const createMarketingReportsMethods = (client) => ({
125
125
  *
126
126
  * @example
127
127
  * ```ts
128
- * const response = await Effect.runPromise(marketingApi.deleteReportTask({ reportTaskId: 'reportTask-1' }));
128
+ * await Effect.runPromise(marketingApi.deleteReportTask({ reportTaskId: 'reportTask-1' }));
129
129
  * ```
130
130
  *
131
131
  * @see https://developer.ebay.com/api-docs/sell/marketing/resources/ad_report_task/methods/deleteReportTask
@@ -1,9 +1,11 @@
1
1
  import { buildEndpointParams, EndpointInputError, optionalNonNegativeNumberEffect, optionalPositiveNumberEffect, optionalStringEffect, requestGetEffect, requestPostEffect, requireObjectEffect, requireStringEffect, } from '../../api/shared/request.js';
2
2
  import { isRecord } from '../../utils/typeGuards.js';
3
3
  import { Effect } from 'effect';
4
- const requireUploadEvidenceFileBodyEffect = (value) => {
5
- if (value instanceof ArrayBuffer || value instanceof Uint8Array || isRecord(value)) {
6
- return Effect.succeed(value);
4
+ const requireUploadEvidenceFileBodyEffect = (evidenceFile) => {
5
+ if (evidenceFile instanceof ArrayBuffer ||
6
+ evidenceFile instanceof Uint8Array ||
7
+ isRecord(evidenceFile)) {
8
+ return Effect.succeed(evidenceFile);
7
9
  }
8
10
  return Effect.fail(new EndpointInputError({
9
11
  parameter: 'body',
@@ -194,9 +196,9 @@ export class DisputeApi {
194
196
  */
195
197
  uploadEvidenceFile = (input) => Effect.gen(this, function* () {
196
198
  const paymentDisputeId = yield* requireStringEffect(input.paymentDisputeId, 'paymentDisputeId');
197
- const body = yield* requireUploadEvidenceFileBodyEffect(input.body);
199
+ const evidenceFile = yield* requireUploadEvidenceFileBodyEffect(input.body);
198
200
  const path = `${this.basePath}/payment_dispute/${paymentDisputeId}/upload_evidence_file`;
199
- return yield* requestPostEffect(this.client, path, body, {
201
+ return yield* requestPostEffect(this.client, path, evidenceFile, {
200
202
  headers: { 'Content-Type': 'multipart/form-data' },
201
203
  });
202
204
  });
@@ -220,9 +222,9 @@ export class DisputeApi {
220
222
  */
221
223
  addEvidence = (input) => Effect.gen(this, function* () {
222
224
  const paymentDisputeId = yield* requireStringEffect(input.paymentDisputeId, 'paymentDisputeId');
223
- const body = yield* requireObjectEffect(input.body, 'body');
225
+ const addEvidenceRequest = yield* requireObjectEffect(input.body, 'body');
224
226
  const path = `${this.basePath}/payment_dispute/${paymentDisputeId}/add_evidence`;
225
- return yield* requestPostEffect(this.client, path, body);
227
+ return yield* requestPostEffect(this.client, path, addEvidenceRequest);
226
228
  });
227
229
  /**
228
230
  * Updates evidence on one payment dispute.
@@ -244,8 +246,8 @@ export class DisputeApi {
244
246
  */
245
247
  updateEvidence = (input) => Effect.gen(this, function* () {
246
248
  const paymentDisputeId = yield* requireStringEffect(input.paymentDisputeId, 'paymentDisputeId');
247
- const body = yield* requireObjectEffect(input.body, 'body');
249
+ const updateEvidenceRequest = yield* requireObjectEffect(input.body, 'body');
248
250
  const path = `${this.basePath}/payment_dispute/${paymentDisputeId}/update_evidence`;
249
- return yield* requestPostEffect(this.client, path, body);
251
+ return yield* requestPostEffect(this.client, path, updateEvidenceRequest);
250
252
  });
251
253
  }
@@ -85,9 +85,9 @@ export class FulfillmentApi {
85
85
  */
86
86
  createShippingFulfillment = (input) => Effect.gen(this, function* () {
87
87
  const orderId = yield* requireStringEffect(input.orderId, 'orderId');
88
- const body = yield* requireObjectEffect(input.body, 'body');
88
+ const fulfillmentDetails = yield* requireObjectEffect(input.body, 'body');
89
89
  const path = `${this.basePath}/order/${orderId}/shipping_fulfillment`;
90
- return yield* requestPostEffect(this.client, path, body);
90
+ return yield* requestPostEffect(this.client, path, fulfillmentDetails);
91
91
  });
92
92
  /**
93
93
  * Retrieves all shipping fulfillments for one order.
@@ -156,8 +156,8 @@ export class FulfillmentApi {
156
156
  */
157
157
  issueRefund = (input) => Effect.gen(this, function* () {
158
158
  const orderId = yield* requireStringEffect(input.orderId, 'orderId');
159
- const body = yield* requireObjectEffect(input.body, 'body');
159
+ const refundRequest = yield* requireObjectEffect(input.body, 'body');
160
160
  const path = `${this.basePath}/order/${orderId}/issue_refund`;
161
- return yield* requestPostEffect(this.client, path, body);
161
+ return yield* requestPostEffect(this.client, path, refundRequest);
162
162
  });
163
163
  }
@@ -10,7 +10,7 @@ const marketplaceConfig = (marketplaceId) => marketplaceId === undefined
10
10
  : { headers: { 'X-EBAY-C-MARKETPLACE-ID': marketplaceId } };
11
11
  /**
12
12
  * Logistics API - shipping quotes, shipments, and shipping labels (limited release; needs the
13
- * `sell.logistics` scope). Based on: docs/sell-apps/order-management/sell_logistics_v1_oas3.json
13
+ * `sell.logistics` scope). Based on: sell_logistics_v1_oas3.json
14
14
  */
15
15
  export class LogisticsApi {
16
16
  basePath = '/sell/logistics/v1_beta';
@@ -38,9 +38,9 @@ export class LogisticsApi {
38
38
  const path = `${this.basePath}/shipping_quote`;
39
39
  return Effect.gen(function* () {
40
40
  const endpointInput = yield* requireObjectEffect(input, 'input');
41
- const body = yield* requireObjectEffect(endpointInput.shippingQuoteRequest, 'shippingQuoteRequest');
41
+ const shippingQuoteRequest = yield* requireObjectEffect(endpointInput.shippingQuoteRequest, 'shippingQuoteRequest');
42
42
  const marketplaceId = yield* optionalStringEffect(endpointInput.marketplaceId, 'marketplaceId');
43
- return yield* requestPostEffect(client, path, body, marketplaceConfig(marketplaceId));
43
+ return yield* requestPostEffect(client, path, shippingQuoteRequest, marketplaceConfig(marketplaceId));
44
44
  });
45
45
  };
46
46
  /**
@@ -90,11 +90,11 @@ export class LogisticsApi {
90
90
  const path = `${this.basePath}/shipment/create_from_shipping_quote`;
91
91
  return Effect.gen(function* () {
92
92
  const endpointInput = yield* requireObjectEffect(input, 'input');
93
- const body = yield* requireObjectEffect(endpointInput.shipmentRequest, 'shipmentRequest');
94
- yield* requireStringEffect(body.shippingQuoteId, 'shipmentRequest.shippingQuoteId');
95
- yield* requireStringEffect(body.rateId, 'shipmentRequest.rateId');
93
+ const shipmentRequest = yield* requireObjectEffect(endpointInput.shipmentRequest, 'shipmentRequest');
94
+ yield* requireStringEffect(shipmentRequest.shippingQuoteId, 'shipmentRequest.shippingQuoteId');
95
+ yield* requireStringEffect(shipmentRequest.rateId, 'shipmentRequest.rateId');
96
96
  const marketplaceId = yield* optionalStringEffect(endpointInput.marketplaceId, 'marketplaceId');
97
- return yield* requestPostEffect(client, path, body, marketplaceConfig(marketplaceId));
97
+ return yield* requestPostEffect(client, path, shipmentRequest, marketplaceConfig(marketplaceId));
98
98
  });
99
99
  };
100
100
  /**
@@ -6,16 +6,16 @@
6
6
  import { defined } from '../../utils/objects.js';
7
7
  import { isRecord } from '../../utils/typeGuards.js';
8
8
  /** Read a Browse money field ({ value, currency }). */
9
- const parseBrowseMoney = (value) => {
10
- if (!isRecord(value)) {
9
+ const parseBrowseMoney = (rawMoney) => {
10
+ if (!isRecord(rawMoney)) {
11
11
  return;
12
12
  }
13
- if (typeof value.value === 'string' && typeof value.currency === 'string') {
14
- return { currency: value.currency, value: value.value };
13
+ if (typeof rawMoney.value === 'string' && typeof rawMoney.currency === 'string') {
14
+ return { currency: rawMoney.currency, value: rawMoney.value };
15
15
  }
16
16
  };
17
17
  /** Read a string property when present and non-empty. */
18
- const optionalString = (value) => typeof value === 'string' && value.length > 0 ? value : undefined;
18
+ const optionalString = (rawField) => typeof rawField === 'string' && rawField.length > 0 ? rawField : undefined;
19
19
  /** Read a string array property when present. */
20
20
  /**
21
21
  * Pick the availability container out of a Browse item payload.
@@ -23,16 +23,18 @@ const optionalString = (value) => typeof value === 'string' && value.length > 0
23
23
  * eBay returns `estimatedAvailabilities` as either a bare object or a
24
24
  * single-element array, depending on the listing.
25
25
  */
26
- const pickAvailabilityContainer = (value) => {
27
- if (isRecord(value)) {
28
- return value;
26
+ const pickAvailabilityContainer = (estimatedAvailabilities) => {
27
+ if (isRecord(estimatedAvailabilities)) {
28
+ return estimatedAvailabilities;
29
29
  }
30
- if (Array.isArray(value) && isRecord(value[0])) {
31
- return value[0];
30
+ if (Array.isArray(estimatedAvailabilities) && isRecord(estimatedAvailabilities[0])) {
31
+ return estimatedAvailabilities[0];
32
32
  }
33
33
  };
34
- const optionalStringArray = (value) => Array.isArray(value) && value.every((entry) => typeof entry === 'string') && value.length > 0
35
- ? value
34
+ const optionalStringArray = (rawField) => Array.isArray(rawField) &&
35
+ rawField.every((entry) => typeof entry === 'string') &&
36
+ rawField.length > 0
37
+ ? rawField
36
38
  : undefined;
37
39
  /** Seller username and feedback score, both optional on a Browse payload. */
38
40
  const pickSeller = (raw) => {
@@ -118,7 +120,7 @@ export const mapItemSummary = (raw) => {
118
120
  *
119
121
  * @example
120
122
  * ```ts
121
- * const result = mapSearchActiveItemsResponse(rawJson, { query: 'gpu', offset: 0, limit: 20 });
123
+ * const searchPage = mapSearchActiveItemsResponse(rawJson, { query: 'gpu', offset: 0, limit: 20 });
122
124
  * ```
123
125
  */
124
126
  export const mapSearchActiveItemsResponse = (raw, context) => {
@@ -45,17 +45,17 @@ const requireIntegerInRange = (value, parameter, min, max) => {
45
45
  * are legitimately fractional) closes the gap the MCP schema's `.min(0)`
46
46
  * already covers.
47
47
  *
48
- * @param value - Optional price bound already validated as a number >= 0.
48
+ * @param priceBound - Optional price bound already validated as a number >= 0.
49
49
  * @param parameter - Parameter name used in the tagged error.
50
50
  * @returns A tagged input error when the bound is not finite, else undefined.
51
51
  */
52
- const nonFinitePriceError = (value, parameter) => {
53
- if (value === undefined || Number.isFinite(value)) {
52
+ const nonFinitePriceError = (priceBound, parameter) => {
53
+ if (priceBound === undefined || Number.isFinite(priceBound)) {
54
54
  return;
55
55
  }
56
56
  return new EndpointInputError({
57
57
  parameter,
58
- message: `${parameter} must be a finite number; got ${value}`,
58
+ message: `${parameter} must be a finite number; got ${priceBound}`,
59
59
  });
60
60
  };
61
61
  /** Default page size when limit is omitted. */
@@ -75,8 +75,8 @@ export class EDeliveryApi {
75
75
  const path = `${this.basePath}/address_preference`;
76
76
  return Effect.gen(function* () {
77
77
  const validatedInput = yield* requireObjectEffect(input, 'input');
78
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
79
- return yield* requestPostEffect(client, path, body);
78
+ const addressPreference = yield* requireObjectEffect(validatedInput.body, 'body');
79
+ return yield* requestPostEffect(client, path, addressPreference);
80
80
  });
81
81
  };
82
82
  /**
@@ -116,8 +116,8 @@ export class EDeliveryApi {
116
116
  const path = `${this.basePath}/consign_preference`;
117
117
  return Effect.gen(function* () {
118
118
  const validatedInput = yield* requireObjectEffect(input, 'input');
119
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
120
- return yield* requestPostEffect(client, path, body);
119
+ const consignPreference = yield* requireObjectEffect(validatedInput.body, 'body');
120
+ return yield* requestPostEffect(client, path, consignPreference);
121
121
  });
122
122
  };
123
123
  /**
@@ -250,8 +250,8 @@ export class EDeliveryApi {
250
250
  const path = `${this.basePath}/bundle`;
251
251
  return Effect.gen(function* () {
252
252
  const validatedInput = yield* requireObjectEffect(input, 'input');
253
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
254
- return yield* requestPostEffect(client, path, body);
253
+ const bundleRequest = yield* requireObjectEffect(validatedInput.body, 'body');
254
+ return yield* requestPostEffect(client, path, bundleRequest);
255
255
  });
256
256
  };
257
257
  /**
@@ -340,8 +340,8 @@ export class EDeliveryApi {
340
340
  const path = `${this.basePath}/package`;
341
341
  return Effect.gen(function* () {
342
342
  const validatedInput = yield* requireObjectEffect(input, 'input');
343
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
344
- return yield* requestPostEffect(client, path, body);
343
+ const packageRequest = yield* requireObjectEffect(validatedInput.body, 'body');
344
+ return yield* requestPostEffect(client, path, packageRequest);
345
345
  });
346
346
  };
347
347
  /**
@@ -488,7 +488,7 @@ export class EDeliveryApi {
488
488
  *
489
489
  * @example
490
490
  * ```ts
491
- * const response = await Effect.runPromise(
491
+ * const cancelledPackages = await Effect.runPromise(
492
492
  * edeliveryApi.bulkCancelPackages({ body: { requests: { packageIds: 'PKG123' } } }),
493
493
  * );
494
494
  * ```
@@ -500,8 +500,8 @@ export class EDeliveryApi {
500
500
  const path = `${this.basePath}/package/bulk_cancel_packages`;
501
501
  return Effect.gen(function* () {
502
502
  const validatedInput = yield* requireObjectEffect(input, 'input');
503
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
504
- return yield* requestPostEffect(client, path, body);
503
+ const cancelPackagesRequest = yield* requireObjectEffect(validatedInput.body, 'body');
504
+ return yield* requestPostEffect(client, path, cancelPackagesRequest);
505
505
  });
506
506
  };
507
507
  /**
@@ -512,7 +512,7 @@ export class EDeliveryApi {
512
512
  *
513
513
  * @example
514
514
  * ```ts
515
- * const response = await Effect.runPromise(
515
+ * const confirmedPackages = await Effect.runPromise(
516
516
  * edeliveryApi.bulkConfirmPackages({ body: { requests: { packageIds: 'PKG123' } } }),
517
517
  * );
518
518
  * ```
@@ -524,8 +524,8 @@ export class EDeliveryApi {
524
524
  const path = `${this.basePath}/package/bulk_confirm_packages`;
525
525
  return Effect.gen(function* () {
526
526
  const validatedInput = yield* requireObjectEffect(input, 'input');
527
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
528
- return yield* requestPostEffect(client, path, body);
527
+ const confirmPackagesRequest = yield* requireObjectEffect(validatedInput.body, 'body');
528
+ return yield* requestPostEffect(client, path, confirmPackagesRequest);
529
529
  });
530
530
  };
531
531
  /**
@@ -536,7 +536,7 @@ export class EDeliveryApi {
536
536
  *
537
537
  * @example
538
538
  * ```ts
539
- * const response = await Effect.runPromise(
539
+ * const deletedPackages = await Effect.runPromise(
540
540
  * edeliveryApi.bulkDeletePackages({ body: { requests: { packageIds: 'PKG123' } } }),
541
541
  * );
542
542
  * ```
@@ -548,8 +548,8 @@ export class EDeliveryApi {
548
548
  const path = `${this.basePath}/package/bulk_delete_packages`;
549
549
  return Effect.gen(function* () {
550
550
  const validatedInput = yield* requireObjectEffect(input, 'input');
551
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
552
- return yield* requestPostEffect(client, path, body);
551
+ const deletePackagesRequest = yield* requireObjectEffect(validatedInput.body, 'body');
552
+ return yield* requestPostEffect(client, path, deletePackagesRequest);
553
553
  });
554
554
  };
555
555
  /**
@@ -657,8 +657,8 @@ export class EDeliveryApi {
657
657
  const path = `${this.basePath}/complaint`;
658
658
  return Effect.gen(function* () {
659
659
  const validatedInput = yield* requireObjectEffect(input, 'input');
660
- const body = yield* requireObjectEffect(validatedInput.body, 'body');
661
- return yield* requestPostEffect(client, path, body);
660
+ const complaintRequest = yield* requireObjectEffect(validatedInput.body, 'body');
661
+ return yield* requestPostEffect(client, path, complaintRequest);
662
662
  });
663
663
  };
664
664
  }
@@ -72,26 +72,26 @@ export const buildFindCompletedItemsParams = (input) => {
72
72
  return params;
73
73
  };
74
74
  /** Read the first string from a Finding JSON array-or-string field. */
75
- const firstString = (value) => {
76
- if (typeof value === 'string' && value.length > 0) {
77
- return value;
75
+ const firstString = (rawField) => {
76
+ if (typeof rawField === 'string' && rawField.length > 0) {
77
+ return rawField;
78
78
  }
79
- if (Array.isArray(value) && typeof value[0] === 'string' && value[0].length > 0) {
80
- return value[0];
79
+ if (Array.isArray(rawField) && typeof rawField[0] === 'string' && rawField[0].length > 0) {
80
+ return rawField[0];
81
81
  }
82
82
  };
83
83
  /** Read the first object from a Finding JSON array-or-object field. */
84
- const firstRecord = (value) => {
85
- if (isRecord(value)) {
86
- return value;
84
+ const firstRecord = (rawField) => {
85
+ if (isRecord(rawField)) {
86
+ return rawField;
87
87
  }
88
- if (Array.isArray(value) && isRecord(value[0])) {
89
- return value[0];
88
+ if (Array.isArray(rawField) && isRecord(rawField[0])) {
89
+ return rawField[0];
90
90
  }
91
91
  };
92
92
  /** Parse a Finding API money field (`@currencyId` + `__value__`). */
93
- const parseMoney = (value) => {
94
- const money = firstRecord(value);
93
+ const parseMoney = (rawMoney) => {
94
+ const money = firstRecord(rawMoney);
95
95
  if (!money) {
96
96
  return;
97
97
  }
@@ -155,7 +155,7 @@ export const mapFindingItem = (raw) => {
155
155
  *
156
156
  * @example
157
157
  * ```ts
158
- * const result = mapFindCompletedItemsResponse(rawJson, 'iphone 14');
158
+ * const soldListings = mapFindCompletedItemsResponse(rawJson, 'iphone 14');
159
159
  * ```
160
160
  */
161
161
  export const mapFindCompletedItemsResponse = (raw, keywords) => {
@@ -31,8 +31,8 @@ export class TranslationApi {
31
31
  const client = this.client;
32
32
  const path = `${this.basePath}/translate`;
33
33
  return Effect.gen(function* () {
34
- const body = yield* requireObjectEffect(input, 'input');
35
- return yield* requestPostEffect(client, path, body);
34
+ const translateRequest = yield* requireObjectEffect(input, 'input');
35
+ return yield* requestPostEffect(client, path, translateRequest);
36
36
  });
37
37
  };
38
38
  }
@@ -31,8 +31,8 @@ export class VeroApi {
31
31
  const path = `${this.basePath}/vero_report`;
32
32
  return Effect.gen(function* () {
33
33
  const endpointInput = yield* requireObjectEffect(input, 'input');
34
- const body = yield* requireObjectEffect(endpointInput.reportData, 'reportData');
35
- return yield* requestPostEffect(client, path, body);
34
+ const veroReport = yield* requireObjectEffect(endpointInput.reportData, 'reportData');
35
+ return yield* requestPostEffect(client, path, veroReport);
36
36
  });
37
37
  };
38
38
  /**