ebay-mcp 1.4.3

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 (205) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +586 -0
  3. package/build/api/account-management/account.d.ts +216 -0
  4. package/build/api/account-management/account.js +305 -0
  5. package/build/api/analytics-and-report/analytics.d.ts +33 -0
  6. package/build/api/analytics-and-report/analytics.js +102 -0
  7. package/build/api/client.d.ts +89 -0
  8. package/build/api/client.js +343 -0
  9. package/build/api/communication/feedback.d.ts +45 -0
  10. package/build/api/communication/feedback.js +119 -0
  11. package/build/api/communication/message.d.ts +55 -0
  12. package/build/api/communication/message.js +131 -0
  13. package/build/api/communication/negotiation.d.ts +39 -0
  14. package/build/api/communication/negotiation.js +97 -0
  15. package/build/api/communication/notification.d.ts +128 -0
  16. package/build/api/communication/notification.js +373 -0
  17. package/build/api/index.d.ts +96 -0
  18. package/build/api/index.js +121 -0
  19. package/build/api/listing-management/inventory.d.ts +216 -0
  20. package/build/api/listing-management/inventory.js +633 -0
  21. package/build/api/listing-metadata/metadata.d.ts +154 -0
  22. package/build/api/listing-metadata/metadata.js +485 -0
  23. package/build/api/listing-metadata/taxonomy.d.ts +38 -0
  24. package/build/api/listing-metadata/taxonomy.js +58 -0
  25. package/build/api/marketing-and-promotions/marketing.d.ts +395 -0
  26. package/build/api/marketing-and-promotions/marketing.js +565 -0
  27. package/build/api/marketing-and-promotions/recommendation.d.ts +20 -0
  28. package/build/api/marketing-and-promotions/recommendation.js +32 -0
  29. package/build/api/order-management/dispute.d.ts +65 -0
  30. package/build/api/order-management/dispute.js +69 -0
  31. package/build/api/order-management/fulfillment.d.ts +80 -0
  32. package/build/api/order-management/fulfillment.js +89 -0
  33. package/build/api/other/compliance.d.ts +26 -0
  34. package/build/api/other/compliance.js +47 -0
  35. package/build/api/other/edelivery.d.ts +153 -0
  36. package/build/api/other/edelivery.js +219 -0
  37. package/build/api/other/identity.d.ts +17 -0
  38. package/build/api/other/identity.js +24 -0
  39. package/build/api/other/translation.d.ts +14 -0
  40. package/build/api/other/translation.js +22 -0
  41. package/build/api/other/vero.d.ts +30 -0
  42. package/build/api/other/vero.js +48 -0
  43. package/build/auth/oauth-metadata.d.ts +46 -0
  44. package/build/auth/oauth-metadata.js +59 -0
  45. package/build/auth/oauth-middleware.d.ts +35 -0
  46. package/build/auth/oauth-middleware.js +99 -0
  47. package/build/auth/oauth-types.d.ts +66 -0
  48. package/build/auth/oauth-types.js +4 -0
  49. package/build/auth/oauth.d.ts +93 -0
  50. package/build/auth/oauth.js +383 -0
  51. package/build/auth/scope-utils.d.ts +70 -0
  52. package/build/auth/scope-utils.js +304 -0
  53. package/build/auth/token-verifier.d.ts +57 -0
  54. package/build/auth/token-verifier.js +172 -0
  55. package/build/config/environment.d.ts +61 -0
  56. package/build/config/environment.js +260 -0
  57. package/build/index.d.ts +1 -0
  58. package/build/index.js +98 -0
  59. package/build/schemas/account-management/account.d.ts +5324 -0
  60. package/build/schemas/account-management/account.js +366 -0
  61. package/build/schemas/analytics/analytics.d.ts +167 -0
  62. package/build/schemas/analytics/analytics.js +191 -0
  63. package/build/schemas/communication/messages.d.ts +1872 -0
  64. package/build/schemas/communication/messages.js +348 -0
  65. package/build/schemas/fulfillment/orders.d.ts +4655 -0
  66. package/build/schemas/fulfillment/orders.js +317 -0
  67. package/build/schemas/index.d.ts +2100 -0
  68. package/build/schemas/index.js +68 -0
  69. package/build/schemas/inventory-management/inventory.d.ts +6419 -0
  70. package/build/schemas/inventory-management/inventory.js +450 -0
  71. package/build/schemas/marketing/marketing.d.ts +14181 -0
  72. package/build/schemas/marketing/marketing.js +1088 -0
  73. package/build/schemas/metadata/metadata.d.ts +5259 -0
  74. package/build/schemas/metadata/metadata.js +614 -0
  75. package/build/schemas/other/other-apis.d.ts +257 -0
  76. package/build/schemas/other/other-apis.js +372 -0
  77. package/build/schemas/taxonomy/taxonomy.d.ts +215 -0
  78. package/build/schemas/taxonomy/taxonomy.js +571 -0
  79. package/build/scripts/auto-setup.d.ts +12 -0
  80. package/build/scripts/auto-setup.js +277 -0
  81. package/build/scripts/diagnostics.d.ts +8 -0
  82. package/build/scripts/diagnostics.js +299 -0
  83. package/build/scripts/download-specs.d.ts +1 -0
  84. package/build/scripts/download-specs.js +116 -0
  85. package/build/scripts/interactive-setup.d.ts +21 -0
  86. package/build/scripts/interactive-setup.js +723 -0
  87. package/build/server-http.d.ts +11 -0
  88. package/build/server-http.js +361 -0
  89. package/build/tools/definitions/account-with-schemas.d.ts +39 -0
  90. package/build/tools/definitions/account-with-schemas.js +170 -0
  91. package/build/tools/definitions/account.d.ts +12 -0
  92. package/build/tools/definitions/account.js +428 -0
  93. package/build/tools/definitions/analytics.d.ts +25 -0
  94. package/build/tools/definitions/analytics.js +66 -0
  95. package/build/tools/definitions/communication.d.ts +12 -0
  96. package/build/tools/definitions/communication.js +151 -0
  97. package/build/tools/definitions/fulfillment.d.ts +12 -0
  98. package/build/tools/definitions/fulfillment.js +326 -0
  99. package/build/tools/definitions/index.d.ts +25 -0
  100. package/build/tools/definitions/index.js +37 -0
  101. package/build/tools/definitions/inventory.d.ts +12 -0
  102. package/build/tools/definitions/inventory.js +429 -0
  103. package/build/tools/definitions/marketing.d.ts +12 -0
  104. package/build/tools/definitions/marketing.js +1095 -0
  105. package/build/tools/definitions/metadata.d.ts +12 -0
  106. package/build/tools/definitions/metadata.js +188 -0
  107. package/build/tools/definitions/other.d.ts +13 -0
  108. package/build/tools/definitions/other.js +309 -0
  109. package/build/tools/definitions/taxonomy.d.ts +25 -0
  110. package/build/tools/definitions/taxonomy.js +64 -0
  111. package/build/tools/definitions/token-management.d.ts +35 -0
  112. package/build/tools/definitions/token-management.js +103 -0
  113. package/build/tools/index.d.ts +11 -0
  114. package/build/tools/index.js +1003 -0
  115. package/build/tools/schemas.d.ts +14764 -0
  116. package/build/tools/schemas.js +667 -0
  117. package/build/tools/tool-definitions.d.ts +35 -0
  118. package/build/tools/tool-definitions.js +3534 -0
  119. package/build/types/application-settings/developerAnalyticsV1BetaOas3.d.ts +197 -0
  120. package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
  121. package/build/types/application-settings/developerClientRegistrationV1Oas3.d.ts +155 -0
  122. package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
  123. package/build/types/application-settings/developerKeyManagementV1Oas3.d.ts +246 -0
  124. package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
  125. package/build/types/ebay-enums.d.ts +1204 -0
  126. package/build/types/ebay-enums.js +1330 -0
  127. package/build/types/ebay.d.ts +143 -0
  128. package/build/types/ebay.js +123 -0
  129. package/build/types/index.d.ts +6 -0
  130. package/build/types/index.js +10 -0
  131. package/build/types/sell-apps/account-management/sellAccountV1Oas3.d.ts +2579 -0
  132. package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
  133. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.d.ts +446 -0
  134. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
  135. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.d.ts +705 -0
  136. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
  137. package/build/types/sell-apps/communication/commerceMessageV1Oas3.d.ts +590 -0
  138. package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
  139. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.d.ts +1276 -0
  140. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
  141. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.d.ts +277 -0
  142. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
  143. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.d.ts +3133 -0
  144. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
  145. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.d.ts +2289 -0
  146. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
  147. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.d.ts +6650 -0
  148. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
  149. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.d.ts +172 -0
  150. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
  151. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.d.ts +1869 -0
  152. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
  153. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.d.ts +178 -0
  154. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
  155. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.d.ts +128 -0
  156. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
  157. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.d.ts +417 -0
  158. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
  159. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.d.ts +273 -0
  160. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
  161. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.d.ts +2537 -0
  162. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
  163. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.d.ts +6650 -0
  164. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
  165. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.d.ts +172 -0
  166. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
  167. package/build/utils/account-management/account.d.ts +1094 -0
  168. package/build/utils/account-management/account.js +831 -0
  169. package/build/utils/communication/feedback.d.ts +152 -0
  170. package/build/utils/communication/feedback.js +216 -0
  171. package/build/utils/communication/message.d.ts +174 -0
  172. package/build/utils/communication/message.js +242 -0
  173. package/build/utils/communication/negotiation.d.ts +123 -0
  174. package/build/utils/communication/negotiation.js +150 -0
  175. package/build/utils/communication/notification.d.ts +370 -0
  176. package/build/utils/communication/notification.js +369 -0
  177. package/build/utils/date-converter.d.ts +59 -0
  178. package/build/utils/date-converter.js +160 -0
  179. package/build/utils/llm-client-detector.d.ts +54 -0
  180. package/build/utils/llm-client-detector.js +318 -0
  181. package/build/utils/oauth-helper.d.ts +37 -0
  182. package/build/utils/oauth-helper.js +315 -0
  183. package/build/utils/order-management/dispute.d.ts +346 -0
  184. package/build/utils/order-management/dispute.js +369 -0
  185. package/build/utils/order-management/fulfillment.d.ts +200 -0
  186. package/build/utils/order-management/fulfillment.js +205 -0
  187. package/build/utils/other/compliance.d.ts +49 -0
  188. package/build/utils/other/compliance.js +76 -0
  189. package/build/utils/other/edelivery.d.ts +310 -0
  190. package/build/utils/other/edelivery.js +241 -0
  191. package/build/utils/other/identity.d.ts +13 -0
  192. package/build/utils/other/identity.js +13 -0
  193. package/build/utils/other/translation.d.ts +28 -0
  194. package/build/utils/other/translation.js +41 -0
  195. package/build/utils/other/vero.d.ts +61 -0
  196. package/build/utils/other/vero.js +90 -0
  197. package/build/utils/scope-helper.d.ts +49 -0
  198. package/build/utils/scope-helper.js +207 -0
  199. package/build/utils/security-checker.d.ts +46 -0
  200. package/build/utils/security-checker.js +248 -0
  201. package/build/utils/setup-validator.d.ts +25 -0
  202. package/build/utils/setup-validator.js +305 -0
  203. package/build/utils/token-utils.d.ts +40 -0
  204. package/build/utils/token-utils.js +40 -0
  205. package/package.json +115 -0
