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,241 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schemas for eDelivery API input validation
4
+ * Based on: src/api/other/edelivery.ts
5
+ * OpenAPI spec: docs/sell-apps/other-apis/sell_edelivery_international_shipping_oas3.json
6
+ * Types from: src/types/sell_edelivery_international_shipping_oas3.ts
7
+ *
8
+ * Note: The eDelivery API is only available for Greater-China based sellers with an active eDIS account.
9
+ */
10
+ // Reusable schema for ID parameters
11
+ const idSchema = (name, description) => z.string({
12
+ message: `${name} is required`,
13
+ required_error: `${name.toLowerCase().replace(/\s+/g, '_')} is required`,
14
+ invalid_type_error: `${name.toLowerCase().replace(/\s+/g, '_')} must be a string`,
15
+ description,
16
+ });
17
+ // Reusable schema for query parameters
18
+ const paramsSchema = z
19
+ .record(z.string(), {
20
+ description: 'Query parameters for the request',
21
+ })
22
+ .optional();
23
+ // Reusable schema for request body objects
24
+ const requestBodySchema = (name) => z.record(z.unknown(), {
25
+ message: `${name} is required`,
26
+ required_error: `${name.toLowerCase().replace(/\s+/g, '_')} is required`,
27
+ invalid_type_error: `${name.toLowerCase().replace(/\s+/g, '_')} must be an object`,
28
+ description: `The ${name.toLowerCase()} containing required details`,
29
+ });
30
+ /**
31
+ * Schema for createShippingQuote method
32
+ * Endpoint: POST /shipping_quote
33
+ * Body: ShippingQuoteRequest - complex object with shipping details
34
+ */
35
+ export const createShippingQuoteSchema = z.object({
36
+ shipping_quote_request: requestBodySchema('Shipping quote request'),
37
+ });
38
+ /**
39
+ * Schema for getShippingQuote method
40
+ * Endpoint: GET /shipping_quote/{shipping_quote_id}
41
+ * Path: shipping_quote_id (required)
42
+ */
43
+ export const getShippingQuoteSchema = z.object({
44
+ shipping_quote_id: idSchema('Shipping quote ID', 'The unique identifier for the shipping quote'),
45
+ });
46
+ // ==================== Cost & Preferences ====================
47
+ /**
48
+ * Schema for getActualCosts method
49
+ * Endpoint: GET /actual_costs
50
+ */
51
+ export const getActualCostsSchema = z.object({
52
+ params: paramsSchema,
53
+ });
54
+ /**
55
+ * Schema for getAddressPreferences method
56
+ * Endpoint: GET /address_preference
57
+ */
58
+ export const getAddressPreferencesSchema = z.object({});
59
+ /**
60
+ * Schema for createAddressPreference method
61
+ * Endpoint: POST /address_preference
62
+ */
63
+ export const createAddressPreferenceSchema = z.object({
64
+ address_preference: requestBodySchema('Address preference'),
65
+ });
66
+ /**
67
+ * Schema for getConsignPreferences method
68
+ * Endpoint: GET /consign_preference
69
+ */
70
+ export const getConsignPreferencesSchema = z.object({});
71
+ /**
72
+ * Schema for createConsignPreference method
73
+ * Endpoint: POST /consign_preference
74
+ */
75
+ export const createConsignPreferenceSchema = z.object({
76
+ consign_preference: requestBodySchema('Consign preference'),
77
+ });
78
+ // ==================== Agents & Services ====================
79
+ /**
80
+ * Schema for getAgents method
81
+ * Endpoint: GET /agents
82
+ */
83
+ export const getAgentsSchema = z.object({
84
+ params: paramsSchema,
85
+ });
86
+ /**
87
+ * Schema for getBatteryQualifications method
88
+ * Endpoint: GET /battery_qualifications
89
+ */
90
+ export const getBatteryQualificationsSchema = z.object({
91
+ params: paramsSchema,
92
+ });
93
+ /**
94
+ * Schema for getDropoffSites method
95
+ * Endpoint: GET /dropoff_sites
96
+ */
97
+ export const getDropoffSitesSchema = z.object({
98
+ params: z.record(z.string(), {
99
+ description: 'Query parameters (postal_code, country, etc.)',
100
+ }),
101
+ });
102
+ /**
103
+ * Schema for getShippingServices method
104
+ * Endpoint: GET /services
105
+ */
106
+ export const getShippingServicesSchema = z.object({
107
+ params: paramsSchema,
108
+ });
109
+ // ==================== Bundles ====================
110
+ /**
111
+ * Schema for createBundle method
112
+ * Endpoint: POST /bundle
113
+ */
114
+ export const createBundleSchema = z.object({
115
+ bundle_request: requestBodySchema('Bundle request'),
116
+ });
117
+ /**
118
+ * Schema for getBundle method
119
+ * Endpoint: GET /bundle/{bundle_id}
120
+ */
121
+ export const getBundleSchema = z.object({
122
+ bundle_id: idSchema('Bundle ID', 'The unique identifier for the bundle'),
123
+ });
124
+ /**
125
+ * Schema for cancelBundle method
126
+ * Endpoint: POST /bundle/{bundle_id}/cancel
127
+ */
128
+ export const cancelBundleSchema = z.object({
129
+ bundle_id: idSchema('Bundle ID', 'The unique identifier for the bundle to cancel'),
130
+ });
131
+ /**
132
+ * Schema for getBundleLabel method
133
+ * Endpoint: GET /bundle/{bundle_id}/label
134
+ */
135
+ export const getBundleLabelSchema = z.object({
136
+ bundle_id: idSchema('Bundle ID', 'The unique identifier for the bundle'),
137
+ });
138
+ // ==================== Packages (Single) ====================
139
+ /**
140
+ * Schema for createPackage method
141
+ * Endpoint: POST /package
142
+ */
143
+ export const createPackageSchema = z.object({
144
+ package_request: requestBodySchema('Package request'),
145
+ });
146
+ /**
147
+ * Schema for getPackage method
148
+ * Endpoint: GET /package/{package_id}
149
+ */
150
+ export const getPackageSchema = z.object({
151
+ package_id: idSchema('Package ID', 'The unique identifier for the package'),
152
+ });
153
+ /**
154
+ * Schema for deletePackage method
155
+ * Endpoint: DELETE /package/{package_id}
156
+ */
157
+ export const deletePackageSchema = z.object({
158
+ package_id: idSchema('Package ID', 'The unique identifier for the package to delete'),
159
+ });
160
+ /**
161
+ * Schema for getPackageByOrderLineItem method
162
+ * Endpoint: GET /package/{order_line_item_id}/item
163
+ */
164
+ export const getPackageByOrderLineItemSchema = z.object({
165
+ order_line_item_id: idSchema('Order line item ID', 'The order line item identifier'),
166
+ });
167
+ /**
168
+ * Schema for cancelPackage method
169
+ * Endpoint: POST /package/{package_id}/cancel
170
+ */
171
+ export const cancelPackageSchema = z.object({
172
+ package_id: idSchema('Package ID', 'The unique identifier for the package to cancel'),
173
+ });
174
+ /**
175
+ * Schema for clonePackage method
176
+ * Endpoint: POST /package/{package_id}/clone
177
+ */
178
+ export const clonePackageSchema = z.object({
179
+ package_id: idSchema('Package ID', 'The unique identifier for the package to clone'),
180
+ });
181
+ /**
182
+ * Schema for confirmPackage method
183
+ * Endpoint: POST /package/{package_id}/confirm
184
+ */
185
+ export const confirmPackageSchema = z.object({
186
+ package_id: idSchema('Package ID', 'The unique identifier for the package to confirm'),
187
+ });
188
+ // ==================== Packages (Bulk) ====================
189
+ /**
190
+ * Schema for bulkCancelPackages method
191
+ * Endpoint: POST /package/bulk_cancel_packages
192
+ */
193
+ export const bulkCancelPackagesSchema = z.object({
194
+ bulk_cancel_request: requestBodySchema('Bulk cancel request'),
195
+ });
196
+ /**
197
+ * Schema for bulkConfirmPackages method
198
+ * Endpoint: POST /package/bulk_confirm_packages
199
+ */
200
+ export const bulkConfirmPackagesSchema = z.object({
201
+ bulk_confirm_request: requestBodySchema('Bulk confirm request'),
202
+ });
203
+ /**
204
+ * Schema for bulkDeletePackages method
205
+ * Endpoint: POST /package/bulk_delete_packages
206
+ */
207
+ export const bulkDeletePackagesSchema = z.object({
208
+ bulk_delete_request: requestBodySchema('Bulk delete request'),
209
+ });
210
+ // ==================== Labels & Tracking ====================
211
+ /**
212
+ * Schema for getLabels method
213
+ * Endpoint: GET /labels
214
+ */
215
+ export const getLabelsSchema = z.object({
216
+ params: paramsSchema,
217
+ });
218
+ /**
219
+ * Schema for getHandoverSheet method
220
+ * Endpoint: GET /handover_sheet
221
+ */
222
+ export const getHandoverSheetSchema = z.object({
223
+ params: paramsSchema,
224
+ });
225
+ /**
226
+ * Schema for getTracking method
227
+ * Endpoint: GET /tracking
228
+ */
229
+ export const getTrackingSchema = z.object({
230
+ params: z.record(z.string(), {
231
+ description: 'Query parameters (tracking_number required)',
232
+ }),
233
+ });
234
+ // ==================== Other ====================
235
+ /**
236
+ * Schema for createComplaint method
237
+ * Endpoint: POST /complaint
238
+ */
239
+ export const createComplaintSchema = z.object({
240
+ complaint_request: requestBodySchema('Complaint request'),
241
+ });
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schemas for Identity API input validation
4
+ * Based on: src/api/other/identity.ts
5
+ * OpenAPI spec: docs/sell-apps/other-apis/commerce_identity_v1_oas3.json
6
+ * Types from: src/types/commerce_identity_v1_oas3.ts
7
+ */
8
+ /**
9
+ * Schema for getUser method
10
+ * Endpoint: GET /user
11
+ * No parameters required - retrieves the authenticated user's account profile
12
+ */
13
+ export declare const getUserSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schemas for Identity API input validation
4
+ * Based on: src/api/other/identity.ts
5
+ * OpenAPI spec: docs/sell-apps/other-apis/commerce_identity_v1_oas3.json
6
+ * Types from: src/types/commerce_identity_v1_oas3.ts
7
+ */
8
+ /**
9
+ * Schema for getUser method
10
+ * Endpoint: GET /user
11
+ * No parameters required - retrieves the authenticated user's account profile
12
+ */
13
+ export const getUserSchema = z.object({});
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schemas for Translation API input validation
4
+ * Based on: src/api/other/translation.ts
5
+ * OpenAPI spec: docs/sell-apps/other-apis/commerce_translation_v1_beta_oas3.json
6
+ * Types from: src/types/commerce_translation_v1_beta_oas3.ts
7
+ */
8
+ /**
9
+ * Schema for translate method
10
+ * Endpoint: POST /translate
11
+ * Body: TranslateRequest - from, to, translationContext, text
12
+ */
13
+ export declare const translateSchema: z.ZodObject<{
14
+ from: z.ZodOptional<z.ZodString>;
15
+ to: z.ZodOptional<z.ZodString>;
16
+ translation_context: z.ZodOptional<z.ZodString>;
17
+ text: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ text?: string[] | undefined;
20
+ from?: string | undefined;
21
+ to?: string | undefined;
22
+ translation_context?: string | undefined;
23
+ }, {
24
+ text?: string[] | undefined;
25
+ from?: string | undefined;
26
+ to?: string | undefined;
27
+ translation_context?: string | undefined;
28
+ }>;
@@ -0,0 +1,41 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schemas for Translation API input validation
4
+ * Based on: src/api/other/translation.ts
5
+ * OpenAPI spec: docs/sell-apps/other-apis/commerce_translation_v1_beta_oas3.json
6
+ * Types from: src/types/commerce_translation_v1_beta_oas3.ts
7
+ */
8
+ /**
9
+ * Schema for translate method
10
+ * Endpoint: POST /translate
11
+ * Body: TranslateRequest - from, to, translationContext, text
12
+ */
13
+ export const translateSchema = z.object({
14
+ from: z
15
+ .string({
16
+ invalid_type_error: 'from must be a string',
17
+ description: 'The language of the input text to be translated (e.g., en_US, fr_FR, de_DE)',
18
+ })
19
+ .optional(),
20
+ to: z
21
+ .string({
22
+ invalid_type_error: 'to must be a string',
23
+ description: 'The target language for translation (e.g., en_US, fr_FR, de_DE)',
24
+ })
25
+ .optional(),
26
+ translation_context: z
27
+ .string({
28
+ invalid_type_error: 'translation_context must be a string',
29
+ description: 'The listing entity to translate (ITEM_TITLE or ITEM_DESCRIPTION)',
30
+ })
31
+ .optional(),
32
+ text: z
33
+ .array(z.string({
34
+ invalid_type_error: 'text array items must be strings',
35
+ description: 'Text string to translate',
36
+ }), {
37
+ invalid_type_error: 'text must be an array',
38
+ description: 'Array of text to translate (max 1000 chars for ITEM_TITLE, 20,000 for ITEM_DESCRIPTION)',
39
+ })
40
+ .optional(),
41
+ });
@@ -0,0 +1,61 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Schema for createVeroReport method
4
+ * Endpoint: POST /vero_report
5
+ * Body: VeroReportItemsRequest - report data
6
+ */
7
+ export declare const createVeroReportSchema: z.ZodObject<{
8
+ report_data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ report_data: Record<string, unknown>;
11
+ }, {
12
+ report_data: Record<string, unknown>;
13
+ }>;
14
+ /**
15
+ * Schema for getVeroReport method
16
+ * Endpoint: GET /vero_report/{vero_report_id}
17
+ * Path: vero_report_id
18
+ */
19
+ export declare const getVeroReportSchema: z.ZodObject<{
20
+ vero_report_id: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ vero_report_id: string;
23
+ }, {
24
+ vero_report_id: string;
25
+ }>;
26
+ /**
27
+ * Schema for getVeroReportItems method
28
+ * Endpoint: GET /vero_report_items
29
+ * Query: filter, limit, offset
30
+ */
31
+ export declare const getVeroReportItemsSchema: z.ZodObject<{
32
+ filter: z.ZodOptional<z.ZodString>;
33
+ limit: z.ZodOptional<z.ZodString>;
34
+ offset: z.ZodOptional<z.ZodString>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ filter?: string | undefined;
37
+ limit?: string | undefined;
38
+ offset?: string | undefined;
39
+ }, {
40
+ filter?: string | undefined;
41
+ limit?: string | undefined;
42
+ offset?: string | undefined;
43
+ }>;
44
+ /**
45
+ * Schema for getVeroReasonCode method
46
+ * Endpoint: GET /vero_reason_code/{vero_reason_code_id}
47
+ * Path: vero_reason_code_id
48
+ */
49
+ export declare const getVeroReasonCodeSchema: z.ZodObject<{
50
+ vero_reason_code_id: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ vero_reason_code_id: string;
53
+ }, {
54
+ vero_reason_code_id: string;
55
+ }>;
56
+ /**
57
+ * Schema for getVeroReasonCodes method
58
+ * Endpoint: GET /vero_reason_code
59
+ * No parameters required
60
+ */
61
+ export declare const getVeroReasonCodesSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Zod schemas for VERO API input validation
4
+ * Based on: src/api/other/vero.ts
5
+ * OpenAPI spec: docs/sell-apps/other-apis/commerce_vero_v1_oas3.json
6
+ * Types from: src/types/commerce_vero_v1_oas3.ts
7
+ *
8
+ * Note: The VERO API is only available for members of the Verified Rights Owner (VeRO) Program
9
+ */
10
+ // Reusable schema for filter parameter
11
+ const filterSchema = z
12
+ .string({
13
+ message: 'Filter must be a string',
14
+ invalid_type_error: 'filter must be a string',
15
+ description: 'Filter criteria for the query (e.g., date range)',
16
+ })
17
+ .optional();
18
+ // Reusable schema for limit parameter (string in API)
19
+ const limitSchema = z
20
+ .string({
21
+ invalid_type_error: 'limit must be a string',
22
+ description: 'Maximum number of items to return',
23
+ })
24
+ .optional();
25
+ // Reusable schema for offset parameter (string in API)
26
+ const offsetSchema = z
27
+ .string({
28
+ invalid_type_error: 'offset must be a string',
29
+ description: 'Number of items to skip',
30
+ })
31
+ .optional();
32
+ /**
33
+ * Schema for createVeroReport method
34
+ * Endpoint: POST /vero_report
35
+ * Body: VeroReportItemsRequest - report data
36
+ */
37
+ export const createVeroReportSchema = z.object({
38
+ report_data: z.record(z.unknown(), {
39
+ message: 'Report data is required',
40
+ required_error: 'report_data is required',
41
+ invalid_type_error: 'report_data must be an object',
42
+ description: 'The VeRO report data containing item details and intellectual property violation information',
43
+ }),
44
+ });
45
+ /**
46
+ * Schema for getVeroReport method
47
+ * Endpoint: GET /vero_report/{vero_report_id}
48
+ * Path: vero_report_id
49
+ */
50
+ export const getVeroReportSchema = z.object({
51
+ vero_report_id: z
52
+ .string({
53
+ message: 'VERO report ID is required',
54
+ required_error: 'vero_report_id is required',
55
+ invalid_type_error: 'vero_report_id must be a string',
56
+ description: 'The unique identifier of the VERO report',
57
+ })
58
+ .min(1, 'VERO report ID cannot be empty'),
59
+ });
60
+ /**
61
+ * Schema for getVeroReportItems method
62
+ * Endpoint: GET /vero_report_items
63
+ * Query: filter, limit, offset
64
+ */
65
+ export const getVeroReportItemsSchema = z.object({
66
+ filter: filterSchema,
67
+ limit: limitSchema,
68
+ offset: offsetSchema,
69
+ });
70
+ /**
71
+ * Schema for getVeroReasonCode method
72
+ * Endpoint: GET /vero_reason_code/{vero_reason_code_id}
73
+ * Path: vero_reason_code_id
74
+ */
75
+ export const getVeroReasonCodeSchema = z.object({
76
+ vero_reason_code_id: z
77
+ .string({
78
+ message: 'VERO reason code ID is required',
79
+ required_error: 'vero_reason_code_id is required',
80
+ invalid_type_error: 'vero_reason_code_id must be a string',
81
+ description: 'The unique identifier of the VERO reason code',
82
+ })
83
+ .min(1, 'VERO reason code ID cannot be empty'),
84
+ });
85
+ /**
86
+ * Schema for getVeroReasonCodes method
87
+ * Endpoint: GET /vero_reason_code
88
+ * No parameters required
89
+ */
90
+ export const getVeroReasonCodesSchema = z.object({});
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Scope Helper - Manages eBay OAuth scopes
3
+ */
4
+ export interface ScopeCategory {
5
+ name: string;
6
+ description: string;
7
+ scopes: string[];
8
+ required: boolean;
9
+ }
10
+ /**
11
+ * Get all available scope categories
12
+ */
13
+ export declare function getScopeCategories(): ScopeCategory[];
14
+ /**
15
+ * Get recommended scopes for the environment
16
+ */
17
+ export declare function getRecommendedScopes(environment: 'sandbox' | 'production'): string[];
18
+ /**
19
+ * Display scope selection interface
20
+ */
21
+ export declare function displayScopeCategories(): void;
22
+ /**
23
+ * Verify if token has required scopes
24
+ */
25
+ export declare function verifyScopesCoverage(tokenScopes: string[], requiredScopes: string[]): {
26
+ hasAllRequired: boolean;
27
+ missingScopes: string[];
28
+ extraScopes: string[];
29
+ };
30
+ /**
31
+ * Display scope verification results
32
+ */
33
+ export declare function displayScopeVerification(tokenScopes: string[], environment: 'sandbox' | 'production'): void;
34
+ /**
35
+ * Get scope description
36
+ */
37
+ export declare function getScopeDescription(scope: string): string;
38
+ /**
39
+ * Format scopes for display
40
+ */
41
+ export declare function formatScopesForDisplay(scopes: string[]): string;
42
+ /**
43
+ * Get all scopes as a space-separated string
44
+ */
45
+ export declare function getAllScopesString(environment: 'sandbox' | 'production'): string;
46
+ /**
47
+ * Parse scope string to array
48
+ */
49
+ export declare function parseScopeString(scopeString: string): string[];