ebay-mcp 1.13.2 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.de.md +3 -3
  2. package/README.es.md +3 -3
  3. package/README.fr.md +3 -3
  4. package/README.ja.md +3 -3
  5. package/README.ko.md +3 -3
  6. package/README.md +163 -41
  7. package/README.pt-BR.md +3 -3
  8. package/README.ru.md +3 -3
  9. package/README.zh-CN.md +3 -3
  10. package/build/api/account-management/account.js +633 -297
  11. package/build/api/analytics-and-report/analytics.js +111 -65
  12. package/build/api/client.js +199 -140
  13. package/build/api/clientRequestError.js +23 -0
  14. package/build/api/clientTrading.js +213 -0
  15. package/build/api/clientTradingError.js +4 -0
  16. package/build/api/communication/feedback.js +147 -59
  17. package/build/api/communication/message.js +134 -81
  18. package/build/api/communication/negotiation.js +65 -53
  19. package/build/api/communication/notification.js +458 -164
  20. package/build/api/developer/developer.js +99 -45
  21. package/build/api/index.js +23 -8
  22. package/build/api/listing-management/inventory.js +884 -338
  23. package/build/api/listing-metadata/metadata.js +416 -170
  24. package/build/api/listing-metadata/taxonomy.js +187 -42
  25. package/build/api/marketing-and-promotions/marketing.js +1392 -598
  26. package/build/api/marketing-and-promotions/recommendation.js +49 -24
  27. package/build/api/order-management/dispute.js +226 -45
  28. package/build/api/order-management/fulfillment.js +144 -71
  29. package/build/api/order-management/orderIssueHelpers.js +61 -0
  30. package/build/api/other/compliance.js +50 -38
  31. package/build/api/other/edelivery.js +603 -159
  32. package/build/api/other/finding.js +280 -0
  33. package/build/api/other/identity.js +30 -15
  34. package/build/api/other/translation.js +29 -14
  35. package/build/api/other/vero.js +113 -27
  36. package/build/api/rateLimitTracker.js +55 -0
  37. package/build/api/shared/request.js +189 -98
  38. package/build/api/trading/trading.js +154 -87
  39. package/build/auth/credentialSession.js +250 -0
  40. package/build/auth/oauth.js +298 -171
  41. package/build/auth/{oauth-metadata.js → oauthMetadata.js} +22 -6
  42. package/build/auth/oauthMiddleware.js +104 -0
  43. package/build/auth/{scope-utils.js → scopeUtils.js} +101 -28
  44. package/build/auth/tokenVerifier.js +243 -0
  45. package/build/auth/tokenVerifierError.js +21 -0
  46. package/build/config/environment.js +148 -113
  47. package/build/config/{tool-families.js → toolFamilies.js} +30 -14
  48. package/build/index.js +25 -19
  49. package/build/mcp/{http-transport.js → httpTransport.js} +102 -52
  50. package/build/mcp/readOnlyFilter.js +67 -0
  51. package/build/mcp/runtime.js +31 -13
  52. package/build/mcp/{tool-gating.js → toolGating.js} +77 -49
  53. package/build/mcp/{ui-bridge.js → uiBridge.js} +80 -23
  54. package/build/schemas/account-management/account.js +144 -6
  55. package/build/schemas/analytics/analytics.js +33 -19
  56. package/build/schemas/communication/messages.js +12 -42
  57. package/build/schemas/developer/developer.js +135 -0
  58. package/build/schemas/fulfillment/orders.js +183 -21
  59. package/build/schemas/index.js +27 -19
  60. package/build/schemas/inventory-management/inventory.js +17 -9
  61. package/build/schemas/marketing/marketing.js +480 -25
  62. package/build/schemas/metadata/metadata.js +11 -6
  63. package/build/schemas/other/finding.js +27 -0
  64. package/build/schemas/other/otherApis.js +424 -0
  65. package/build/schemas/taxonomy/taxonomy.js +11 -5
  66. package/build/scripts/{auto-setup.js → autoSetup.js} +87 -74
  67. package/build/scripts/{build-ui.js → buildUi.js} +6 -1
  68. package/build/scripts/{dev-sync.js → devSync.js} +169 -110
  69. package/build/scripts/diagnostics.js +52 -44
  70. package/build/scripts/{download-specs.js → downloadSpecs.js} +29 -21
  71. package/build/scripts/{interactive-setup.js → interactiveSetup.js} +84 -78
  72. package/build/scripts/setup.js +241 -178
  73. package/build/scripts/{setup-shared.js → setupShared.js} +29 -7
  74. package/build/scripts/skills.js +35 -27
  75. package/build/scripts/updateApiStatusDoc.js +71 -0
  76. package/build/serverHttp.js +90 -0
  77. package/build/skills/content.js +124 -118
  78. package/build/skills/index.js +22 -10
  79. package/build/skills/install.js +21 -10
  80. package/build/skills/markers.js +50 -15
  81. package/build/skills/{registry-snapshot.js → registrySnapshot.js} +8 -2
  82. package/build/skills/render.js +41 -14
  83. package/build/skills/targets.js +49 -17
  84. package/build/tools/categories/account.js +166 -264
  85. package/build/tools/categories/analytics.js +11 -22
  86. package/build/tools/categories/browse.js +17 -0
  87. package/build/tools/categories/communication.js +124 -399
  88. package/build/tools/categories/connector.js +23 -20
  89. package/build/tools/categories/developer.js +46 -159
  90. package/build/tools/categories/fulfillment.js +84 -215
  91. package/build/tools/categories/index.js +6 -14
  92. package/build/tools/categories/inventory.js +238 -293
  93. package/build/tools/categories/marketing.js +677 -39
  94. package/build/tools/categories/metadata.js +190 -117
  95. package/build/tools/categories/other.js +81 -208
  96. package/build/tools/categories/taxonomy.js +29 -20
  97. package/build/tools/categories/{token-management.js → tokenManagement.js} +187 -192
  98. package/build/tools/categories/trading.js +16 -47
  99. package/build/tools/contracts.js +34 -24
  100. package/build/tools/{define-tool.js → defineTool.js} +44 -29
  101. package/build/tools/registry.js +87 -29
  102. package/build/tools/schemas.js +3 -57
  103. package/build/tools/ui/archetypes.js +1 -0
  104. package/build/tools/ui/{map-helpers.js → mapHelpers.js} +69 -19
  105. package/build/tools/ui/maps.js +294 -80
  106. package/build/types/index.js +1 -1
  107. package/build/ui/card.html +14 -14
  108. package/build/ui/chart.html +14 -14
  109. package/build/ui/stat.html +87 -0
  110. package/build/ui/table.html +14 -14
  111. package/build/utils/apiStatusFeed.js +95 -0
  112. package/build/utils/cliOutput.js +15 -0
  113. package/build/utils/cliUi.js +108 -0
  114. package/build/utils/communication/feedback.js +57 -77
  115. package/build/utils/communication/message.js +69 -98
  116. package/build/utils/communication/negotiation.js +30 -57
  117. package/build/utils/communication/notification.js +112 -252
  118. package/build/utils/{date-converter.js → dateConverter.js} +62 -30
  119. package/build/utils/effectSchema.js +203 -0
  120. package/build/utils/effectSchemaAdapter.js +121 -0
  121. package/build/utils/effectSchemaChainMethods.js +146 -0
  122. package/build/utils/effectSchemaRefinements.js +104 -0
  123. package/build/utils/effectSchemaStringMethods.js +63 -0
  124. package/build/utils/effectSchemaTypes.js +47 -0
  125. package/build/utils/{env-parser.js → envParser.js} +10 -2
  126. package/build/utils/errors.js +7 -3
  127. package/build/utils/http.js +148 -89
  128. package/build/utils/{llm-client-detector.js → llmClientDetector.js} +295 -274
  129. package/build/utils/logger.js +127 -51
  130. package/build/utils/{oauth-helper.js → oauthHelper.js} +127 -90
  131. package/build/utils/other/compliance.js +18 -38
  132. package/build/utils/other/identity.js +2 -2
  133. package/build/utils/other/translation.js +4 -4
  134. package/build/utils/other/vero.js +36 -20
  135. package/build/utils/schemaHelpers.js +22 -0
  136. package/build/utils/scopeHelper.js +270 -0
  137. package/build/utils/securityChecker.js +316 -0
  138. package/build/utils/{setup-validator.js → setupValidator.js} +113 -94
  139. package/build/utils/{setup-wizard.js → setupWizard.js} +57 -46
  140. package/build/utils/{token-utils.js → tokenUtils.js} +2 -2
  141. package/build/utils/trading/trading.js +35 -0
  142. package/build/utils/typeGuards.js +12 -0
  143. package/build/utils/version.js +65 -29
  144. package/package.json +10 -8
  145. package/build/api/client-trading.js +0 -124
  146. package/build/api/communication/shared.js +0 -59
  147. package/build/api/shared/query-params.js +0 -16
  148. package/build/auth/credential-session.js +0 -166
  149. package/build/auth/oauth-middleware.js +0 -100
  150. package/build/auth/token-verifier.js +0 -186
  151. package/build/schemas/other/other-apis.js +0 -390
  152. package/build/scripts/update-api-status-doc.js +0 -44
  153. package/build/server-http.js +0 -85
  154. package/build/tools/definitions/marketing.js +0 -1381
  155. package/build/tools/tool-handlers/marketing.js +0 -312
  156. package/build/utils/account-management/account.js +0 -818
  157. package/build/utils/api-status-feed.js +0 -84
  158. package/build/utils/cli-ui.js +0 -47
  159. package/build/utils/order-management/dispute.js +0 -369
  160. package/build/utils/order-management/fulfillment.js +0 -205
  161. package/build/utils/other/edelivery.js +0 -235
  162. package/build/utils/schema-helpers.js +0 -13
  163. package/build/utils/scope-helper.js +0 -207
  164. package/build/utils/security-checker.js +0 -248
  165. package/build/utils/type-guards.js +0 -6
  166. /package/build/auth/{oauth-types.js → oauthTypes.js} +0 -0
  167. /package/build/{server-http.d.ts → serverHttp.d.ts} +0 -0
  168. /package/build/tools/ui/{view-models.js → viewModels.js} +0 -0
  169. /package/build/types/{ebay-enums.js → ebayEnums.js} +0 -0