@@ -0,0 +1,667 @@
1
+ import { z } from 'zod';
2
+ import { TimeDurationUnit, RegionType, ShippingCostType, ShippingOptionType, DepositType, RefundMethod, ReturnMethod, ReturnShippingCostPayer, Condition, LengthUnit, WeightUnit, PricingVisibility, FormatType, LocationType, MerchantLocationStatus, DayOfWeek, ReasonForRefund, FundingModel, MessageReferenceType, FeedbackRating, ReportedItemType, } from '../types/ebay-enums.js';
3
+ /**
4
+ * Reusable Zod schemas for eBay API tool input validation
5
+ *
6
+ * These schemas provide type-safe validation while remaining flexible
7
+ * enough to accept the full complexity of eBay API request objects.
8
+ */
9
+ // ============================================================================
10
+ // Common/Shared Schemas
11
+ // ============================================================================
12
+ export const timeDurationSchema = z
13
+ .object({
14
+ unit: z.nativeEnum(TimeDurationUnit),
15
+ value: z.number(),
16
+ })
17
+ .passthrough();
18
+ export const amountSchema = z
19
+ .object({
20
+ currency: z.string(),
21
+ value: z.string(),
22
+ })
23
+ .passthrough();
24
+ export const regionSchema = z
25
+ .object({
26
+ regionName: z.string().optional(),
27
+ regionType: z.nativeEnum(RegionType).optional(),
28
+ })
29
+ .passthrough();
30
+ export const regionSetSchema = z
31
+ .object({
32
+ regionIncluded: z.array(regionSchema).optional(),
33
+ regionExcluded: z.array(regionSchema).optional(),
34
+ })
35
+ .passthrough();
36
+ // ============================================================================
37
+ // Account Management Schemas
38
+ // ============================================================================
39
+ export const categoryTypeSchema = z
40
+ .object({
41
+ name: z.string().optional(),
42
+ default: z.boolean().optional(),
43
+ })
44
+ .passthrough();
45
+ export const shippingServiceSchema = z
46
+ .object({
47
+ additionalShippingCost: amountSchema.optional(),
48
+ buyerResponsibleForPickup: z.boolean().optional(),
49
+ buyerResponsibleForShipping: z.boolean().optional(),
50
+ cashOnDeliveryFee: amountSchema.optional(),
51
+ freeShipping: z.boolean().optional(),
52
+ shipToLocations: regionSetSchema.optional(),
53
+ shippingCarrierCode: z.string().optional(),
54
+ shippingCost: amountSchema.optional(),
55
+ shippingServiceCode: z.string().optional(),
56
+ sortOrder: z.number().optional(),
57
+ })
58
+ .passthrough();
59
+ export const shippingOptionSchema = z
60
+ .object({
61
+ costType: z.nativeEnum(ShippingCostType),
62
+ optionType: z.nativeEnum(ShippingOptionType),
63
+ packageHandlingCost: amountSchema.optional(),
64
+ rateTableId: z.string().optional(),
65
+ shippingServices: z.array(shippingServiceSchema).optional(),
66
+ })
67
+ .passthrough();
68
+ export const fulfillmentPolicySchema = z
69
+ .object({
70
+ name: z.string(),
71
+ marketplaceId: z.string(),
72
+ categoryTypes: z.array(categoryTypeSchema).optional(),
73
+ description: z.string().optional(),
74
+ freightShipping: z.boolean().optional(),
75
+ globalShipping: z.boolean().optional(),
76
+ handlingTime: timeDurationSchema.optional(),
77
+ localPickup: z.boolean().optional(),
78
+ pickupDropOff: z.boolean().optional(),
79
+ shippingOptions: z.array(shippingOptionSchema).optional(),
80
+ shipToLocations: regionSetSchema.optional(),
81
+ })
82
+ .passthrough();
83
+ export const paymentMethodSchema = z
84
+ .object({
85
+ paymentMethodType: z.string(),
86
+ brands: z.array(z.string()).optional(),
87
+ recipientAccountReference: z
88
+ .object({
89
+ referenceId: z.string().optional(),
90
+ referenceType: z.string().optional(),
91
+ })
92
+ .passthrough()
93
+ .optional(),
94
+ })
95
+ .passthrough();
96
+ export const depositSchema = z
97
+ .object({
98
+ depositAmount: amountSchema.optional(),
99
+ depositType: z.nativeEnum(DepositType).optional(),
100
+ dueIn: timeDurationSchema.optional(),
101
+ })
102
+ .passthrough();
103
+ export const paymentPolicySchema = z
104
+ .object({
105
+ name: z.string(),
106
+ marketplaceId: z.string(),
107
+ categoryTypes: z.array(categoryTypeSchema).optional(),
108
+ description: z.string().optional(),
109
+ deposit: depositSchema.optional(),
110
+ fullPaymentDueIn: timeDurationSchema.optional(),
111
+ immediatePay: z.boolean().optional(),
112
+ paymentInstructions: z.string().optional(),
113
+ paymentMethods: z.array(paymentMethodSchema).optional(),
114
+ })
115
+ .passthrough();
116
+ export const returnPolicySchema = z
117
+ .object({
118
+ name: z.string(),
119
+ marketplaceId: z.string(),
120
+ categoryTypes: z.array(categoryTypeSchema).optional(),
121
+ description: z.string().optional(),
122
+ extendedHolidayReturnsOffered: z.boolean().optional(),
123
+ refundMethod: z.nativeEnum(RefundMethod).optional(),
124
+ restockingFeePercentage: z.string().optional(),
125
+ returnInstructions: z.string().optional(),
126
+ returnMethod: z.nativeEnum(ReturnMethod).optional(),
127
+ returnPeriod: timeDurationSchema.optional(),
128
+ returnsAccepted: z.boolean().optional(),
129
+ returnShippingCostPayer: z.nativeEnum(ReturnShippingCostPayer).optional(),
130
+ })
131
+ .passthrough();
132
+ export const customPolicySchema = z
133
+ .object({
134
+ name: z.string(),
135
+ description: z.string().optional(),
136
+ policyType: z.string(),
137
+ label: z.string().optional(),
138
+ })
139
+ .passthrough();
140
+ export const salesTaxBaseSchema = z
141
+ .object({
142
+ salesTaxPercentage: z.string(),
143
+ shippingAndHandlingTaxed: z.boolean().optional(),
144
+ })
145
+ .passthrough();
146
+ export const programRequestSchema = z
147
+ .object({
148
+ programType: z.string(),
149
+ })
150
+ .passthrough();
151
+ // ============================================================================
152
+ // Inventory Management Schemas
153
+ // ============================================================================
154
+ export const availabilitySchema = z
155
+ .object({
156
+ shipToLocationAvailability: z
157
+ .object({
158
+ quantity: z.number().optional(),
159
+ })
160
+ .passthrough()
161
+ .optional(),
162
+ })
163
+ .passthrough();
164
+ export const productSchema = z
165
+ .object({
166
+ title: z.string().optional(),
167
+ aspects: z.record(z.array(z.string())).optional(),
168
+ brand: z.string().optional(),
169
+ description: z.string().optional(),
170
+ imageUrls: z.array(z.string()).optional(),
171
+ mpn: z.string().optional(),
172
+ ean: z.array(z.string()).optional(),
173
+ isbn: z.array(z.string()).optional(),
174
+ upc: z.array(z.string()).optional(),
175
+ epid: z.string().optional(),
176
+ })
177
+ .passthrough();
178
+ export const inventoryItemSchema = z
179
+ .object({
180
+ availability: availabilitySchema.optional(),
181
+ condition: z.nativeEnum(Condition).optional(),
182
+ conditionDescription: z.string().optional(),
183
+ packageWeightAndSize: z
184
+ .object({
185
+ dimensions: z
186
+ .object({
187
+ height: z.number().optional(),
188
+ length: z.number().optional(),
189
+ width: z.number().optional(),
190
+ unit: z.nativeEnum(LengthUnit).optional(),
191
+ })
192
+ .passthrough()
193
+ .optional(),
194
+ packageType: z.string().optional(),
195
+ weight: z
196
+ .object({
197
+ value: z.number().optional(),
198
+ unit: z.nativeEnum(WeightUnit).optional(),
199
+ })
200
+ .passthrough()
201
+ .optional(),
202
+ })
203
+ .passthrough()
204
+ .optional(),
205
+ product: productSchema.optional(),
206
+ })
207
+ .passthrough();
208
+ export const pricingSchema = z
209
+ .object({
210
+ price: amountSchema,
211
+ pricingVisibility: z.nativeEnum(PricingVisibility).optional(),
212
+ minimumAdvertisedPrice: amountSchema.optional(),
213
+ originalRetailPrice: amountSchema.optional(),
214
+ })
215
+ .passthrough();
216
+ export const listingPoliciesSchema = z
217
+ .object({
218
+ fulfillmentPolicyId: z.string().optional(),
219
+ paymentPolicyId: z.string().optional(),
220
+ returnPolicyId: z.string().optional(),
221
+ eBayPlusIfEligible: z.boolean().optional(),
222
+ bestOfferTerms: z
223
+ .object({
224
+ autoAcceptPrice: amountSchema.optional(),
225
+ autoDeclinePrice: amountSchema.optional(),
226
+ bestOfferEnabled: z.boolean().optional(),
227
+ })
228
+ .passthrough()
229
+ .optional(),
230
+ })
231
+ .passthrough();
232
+ export const offerSchema = z
233
+ .object({
234
+ sku: z.string(),
235
+ marketplaceId: z.string(),
236
+ format: z.nativeEnum(FormatType),
237
+ availableQuantity: z.number().optional(),
238
+ categoryId: z.string().optional(),
239
+ listingDescription: z.string().optional(),
240
+ listingPolicies: listingPoliciesSchema.optional(),
241
+ merchantLocationKey: z.string().optional(),
242
+ pricingSummary: pricingSchema.optional(),
243
+ quantityLimitPerBuyer: z.number().optional(),
244
+ tax: z
245
+ .object({
246
+ applyTax: z.boolean().optional(),
247
+ thirdPartyTaxCategory: z.string().optional(),
248
+ vatPercentage: z.number().optional(),
249
+ })
250
+ .passthrough()
251
+ .optional(),
252
+ })
253
+ .passthrough();
254
+ export const productCompatibilitySchema = z
255
+ .object({
256
+ compatibleProducts: z
257
+ .array(z
258
+ .object({
259
+ productIdentifier: z
260
+ .object({
261
+ epid: z.string().optional(),
262
+ })
263
+ .passthrough()
264
+ .optional(),
265
+ productFamilyProperties: z
266
+ .object({
267
+ make: z.string().optional(),
268
+ model: z.string().optional(),
269
+ year: z.string().optional(),
270
+ trim: z.string().optional(),
271
+ engine: z.string().optional(),
272
+ })
273
+ .passthrough()
274
+ .optional(),
275
+ notes: z.string().optional(),
276
+ })
277
+ .passthrough())
278
+ .optional(),
279
+ })
280
+ .passthrough();
281
+ export const inventoryItemGroupSchema = z
282
+ .object({
283
+ aspects: z.record(z.array(z.string())),
284
+ description: z.string().optional(),
285
+ imageUrls: z.array(z.string()).optional(),
286
+ inventoryItemGroupKey: z.string(),
287
+ subtitle: z.string().optional(),
288
+ title: z.string(),
289
+ variantSKUs: z.array(z.string()).optional(),
290
+ variesBy: z
291
+ .object({
292
+ specifications: z
293
+ .array(z
294
+ .object({
295
+ name: z.string(),
296
+ values: z.array(z.string()),
297
+ })
298
+ .passthrough())
299
+ .optional(),
300
+ })
301
+ .passthrough()
302
+ .optional(),
303
+ })
304
+ .passthrough();
305
+ export const locationSchema = z
306
+ .object({
307
+ location: z
308
+ .object({
309
+ address: z
310
+ .object({
311
+ addressLine1: z.string().optional(),
312
+ addressLine2: z.string().optional(),
313
+ city: z.string().optional(),
314
+ stateOrProvince: z.string().optional(),
315
+ postalCode: z.string().optional(),
316
+ country: z.string().optional(),
317
+ })
318
+ .passthrough()
319
+ .optional(),
320
+ })
321
+ .passthrough()
322
+ .optional(),
323
+ locationAdditionalInformation: z.string().optional(),
324
+ locationInstructions: z.string().optional(),
325
+ locationTypes: z.array(z.nativeEnum(LocationType)).optional(),
326
+ locationWebUrl: z.string().optional(),
327
+ merchantLocationStatus: z.nativeEnum(MerchantLocationStatus).optional(),
328
+ name: z.string().optional(),
329
+ operatingHours: z
330
+ .array(z
331
+ .object({
332
+ dayOfWeekEnum: z.nativeEnum(DayOfWeek).optional(),
333
+ intervals: z
334
+ .array(z
335
+ .object({
336
+ open: z.string().optional(),
337
+ close: z.string().optional(),
338
+ })
339
+ .passthrough())
340
+ .optional(),
341
+ })
342
+ .passthrough())
343
+ .optional(),
344
+ phone: z.string().optional(),
345
+ specialHours: z
346
+ .array(z
347
+ .object({
348
+ date: z.string().optional(),
349
+ intervals: z
350
+ .array(z
351
+ .object({
352
+ open: z.string().optional(),
353
+ close: z.string().optional(),
354
+ })
355
+ .passthrough())
356
+ .optional(),
357
+ })
358
+ .passthrough())
359
+ .optional(),
360
+ })
361
+ .passthrough();
362
+ // ============================================================================
363
+ // Fulfillment/Order Management Schemas
364
+ // ============================================================================
365
+ export const lineItemRefundSchema = z
366
+ .object({
367
+ lineItemId: z.string(),
368
+ refundAmount: amountSchema.optional(),
369
+ legacyReference: z
370
+ .object({
371
+ legacyItemId: z.string().optional(),
372
+ legacyTransactionId: z.string().optional(),
373
+ })
374
+ .passthrough()
375
+ .optional(),
376
+ })
377
+ .passthrough();
378
+ export const refundDataSchema = z
379
+ .object({
380
+ reasonForRefund: z.nativeEnum(ReasonForRefund),
381
+ comment: z.string().optional(),
382
+ refundItems: z.array(lineItemRefundSchema).optional(),
383
+ orderLevelRefundAmount: amountSchema.optional(),
384
+ })
385
+ .passthrough();
386
+ export const shippingFulfillmentSchema = z
387
+ .object({
388
+ lineItems: z.array(z
389
+ .object({
390
+ lineItemId: z.string(),
391
+ quantity: z.number().optional(),
392
+ })
393
+ .passthrough()),
394
+ shippedDate: z.string().optional(),
395
+ shippingCarrierCode: z.string().optional(),
396
+ trackingNumber: z.string().optional(),
397
+ })
398
+ .passthrough();
399
+ // ============================================================================
400
+ // Marketing Schemas
401
+ // ============================================================================
402
+ export const campaignCriterionSchema = z
403
+ .object({
404
+ autoSelectFutureInventory: z.boolean().optional(),
405
+ criterionType: z.string().optional(),
406
+ selectionRules: z
407
+ .array(z
408
+ .object({
409
+ brands: z.array(z.string()).optional(),
410
+ categoryIds: z.array(z.string()).optional(),
411
+ categoryScope: z.string().optional(),
412
+ listingConditionIds: z.array(z.string()).optional(),
413
+ maxPrice: amountSchema.optional(),
414
+ minPrice: amountSchema.optional(),
415
+ })
416
+ .passthrough())
417
+ .optional(),
418
+ })
419
+ .passthrough();
420
+ export const fundingStrategySchema = z
421
+ .object({
422
+ bidPercentage: z.string().optional(),
423
+ fundingModel: z.nativeEnum(FundingModel).optional(),
424
+ })
425
+ .passthrough();
426
+ export const campaignSchema = z
427
+ .object({
428
+ campaignName: z.string(),
429
+ startDate: z.string(),
430
+ endDate: z.string().optional(),
431
+ fundingStrategy: fundingStrategySchema.optional(),
432
+ marketplaceId: z.string().optional(),
433
+ campaignCriterion: campaignCriterionSchema.optional(),
434
+ })
435
+ .passthrough();
436
+ // ============================================================================
437
+ // Communication Schemas
438
+ // ============================================================================
439
+ export const messageDataSchema = z
440
+ .object({
441
+ messageText: z.string(),
442
+ conversationId: z.string().optional(),
443
+ otherPartyUsername: z.string().optional(),
444
+ reference: z
445
+ .object({
446
+ referenceId: z.string().optional(),
447
+ referenceType: z.nativeEnum(MessageReferenceType).optional(),
448
+ })
449
+ .passthrough()
450
+ .optional(),
451
+ messageMedia: z
452
+ .array(z
453
+ .object({
454
+ mediaUrl: z.string().optional(),
455
+ mediaType: z.string().optional(),
456
+ })
457
+ .passthrough())
458
+ .optional(),
459
+ emailCopyToSender: z.boolean().optional(),
460
+ })
461
+ .passthrough();
462
+ export const feedbackDataSchema = z
463
+ .object({
464
+ orderLineItemId: z.string(),
465
+ rating: z.nativeEnum(FeedbackRating),
466
+ feedbackText: z.string().optional(),
467
+ })
468
+ .passthrough();
469
+ export const notificationConfigSchema = z
470
+ .object({
471
+ deliveryConfigs: z
472
+ .array(z
473
+ .object({
474
+ endpoint: z.string().optional(),
475
+ format: z.string().optional(),
476
+ })
477
+ .passthrough())
478
+ .optional(),
479
+ })
480
+ .passthrough();
481
+ export const notificationDestinationSchema = z
482
+ .object({
483
+ name: z.string(),
484
+ endpoint: z.string(),
485
+ verificationToken: z.string().optional(),
486
+ })
487
+ .passthrough();
488
+ // ============================================================================
489
+ // Metadata/Compatibility Schemas
490
+ // ============================================================================
491
+ export const compatibilitySpecificationSchema = z
492
+ .object({
493
+ categoryTreeId: z.string().optional(),
494
+ categoryId: z.string().optional(),
495
+ compatibilityProperties: z
496
+ .array(z
497
+ .object({
498
+ name: z.string(),
499
+ value: z.string(),
500
+ })
501
+ .passthrough())
502
+ .optional(),
503
+ })
504
+ .passthrough();
505
+ export const compatibilityDataSchema = z
506
+ .object({
507
+ categoryTreeId: z.string().optional(),
508
+ specification: compatibilitySpecificationSchema.optional(),
509
+ })
510
+ .passthrough();
511
+ // ============================================================================
512
+ // Other Schemas
513
+ // ============================================================================
514
+ export const infringementDataSchema = z
515
+ .object({
516
+ itemId: z.string(),
517
+ reportedItemType: z.nativeEnum(ReportedItemType).optional(),
518
+ reportingReason: z.string().optional(),
519
+ comments: z.string().optional(),
520
+ })
521
+ .passthrough();
522
+ // VERO API schemas
523
+ export const veroReportDataSchema = z
524
+ .object({
525
+ items: z.array(z.object({
526
+ itemId: z.string(),
527
+ reportingReason: z.string(),
528
+ })),
529
+ rightsOwnerEmail: z.string().email().optional(),
530
+ message: z.string().optional(),
531
+ })
532
+ .passthrough();
533
+ export const shippingQuoteRequestSchema = z
534
+ .object({
535
+ packageDetails: z
536
+ .object({
537
+ weight: z
538
+ .object({
539
+ value: z.number(),
540
+ unit: z.string(),
541
+ })
542
+ .passthrough(),
543
+ dimensions: z
544
+ .object({
545
+ height: z.number().optional(),
546
+ length: z.number().optional(),
547
+ width: z.number().optional(),
548
+ unit: z.string().optional(),
549
+ })
550
+ .passthrough()
551
+ .optional(),
552
+ })
553
+ .passthrough(),
554
+ shipFrom: z
555
+ .object({
556
+ addressLine1: z.string().optional(),
557
+ city: z.string().optional(),
558
+ stateOrProvince: z.string().optional(),
559
+ postalCode: z.string().optional(),
560
+ country: z.string(),
561
+ })
562
+ .passthrough(),
563
+ shipTo: z
564
+ .object({
565
+ addressLine1: z.string().optional(),
566
+ city: z.string().optional(),
567
+ stateOrProvince: z.string().optional(),
568
+ postalCode: z.string().optional(),
569
+ country: z.string(),
570
+ })
571
+ .passthrough(),
572
+ })
573
+ .passthrough();
574
+ // ============================================================================
575
+ // Bulk Operation Schemas
576
+ // ============================================================================
577
+ export const bulkInventoryItemRequestSchema = z
578
+ .object({
579
+ requests: z.array(z
580
+ .object({
581
+ sku: z.string(),
582
+ product: productSchema.optional(),
583
+ availability: availabilitySchema.optional(),
584
+ condition: z.string().optional(),
585
+ conditionDescription: z.string().optional(),
586
+ })
587
+ .passthrough()),
588
+ })
589
+ .passthrough();
590
+ export const bulkPriceQuantityRequestSchema = z
591
+ .object({
592
+ requests: z.array(z
593
+ .object({
594
+ offerId: z.string(),
595
+ pricingSummary: pricingSchema.optional(),
596
+ availableQuantity: z.number().optional(),
597
+ })
598
+ .passthrough()),
599
+ })
600
+ .passthrough();
601
+ export const bulkOfferRequestSchema = z
602
+ .object({
603
+ requests: z.array(offerSchema),
604
+ })
605
+ .passthrough();
606
+ export const bulkPublishRequestSchema = z
607
+ .object({
608
+ requests: z.array(z
609
+ .object({
610
+ offerId: z.string(),
611
+ })
612
+ .passthrough()),
613
+ })
614
+ .passthrough();
615
+ export const bulkMigrateRequestSchema = z
616
+ .object({
617
+ requests: z.array(z
618
+ .object({
619
+ listingId: z.string(),
620
+ })
621
+ .passthrough()),
622
+ })
623
+ .passthrough();
624
+ export const bulkSalesTaxRequestSchema = z
625
+ .object({
626
+ requests: z.array(z
627
+ .object({
628
+ countryCode: z.string(),
629
+ jurisdictionId: z.string(),
630
+ salesTaxBase: salesTaxBaseSchema,
631
+ })
632
+ .passthrough()),
633
+ })
634
+ .passthrough();
635
+ // ============================================================================
636
+ // Helper: Offers for listing fees
637
+ // ============================================================================
638
+ export const listingFeesRequestSchema = z
639
+ .object({
640
+ offers: z.array(z
641
+ .object({
642
+ offerId: z.string().optional(),
643
+ sku: z.string().optional(),
644
+ marketplaceId: z.string().optional(),
645
+ format: z.nativeEnum(FormatType).optional(),
646
+ })
647
+ .passthrough()),
648
+ })
649
+ .passthrough();
650
+ // ============================================================================
651
+ // Offer to interested buyers
652
+ // ============================================================================
653
+ export const offerToBuyersSchema = z
654
+ .object({
655
+ allowCounterOffer: z.boolean().optional(),
656
+ message: z.string().optional(),
657
+ offeredItems: z
658
+ .array(z
659
+ .object({
660
+ offerId: z.string().optional(),
661
+ availableQuantity: z.number().optional(),
662
+ price: amountSchema.optional(),
663
+ })
664
+ .passthrough())
665
+ .optional(),
666
+ })
667
+ .passthrough();
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export interface OutputArgs {
3
+ [x: string]: unknown;
4
+ type: 'object';
5
+ properties?: Record<string, object>;
6
+ required?: string[];
7
+ }
8
+ export interface ToolAnnotations {
9
+ [x: string]: unknown;
10
+ title?: string;
11
+ readOnlyHint?: boolean;
12
+ destructiveHint?: boolean;
13
+ idempotentHint?: boolean;
14
+ openWorldHint?: boolean;
15
+ }
16
+ export interface ToolDefinition {
17
+ name: string;
18
+ description: string;
19
+ inputSchema: Record<string, z.ZodTypeAny>;
20
+ title?: string;
21
+ outputSchema?: OutputArgs;
22
+ annotations?: ToolAnnotations;
23
+ _meta?: Record<string, unknown>;
24
+ }
25
+ export declare const chatGptTools: ToolDefinition[];
26
+ export declare const accountTools: ToolDefinition[];
27
+ export declare const inventoryTools: ToolDefinition[];
28
+ export declare const fulfillmentTools: ToolDefinition[];
29
+ export declare const marketingTools: ToolDefinition[];
30
+ export declare const analyticsTools: ToolDefinition[];
31
+ export declare const metadataTools: ToolDefinition[];
32
+ export declare const taxonomyTools: ToolDefinition[];
33
+ export declare const communicationTools: ToolDefinition[];
34
+ export declare const otherApiTools: ToolDefinition[];
35
+ export declare const claudeTools: ToolDefinition[];