@@ -1,55 +1,43 @@
1
- import { z } from 'zod';
1
+ import { z } from '../../utils/effectSchema.js';
2
2
  /**
3
- * Zod schemas for Message API input validation
4
- * Based on: src/api/communication/message.ts
3
+ * Effect-backed schemas for Message API input validation.
5
4
  * OpenAPI spec: docs/sell-apps/communication/commerce_message_v1_oas3.json
6
- * Types from: src/types/commerce_message_v1_oas3.ts
7
5
  */
8
- // Reusable schema for filter parameter
9
- const _filterSchema = z
10
- .string({
11
- message: 'Filter must be a string',
12
- invalid_type_error: 'filter must be a string',
13
- description: 'Filter criteria for the query',
14
- })
15
- .optional();
16
- // Reusable schema for limit parameter (string in API)
6
+ /** Optional positive page size accepted by Message list endpoints. */
17
7
  const limitSchema = z
18
- .string({
19
- invalid_type_error: 'limit must be a string',
8
+ .number({
9
+ invalid_type_error: 'limit must be a number',
20
10
  description: 'Maximum number of items to return (25-50)',
21
11
  })
12
+ .positive('limit must be a positive number')
22
13
  .optional();
23
- // Reusable schema for offset parameter (string in API)
14
+ /** Optional zero-based page offset accepted by Message list endpoints. */
24
15
  const offsetSchema = z
25
- .string({
26
- invalid_type_error: 'offset must be a string',
16
+ .number({
17
+ invalid_type_error: 'offset must be a number',
27
18
  description: 'Number of items to skip',
28
19
  })
20
+ .min(0, 'offset must be a non-negative number')
29
21
  .optional();
30
- /**
31
- * Schema for bulkUpdateConversation method
32
- * Endpoint: POST /bulk_update_conversation
33
- * Body: BulkUpdateConversationsRequest - conversations array
34
- */
22
+ /** Schema for bulkUpdateConversation input. */
35
23
  export const bulkUpdateConversationSchema = z.object({
36
24
  conversations: z
37
25
  .array(z.object({
38
- conversation_id: z
26
+ conversationId: z
39
27
  .string({
40
- invalid_type_error: 'conversation_id must be a string',
28
+ invalid_type_error: 'conversationId must be a string',
41
29
  description: 'The unique identifier of the conversation',
42
30
  })
43
31
  .optional(),
44
- conversation_status: z
32
+ conversationStatus: z
45
33
  .string({
46
- invalid_type_error: 'conversation_status must be a string',
34
+ invalid_type_error: 'conversationStatus must be a string',
47
35
  description: 'The updated status: ACTIVE, ARCHIVE, DELETE, READ, UNREAD',
48
36
  })
49
37
  .optional(),
50
- conversation_type: z
38
+ conversationType: z
51
39
  .string({
52
- invalid_type_error: 'conversation_type must be a string',
40
+ invalid_type_error: 'conversationType must be a string',
53
41
  description: 'The existing type: FROM_MEMBERS or FROM_EBAY (required but cannot be updated)',
54
42
  })
55
43
  .optional(),
@@ -59,147 +47,134 @@ export const bulkUpdateConversationSchema = z.object({
59
47
  })
60
48
  .optional(),
61
49
  });
62
- /**
63
- * Schema for getConversations method
64
- * Endpoint: GET /conversation
65
- * Params: GetConversationsParams - conversation_type (required), conversation_status, end_time, limit, offset, other_party_username, reference_id, reference_type, start_time
66
- */
50
+ /** Schema for getConversations input. */
67
51
  export const getConversationsSchema = z.object({
68
- conversation_type: z.string({
52
+ conversationType: z.string({
69
53
  message: 'Conversation type is required',
70
- required_error: 'conversation_type is required',
71
- invalid_type_error: 'conversation_type must be a string',
54
+ required_error: 'conversationType is required',
55
+ invalid_type_error: 'conversationType must be a string',
72
56
  description: 'Type of conversation: FROM_EBAY or FROM_MEMBERS',
73
57
  }),
74
- conversation_status: z
58
+ conversationStatus: z
75
59
  .string({
76
- invalid_type_error: 'conversation_status must be a string',
60
+ invalid_type_error: 'conversationStatus must be a string',
77
61
  description: 'Filter by status: ACTIVE, ARCHIVE, DELETE, READ, UNREAD',
78
62
  })
79
63
  .optional(),
80
- end_time: z
64
+ endTime: z
81
65
  .string({
82
- invalid_type_error: 'end_time must be a string',
66
+ invalid_type_error: 'endTime must be a string',
83
67
  description: 'End time for retrieving conversations (ISO 8601 format)',
84
68
  })
85
69
  .optional(),
86
70
  limit: limitSchema,
87
71
  offset: offsetSchema,
88
- other_party_username: z
72
+ otherPartyUsername: z
89
73
  .string({
90
- invalid_type_error: 'other_party_username must be a string',
74
+ invalid_type_error: 'otherPartyUsername must be a string',
91
75
  description: 'Filter by specific eBay user',
92
76
  })
93
77
  .optional(),
94
- reference_id: z
78
+ referenceId: z
95
79
  .string({
96
- invalid_type_error: 'reference_id must be a string',
80
+ invalid_type_error: 'referenceId must be a string',
97
81
  description: 'Filter by reference ID (e.g., listing ID)',
98
82
  })
99
83
  .optional(),
100
- reference_type: z
84
+ referenceType: z
101
85
  .string({
102
- invalid_type_error: 'reference_type must be a string',
86
+ invalid_type_error: 'referenceType must be a string',
103
87
  description: 'Reference type (currently only LISTING is supported)',
104
88
  })
105
89
  .optional(),
106
- start_time: z
90
+ startTime: z
107
91
  .string({
108
- invalid_type_error: 'start_time must be a string',
92
+ invalid_type_error: 'startTime must be a string',
109
93
  description: 'Start time for retrieving conversations (ISO 8601 format)',
110
94
  })
111
95
  .optional(),
112
96
  });
113
- /**
114
- * Schema for getConversation method
115
- * Endpoint: GET /conversation/{conversation_id}
116
- * Path: conversation_id (required)
117
- * Query: conversation_type (required), limit, offset
118
- */
97
+ /** Schema for getConversation input. */
119
98
  export const getConversationSchema = z.object({
120
- conversation_id: z.string({
99
+ conversationId: z.string({
121
100
  message: 'Conversation ID is required',
122
- required_error: 'conversation_id is required',
123
- invalid_type_error: 'conversation_id must be a string',
101
+ required_error: 'conversationId is required',
102
+ invalid_type_error: 'conversationId must be a string',
124
103
  description: 'The unique identifier for the conversation',
125
104
  }),
126
- conversation_type: z.string({
105
+ conversationType: z.string({
127
106
  message: 'Conversation type is required',
128
- required_error: 'conversation_type is required',
129
- invalid_type_error: 'conversation_type must be a string',
107
+ required_error: 'conversationType is required',
108
+ invalid_type_error: 'conversationType must be a string',
130
109
  description: 'Type of conversation: FROM_EBAY or FROM_MEMBERS',
131
110
  }),
132
111
  limit: limitSchema,
133
112
  offset: offsetSchema,
134
113
  });
135
- /**
136
- * Schema for sendMessage method
137
- * Endpoint: POST /send_message
138
- * Body: SendMessageRequest - conversationId, emailCopyToSender, messageMedia, messageText, otherPartyUsername, reference
139
- */
114
+ /** Schema for sendMessage input. */
140
115
  export const sendMessageSchema = z.object({
141
- conversation_id: z
116
+ conversationId: z
142
117
  .string({
143
- invalid_type_error: 'conversation_id must be a string',
118
+ invalid_type_error: 'conversationId must be a string',
144
119
  description: 'ID of existing conversation (required if sending in existing conversation)',
145
120
  })
146
121
  .optional(),
147
- email_copy_to_sender: z
122
+ emailCopyToSender: z
148
123
  .boolean({
149
- invalid_type_error: 'email_copy_to_sender must be a boolean',
124
+ invalid_type_error: 'emailCopyToSender must be a boolean',
150
125
  description: 'Whether to email a copy to the sender',
151
126
  })
152
127
  .optional(),
153
- message_media: z
128
+ messageMedia: z
154
129
  .array(z.object({
155
- media_name: z
130
+ mediaName: z
156
131
  .string({
157
- invalid_type_error: 'media_name must be a string',
132
+ invalid_type_error: 'mediaName must be a string',
158
133
  description: 'Name of the media',
159
134
  })
160
135
  .optional(),
161
- media_type: z
136
+ mediaType: z
162
137
  .string({
163
- invalid_type_error: 'media_type must be a string',
138
+ invalid_type_error: 'mediaType must be a string',
164
139
  description: 'Type of media: IMAGE, PDF, DOC, TXT',
165
140
  })
166
141
  .optional(),
167
- media_url: z
142
+ mediaUrl: z
168
143
  .string({
169
- invalid_type_error: 'media_url must be a string',
144
+ invalid_type_error: 'mediaUrl must be a string',
170
145
  description: 'HTTPS URL of the self-hosted media',
171
146
  })
172
147
  .optional(),
173
148
  }), {
174
- invalid_type_error: 'message_media must be an array',
149
+ invalid_type_error: 'messageMedia must be an array',
175
150
  description: 'Array of up to 5 media attachments',
176
151
  })
177
152
  .max(5, 'Maximum 5 media attachments allowed')
178
153
  .optional(),
179
- message_text: z
154
+ messageText: z
180
155
  .string({
181
- invalid_type_error: 'message_text must be a string',
156
+ invalid_type_error: 'messageText must be a string',
182
157
  description: 'The text of the message (max 2000 characters)',
183
158
  })
184
- .max(2000, 'message_text must be 2000 characters or less')
159
+ .max(2000, 'messageText must be 2000 characters or less')
185
160
  .optional(),
186
- other_party_username: z
161
+ otherPartyUsername: z
187
162
  .string({
188
- invalid_type_error: 'other_party_username must be a string',
163
+ invalid_type_error: 'otherPartyUsername must be a string',
189
164
  description: 'eBay username to send message to (required for new conversations)',
190
165
  })
191
166
  .optional(),
192
167
  reference: z
193
168
  .object({
194
- reference_id: z
169
+ referenceId: z
195
170
  .string({
196
- invalid_type_error: 'reference_id must be a string',
171
+ invalid_type_error: 'referenceId must be a string',
197
172
  description: 'The reference ID (e.g., item ID for LISTING)',
198
173
  })
199
174
  .optional(),
200
- reference_type: z
175
+ referenceType: z
201
176
  .string({
202
- invalid_type_error: 'reference_type must be a string',
177
+ invalid_type_error: 'referenceType must be a string',
203
178
  description: 'The reference type (currently only LISTING is supported)',
204
179
  })
205
180
  .optional(),
@@ -209,27 +184,23 @@ export const sendMessageSchema = z.object({
209
184
  })
210
185
  .optional(),
211
186
  });
212
- /**
213
- * Schema for updateConversation method
214
- * Endpoint: POST /update_conversation
215
- * Body: UpdateConversationRequest - conversationId, conversationStatus, conversationType, read
216
- */
187
+ /** Schema for updateConversation input. */
217
188
  export const updateConversationSchema = z.object({
218
- conversation_id: z
189
+ conversationId: z
219
190
  .string({
220
- invalid_type_error: 'conversation_id must be a string',
191
+ invalid_type_error: 'conversationId must be a string',
221
192
  description: 'The unique identifier of the conversation',
222
193
  })
223
194
  .optional(),
224
- conversation_status: z
195
+ conversationStatus: z
225
196
  .string({
226
- invalid_type_error: 'conversation_status must be a string',
197
+ invalid_type_error: 'conversationStatus must be a string',
227
198
  description: 'The updated status: ACTIVE, ARCHIVE, DELETE',
228
199
  })
229
200
  .optional(),
230
- conversation_type: z
201
+ conversationType: z
231
202
  .string({
232
- invalid_type_error: 'conversation_type must be a string',
203
+ invalid_type_error: 'conversationType must be a string',
233
204
  description: 'The existing type: FROM_MEMBERS or FROM_EBAY (required but cannot be updated)',
234
205
  })
235
206
  .optional(),
@@ -1,61 +1,49 @@
1
- import { z } from 'zod';
1
+ import { z } from '../../utils/effectSchema.js';
2
2
  /**
3
- * Zod schemas for Negotiation API input validation
4
- * Based on: src/api/communication/negotiation.ts
3
+ * Effect-backed schemas for Negotiation API input validation.
5
4
  * OpenAPI spec: docs/sell-apps/communication/sell_negotiation_v1_oas3.json
6
- * Types from: src/types/sell_negotiation_v1_oas3.ts
7
5
  */
8
- // Reusable schema for filter parameter
9
- const filterSchema = z
10
- .string({
11
- message: 'Filter must be a string',
12
- invalid_type_error: 'filter must be a string',
13
- description: 'Filter criteria for the query',
14
- })
15
- .optional();
16
- // Reusable schema for limit parameter (string in API)
6
+ /** Optional positive page size accepted by Negotiation list endpoints. */
17
7
  const limitSchema = z
18
- .string({
19
- invalid_type_error: 'limit must be a string',
8
+ .number({
9
+ invalid_type_error: 'limit must be a number',
20
10
  description: 'Maximum number of items to return (1-200)',
21
11
  })
12
+ .positive('limit must be a positive number')
22
13
  .optional();
23
- // Reusable schema for offset parameter (string in API)
14
+ /** Optional zero-based page offset accepted by Negotiation list endpoints. */
24
15
  const offsetSchema = z
25
- .string({
26
- invalid_type_error: 'offset must be a string',
16
+ .number({
17
+ invalid_type_error: 'offset must be a number',
27
18
  description: 'Number of items to skip',
28
19
  })
20
+ .min(0, 'offset must be a non-negative number')
29
21
  .optional();
30
- /**
31
- * Schema for findEligibleItems method
32
- * Endpoint: GET /find_eligible_items
33
- * Query Params: FindEligibleItemsParams - limit, offset
34
- * Headers: X-EBAY-C-MARKETPLACE-ID (required)
35
- */
22
+ /** Schema for findEligibleItems input. */
36
23
  export const findEligibleItemsSchema = z.object({
37
24
  limit: limitSchema,
38
25
  offset: offsetSchema,
39
- marketplace_id: z
26
+ marketplaceId: z
40
27
  .string({
41
- invalid_type_error: 'marketplace_id must be a string',
28
+ invalid_type_error: 'marketplaceId must be a string',
42
29
  description: 'The eBay marketplace ID (X-EBAY-C-MARKETPLACE-ID header)',
43
30
  })
44
31
  .optional(),
45
32
  });
46
- /**
47
- * Schema for sendOfferToInterestedBuyers method
48
- * Endpoint: POST /send_offer_to_interested_buyers
49
- * Body: CreateOffersRequest - allowCounterOffer, message, offerDuration, offeredItems
50
- * Headers: X-EBAY-C-MARKETPLACE-ID (required)
51
- */
33
+ /** Schema for sendOfferToInterestedBuyers input. */
52
34
  export const sendOfferToInterestedBuyersSchema = z.object({
53
- allow_counter_offer: z
35
+ allowCounterOffer: z
54
36
  .boolean({
55
- invalid_type_error: 'allow_counter_offer must be a boolean',
37
+ invalid_type_error: 'allowCounterOffer must be a boolean',
56
38
  description: 'Whether to allow counter-offers (currently must be false)',
57
39
  })
58
40
  .optional(),
41
+ marketplaceId: z
42
+ .string({
43
+ invalid_type_error: 'marketplaceId must be a string',
44
+ description: 'The eBay marketplace ID (X-EBAY-C-MARKETPLACE-ID header)',
45
+ })
46
+ .optional(),
59
47
  message: z
60
48
  .string({
61
49
  invalid_type_error: 'message must be a string',
@@ -63,7 +51,7 @@ export const sendOfferToInterestedBuyersSchema = z.object({
63
51
  })
64
52
  .max(2000, 'message must be 2000 characters or less')
65
53
  .optional(),
66
- offer_duration: z
54
+ offerDuration: z
67
55
  .object({
68
56
  unit: z
69
57
  .string({
@@ -81,21 +69,21 @@ export const sendOfferToInterestedBuyersSchema = z.object({
81
69
  })
82
70
  .optional(),
83
71
  }, {
84
- invalid_type_error: 'offer_duration must be an object',
72
+ invalid_type_error: 'offerDuration must be an object',
85
73
  description: 'Duration the offer is valid (default: 2 days)',
86
74
  })
87
75
  .optional(),
88
- offered_items: z
76
+ offeredItems: z
89
77
  .array(z.object({
90
- discount_percentage: z
78
+ discountPercentage: z
91
79
  .string({
92
- invalid_type_error: 'discount_percentage must be a string',
80
+ invalid_type_error: 'discountPercentage must be a string',
93
81
  description: 'Percentage discount (minimum 5)',
94
82
  })
95
83
  .optional(),
96
- listing_id: z
84
+ listingId: z
97
85
  .string({
98
- invalid_type_error: 'listing_id must be a string',
86
+ invalid_type_error: 'listingId must be a string',
99
87
  description: 'The unique eBay listing ID',
100
88
  })
101
89
  .optional(),
@@ -128,23 +116,8 @@ export const sendOfferToInterestedBuyersSchema = z.object({
128
116
  })
129
117
  .optional(),
130
118
  }), {
131
- invalid_type_error: 'offered_items must be an array',
119
+ invalid_type_error: 'offeredItems must be an array',
132
120
  description: 'Array of items to offer (currently limited to one item)',
133
121
  })
134
122
  .optional(),
135
- marketplace_id: z
136
- .string({
137
- invalid_type_error: 'marketplace_id must be a string',
138
- description: 'The eBay marketplace ID (X-EBAY-C-MARKETPLACE-ID header)',
139
- })
140
- .optional(),
141
- });
142
- /**
143
- * Schema for getOffersToBuyers method (deprecated)
144
- * Note: This method does not match any endpoint in the OpenAPI spec
145
- */
146
- export const getOffersToBuyersSchema = z.object({
147
- filter: filterSchema,
148
- limit: limitSchema,
149
- offset: offsetSchema,
150
123
  });