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.
- package/LICENSE +201 -0
- package/README.md +586 -0
- package/build/api/account-management/account.d.ts +216 -0
- package/build/api/account-management/account.js +305 -0
- package/build/api/analytics-and-report/analytics.d.ts +33 -0
- package/build/api/analytics-and-report/analytics.js +102 -0
- package/build/api/client.d.ts +89 -0
- package/build/api/client.js +343 -0
- package/build/api/communication/feedback.d.ts +45 -0
- package/build/api/communication/feedback.js +119 -0
- package/build/api/communication/message.d.ts +55 -0
- package/build/api/communication/message.js +131 -0
- package/build/api/communication/negotiation.d.ts +39 -0
- package/build/api/communication/negotiation.js +97 -0
- package/build/api/communication/notification.d.ts +128 -0
- package/build/api/communication/notification.js +373 -0
- package/build/api/index.d.ts +96 -0
- package/build/api/index.js +121 -0
- package/build/api/listing-management/inventory.d.ts +216 -0
- package/build/api/listing-management/inventory.js +633 -0
- package/build/api/listing-metadata/metadata.d.ts +154 -0
- package/build/api/listing-metadata/metadata.js +485 -0
- package/build/api/listing-metadata/taxonomy.d.ts +38 -0
- package/build/api/listing-metadata/taxonomy.js +58 -0
- package/build/api/marketing-and-promotions/marketing.d.ts +395 -0
- package/build/api/marketing-and-promotions/marketing.js +565 -0
- package/build/api/marketing-and-promotions/recommendation.d.ts +20 -0
- package/build/api/marketing-and-promotions/recommendation.js +32 -0
- package/build/api/order-management/dispute.d.ts +65 -0
- package/build/api/order-management/dispute.js +69 -0
- package/build/api/order-management/fulfillment.d.ts +80 -0
- package/build/api/order-management/fulfillment.js +89 -0
- package/build/api/other/compliance.d.ts +26 -0
- package/build/api/other/compliance.js +47 -0
- package/build/api/other/edelivery.d.ts +153 -0
- package/build/api/other/edelivery.js +219 -0
- package/build/api/other/identity.d.ts +17 -0
- package/build/api/other/identity.js +24 -0
- package/build/api/other/translation.d.ts +14 -0
- package/build/api/other/translation.js +22 -0
- package/build/api/other/vero.d.ts +30 -0
- package/build/api/other/vero.js +48 -0
- package/build/auth/oauth-metadata.d.ts +46 -0
- package/build/auth/oauth-metadata.js +59 -0
- package/build/auth/oauth-middleware.d.ts +35 -0
- package/build/auth/oauth-middleware.js +99 -0
- package/build/auth/oauth-types.d.ts +66 -0
- package/build/auth/oauth-types.js +4 -0
- package/build/auth/oauth.d.ts +93 -0
- package/build/auth/oauth.js +383 -0
- package/build/auth/scope-utils.d.ts +70 -0
- package/build/auth/scope-utils.js +304 -0
- package/build/auth/token-verifier.d.ts +57 -0
- package/build/auth/token-verifier.js +172 -0
- package/build/config/environment.d.ts +61 -0
- package/build/config/environment.js +260 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +98 -0
- package/build/schemas/account-management/account.d.ts +5324 -0
- package/build/schemas/account-management/account.js +366 -0
- package/build/schemas/analytics/analytics.d.ts +167 -0
- package/build/schemas/analytics/analytics.js +191 -0
- package/build/schemas/communication/messages.d.ts +1872 -0
- package/build/schemas/communication/messages.js +348 -0
- package/build/schemas/fulfillment/orders.d.ts +4655 -0
- package/build/schemas/fulfillment/orders.js +317 -0
- package/build/schemas/index.d.ts +2100 -0
- package/build/schemas/index.js +68 -0
- package/build/schemas/inventory-management/inventory.d.ts +6419 -0
- package/build/schemas/inventory-management/inventory.js +450 -0
- package/build/schemas/marketing/marketing.d.ts +14181 -0
- package/build/schemas/marketing/marketing.js +1088 -0
- package/build/schemas/metadata/metadata.d.ts +5259 -0
- package/build/schemas/metadata/metadata.js +614 -0
- package/build/schemas/other/other-apis.d.ts +257 -0
- package/build/schemas/other/other-apis.js +372 -0
- package/build/schemas/taxonomy/taxonomy.d.ts +215 -0
- package/build/schemas/taxonomy/taxonomy.js +571 -0
- package/build/scripts/auto-setup.d.ts +12 -0
- package/build/scripts/auto-setup.js +277 -0
- package/build/scripts/diagnostics.d.ts +8 -0
- package/build/scripts/diagnostics.js +299 -0
- package/build/scripts/download-specs.d.ts +1 -0
- package/build/scripts/download-specs.js +116 -0
- package/build/scripts/interactive-setup.d.ts +21 -0
- package/build/scripts/interactive-setup.js +723 -0
- package/build/server-http.d.ts +11 -0
- package/build/server-http.js +361 -0
- package/build/tools/definitions/account-with-schemas.d.ts +39 -0
- package/build/tools/definitions/account-with-schemas.js +170 -0
- package/build/tools/definitions/account.d.ts +12 -0
- package/build/tools/definitions/account.js +428 -0
- package/build/tools/definitions/analytics.d.ts +25 -0
- package/build/tools/definitions/analytics.js +66 -0
- package/build/tools/definitions/communication.d.ts +12 -0
- package/build/tools/definitions/communication.js +151 -0
- package/build/tools/definitions/fulfillment.d.ts +12 -0
- package/build/tools/definitions/fulfillment.js +326 -0
- package/build/tools/definitions/index.d.ts +25 -0
- package/build/tools/definitions/index.js +37 -0
- package/build/tools/definitions/inventory.d.ts +12 -0
- package/build/tools/definitions/inventory.js +429 -0
- package/build/tools/definitions/marketing.d.ts +12 -0
- package/build/tools/definitions/marketing.js +1095 -0
- package/build/tools/definitions/metadata.d.ts +12 -0
- package/build/tools/definitions/metadata.js +188 -0
- package/build/tools/definitions/other.d.ts +13 -0
- package/build/tools/definitions/other.js +309 -0
- package/build/tools/definitions/taxonomy.d.ts +25 -0
- package/build/tools/definitions/taxonomy.js +64 -0
- package/build/tools/definitions/token-management.d.ts +35 -0
- package/build/tools/definitions/token-management.js +103 -0
- package/build/tools/index.d.ts +11 -0
- package/build/tools/index.js +1003 -0
- package/build/tools/schemas.d.ts +14764 -0
- package/build/tools/schemas.js +667 -0
- package/build/tools/tool-definitions.d.ts +35 -0
- package/build/tools/tool-definitions.js +3534 -0
- package/build/types/application-settings/developerAnalyticsV1BetaOas3.d.ts +197 -0
- package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
- package/build/types/application-settings/developerClientRegistrationV1Oas3.d.ts +155 -0
- package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
- package/build/types/application-settings/developerKeyManagementV1Oas3.d.ts +246 -0
- package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
- package/build/types/ebay-enums.d.ts +1204 -0
- package/build/types/ebay-enums.js +1330 -0
- package/build/types/ebay.d.ts +143 -0
- package/build/types/ebay.js +123 -0
- package/build/types/index.d.ts +6 -0
- package/build/types/index.js +10 -0
- package/build/types/sell-apps/account-management/sellAccountV1Oas3.d.ts +2579 -0
- package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
- package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.d.ts +446 -0
- package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.d.ts +705 -0
- package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
- package/build/types/sell-apps/communication/commerceMessageV1Oas3.d.ts +590 -0
- package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/commerceNotificationV1Oas3.d.ts +1276 -0
- package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
- package/build/types/sell-apps/communication/sellNegotiationV1Oas3.d.ts +277 -0
- package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
- package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.d.ts +3133 -0
- package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
- package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.d.ts +2289 -0
- package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.d.ts +6650 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.d.ts +172 -0
- package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
- package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.d.ts +1869 -0
- package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.d.ts +178 -0
- package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.d.ts +128 -0
- package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
- package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.d.ts +417 -0
- package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.d.ts +273 -0
- package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.d.ts +2537 -0
- package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.d.ts +6650 -0
- package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
- package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.d.ts +172 -0
- package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
- package/build/utils/account-management/account.d.ts +1094 -0
- package/build/utils/account-management/account.js +831 -0
- package/build/utils/communication/feedback.d.ts +152 -0
- package/build/utils/communication/feedback.js +216 -0
- package/build/utils/communication/message.d.ts +174 -0
- package/build/utils/communication/message.js +242 -0
- package/build/utils/communication/negotiation.d.ts +123 -0
- package/build/utils/communication/negotiation.js +150 -0
- package/build/utils/communication/notification.d.ts +370 -0
- package/build/utils/communication/notification.js +369 -0
- package/build/utils/date-converter.d.ts +59 -0
- package/build/utils/date-converter.js +160 -0
- package/build/utils/llm-client-detector.d.ts +54 -0
- package/build/utils/llm-client-detector.js +318 -0
- package/build/utils/oauth-helper.d.ts +37 -0
- package/build/utils/oauth-helper.js +315 -0
- package/build/utils/order-management/dispute.d.ts +346 -0
- package/build/utils/order-management/dispute.js +369 -0
- package/build/utils/order-management/fulfillment.d.ts +200 -0
- package/build/utils/order-management/fulfillment.js +205 -0
- package/build/utils/other/compliance.d.ts +49 -0
- package/build/utils/other/compliance.js +76 -0
- package/build/utils/other/edelivery.d.ts +310 -0
- package/build/utils/other/edelivery.js +241 -0
- package/build/utils/other/identity.d.ts +13 -0
- package/build/utils/other/identity.js +13 -0
- package/build/utils/other/translation.d.ts +28 -0
- package/build/utils/other/translation.js +41 -0
- package/build/utils/other/vero.d.ts +61 -0
- package/build/utils/other/vero.js +90 -0
- package/build/utils/scope-helper.d.ts +49 -0
- package/build/utils/scope-helper.js +207 -0
- package/build/utils/security-checker.d.ts +46 -0
- package/build/utils/security-checker.js +248 -0
- package/build/utils/setup-validator.d.ts +25 -0
- package/build/utils/setup-validator.js +305 -0
- package/build/utils/token-utils.d.ts +40 -0
- package/build/utils/token-utils.js +40 -0
- package/package.json +115 -0
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schemas for Dispute API input validation
|
|
4
|
+
* Based on: src/api/order-management/dispute.ts
|
|
5
|
+
* OpenAPI spec: docs/sell-apps/order-management/sell_fulfillment_v1_oas3.json
|
|
6
|
+
* Types from: src/types/sell_fulfillment_v1_oas3.ts
|
|
7
|
+
*/
|
|
8
|
+
// Reusable schema for payment dispute ID
|
|
9
|
+
const paymentDisputeIdSchema = z.string({
|
|
10
|
+
message: 'Payment dispute ID is required',
|
|
11
|
+
required_error: 'payment_dispute_id is required',
|
|
12
|
+
invalid_type_error: 'payment_dispute_id must be a string',
|
|
13
|
+
description: 'The unique identifier of the payment dispute',
|
|
14
|
+
});
|
|
15
|
+
// Reusable schema for evidence ID
|
|
16
|
+
const evidenceIdSchema = z.string({
|
|
17
|
+
message: 'Evidence ID is required',
|
|
18
|
+
required_error: 'evidence_id is required',
|
|
19
|
+
invalid_type_error: 'evidence_id must be a string',
|
|
20
|
+
description: 'The unique identifier of the evidence file set',
|
|
21
|
+
});
|
|
22
|
+
// Reusable schema for file ID
|
|
23
|
+
const fileIdSchema = z.string({
|
|
24
|
+
message: 'File ID is required',
|
|
25
|
+
required_error: 'file_id is required',
|
|
26
|
+
invalid_type_error: 'file_id must be a string',
|
|
27
|
+
description: 'The unique identifier of an evidential file',
|
|
28
|
+
});
|
|
29
|
+
// Reusable schema for limit parameter (number in API)
|
|
30
|
+
const limitSchema = z
|
|
31
|
+
.number({
|
|
32
|
+
invalid_type_error: 'limit must be a number',
|
|
33
|
+
description: 'Maximum number of payment disputes to return (default: 200, max: 200)',
|
|
34
|
+
})
|
|
35
|
+
.optional();
|
|
36
|
+
// Reusable schema for offset parameter (number in API)
|
|
37
|
+
const offsetSchema = z
|
|
38
|
+
.number({
|
|
39
|
+
invalid_type_error: 'offset must be a number',
|
|
40
|
+
description: 'Number of payment disputes to skip (zero-based index)',
|
|
41
|
+
})
|
|
42
|
+
.optional();
|
|
43
|
+
/**
|
|
44
|
+
* Schema for getPaymentDispute method
|
|
45
|
+
* Endpoint: GET /payment_dispute/{payment_dispute_id}
|
|
46
|
+
* Path: payment_dispute_id (required)
|
|
47
|
+
*/
|
|
48
|
+
export const getPaymentDisputeSchema = z.object({
|
|
49
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Schema for fetchEvidenceContent method
|
|
53
|
+
* Endpoint: GET /payment_dispute/{payment_dispute_id}/fetch_evidence_content
|
|
54
|
+
* Path: payment_dispute_id (required)
|
|
55
|
+
* Query: evidence_id (required), file_id (required)
|
|
56
|
+
*/
|
|
57
|
+
export const fetchEvidenceContentSchema = z.object({
|
|
58
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
59
|
+
evidence_id: evidenceIdSchema,
|
|
60
|
+
file_id: fileIdSchema,
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Schema for getActivities method
|
|
64
|
+
* Endpoint: GET /payment_dispute/{payment_dispute_id}/activity
|
|
65
|
+
* Path: payment_dispute_id (required)
|
|
66
|
+
*/
|
|
67
|
+
export const getActivitiesSchema = z.object({
|
|
68
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Schema for getPaymentDisputeSummaries method
|
|
72
|
+
* Endpoint: GET /payment_dispute_summary
|
|
73
|
+
* Query: order_id, buyer_username, open_date_from, open_date_to, payment_dispute_status, limit, offset
|
|
74
|
+
*/
|
|
75
|
+
export const getPaymentDisputeSummariesSchema = z.object({
|
|
76
|
+
order_id: z
|
|
77
|
+
.string({
|
|
78
|
+
invalid_type_error: 'order_id must be a string',
|
|
79
|
+
description: 'Filter by a specific order ID',
|
|
80
|
+
})
|
|
81
|
+
.optional(),
|
|
82
|
+
buyer_username: z
|
|
83
|
+
.string({
|
|
84
|
+
invalid_type_error: 'buyer_username must be a string',
|
|
85
|
+
description: "Filter by buyer's eBay username",
|
|
86
|
+
})
|
|
87
|
+
.optional(),
|
|
88
|
+
open_date_from: z
|
|
89
|
+
.string({
|
|
90
|
+
invalid_type_error: 'open_date_from must be a string',
|
|
91
|
+
description: 'Filter disputes opened on or after this date (ISO 8601 format)',
|
|
92
|
+
})
|
|
93
|
+
.optional(),
|
|
94
|
+
open_date_to: z
|
|
95
|
+
.string({
|
|
96
|
+
invalid_type_error: 'open_date_to must be a string',
|
|
97
|
+
description: 'Filter disputes opened on or before this date (ISO 8601 format)',
|
|
98
|
+
})
|
|
99
|
+
.optional(),
|
|
100
|
+
payment_dispute_status: z
|
|
101
|
+
.string({
|
|
102
|
+
invalid_type_error: 'payment_dispute_status must be a string',
|
|
103
|
+
description: 'Filter by dispute status (e.g., OPEN, ACTION_NEEDED, CLOSED)',
|
|
104
|
+
})
|
|
105
|
+
.optional(),
|
|
106
|
+
limit: limitSchema,
|
|
107
|
+
offset: offsetSchema,
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* Schema for contestPaymentDispute method
|
|
111
|
+
* Endpoint: POST /payment_dispute/{payment_dispute_id}/contest
|
|
112
|
+
* Path: payment_dispute_id (required)
|
|
113
|
+
* Body: ContestPaymentDisputeRequest (optional) - note, returnAddress, revision
|
|
114
|
+
*/
|
|
115
|
+
export const contestPaymentDisputeSchema = z.object({
|
|
116
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
117
|
+
note: z
|
|
118
|
+
.string({
|
|
119
|
+
invalid_type_error: 'note must be a string',
|
|
120
|
+
description: 'Information about the dispute (max 1000 characters)',
|
|
121
|
+
})
|
|
122
|
+
.max(1000, 'Note must not exceed 1000 characters')
|
|
123
|
+
.optional(),
|
|
124
|
+
return_address: z
|
|
125
|
+
.object({
|
|
126
|
+
full_name: z
|
|
127
|
+
.string({
|
|
128
|
+
invalid_type_error: 'full_name must be a string',
|
|
129
|
+
description: 'Full name of the person at the return address',
|
|
130
|
+
})
|
|
131
|
+
.optional(),
|
|
132
|
+
primary_phone: z
|
|
133
|
+
.object({
|
|
134
|
+
phone_number: z
|
|
135
|
+
.string({
|
|
136
|
+
invalid_type_error: 'phone_number must be a string',
|
|
137
|
+
description: 'Primary phone number',
|
|
138
|
+
})
|
|
139
|
+
.optional(),
|
|
140
|
+
})
|
|
141
|
+
.optional(),
|
|
142
|
+
address_line1: z
|
|
143
|
+
.string({
|
|
144
|
+
invalid_type_error: 'address_line1 must be a string',
|
|
145
|
+
description: 'First line of the street address',
|
|
146
|
+
})
|
|
147
|
+
.optional(),
|
|
148
|
+
address_line2: z
|
|
149
|
+
.string({
|
|
150
|
+
invalid_type_error: 'address_line2 must be a string',
|
|
151
|
+
description: 'Second line of the street address',
|
|
152
|
+
})
|
|
153
|
+
.optional(),
|
|
154
|
+
city: z
|
|
155
|
+
.string({
|
|
156
|
+
invalid_type_error: 'city must be a string',
|
|
157
|
+
description: 'City',
|
|
158
|
+
})
|
|
159
|
+
.optional(),
|
|
160
|
+
state_or_province: z
|
|
161
|
+
.string({
|
|
162
|
+
invalid_type_error: 'state_or_province must be a string',
|
|
163
|
+
description: 'State or province',
|
|
164
|
+
})
|
|
165
|
+
.optional(),
|
|
166
|
+
postal_code: z
|
|
167
|
+
.string({
|
|
168
|
+
invalid_type_error: 'postal_code must be a string',
|
|
169
|
+
description: 'Postal code',
|
|
170
|
+
})
|
|
171
|
+
.optional(),
|
|
172
|
+
country_code: z
|
|
173
|
+
.string({
|
|
174
|
+
invalid_type_error: 'country_code must be a string',
|
|
175
|
+
description: 'Two-letter ISO 3166-1 alpha-2 country code',
|
|
176
|
+
})
|
|
177
|
+
.optional(),
|
|
178
|
+
})
|
|
179
|
+
.optional(),
|
|
180
|
+
revision: z
|
|
181
|
+
.number({
|
|
182
|
+
invalid_type_error: 'revision must be a number',
|
|
183
|
+
description: 'Revision number of the payment dispute (required)',
|
|
184
|
+
})
|
|
185
|
+
.optional(),
|
|
186
|
+
});
|
|
187
|
+
/**
|
|
188
|
+
* Schema for acceptPaymentDispute method
|
|
189
|
+
* Endpoint: POST /payment_dispute/{payment_dispute_id}/accept
|
|
190
|
+
* Path: payment_dispute_id (required)
|
|
191
|
+
* Body: AcceptPaymentDisputeRequest (optional) - returnAddress, revision
|
|
192
|
+
*/
|
|
193
|
+
export const acceptPaymentDisputeSchema = z.object({
|
|
194
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
195
|
+
return_address: z
|
|
196
|
+
.object({
|
|
197
|
+
full_name: z
|
|
198
|
+
.string({
|
|
199
|
+
invalid_type_error: 'full_name must be a string',
|
|
200
|
+
description: 'Full name of the person at the return address',
|
|
201
|
+
})
|
|
202
|
+
.optional(),
|
|
203
|
+
primary_phone: z
|
|
204
|
+
.object({
|
|
205
|
+
phone_number: z
|
|
206
|
+
.string({
|
|
207
|
+
invalid_type_error: 'phone_number must be a string',
|
|
208
|
+
description: 'Primary phone number',
|
|
209
|
+
})
|
|
210
|
+
.optional(),
|
|
211
|
+
})
|
|
212
|
+
.optional(),
|
|
213
|
+
address_line1: z
|
|
214
|
+
.string({
|
|
215
|
+
invalid_type_error: 'address_line1 must be a string',
|
|
216
|
+
description: 'First line of the street address',
|
|
217
|
+
})
|
|
218
|
+
.optional(),
|
|
219
|
+
address_line2: z
|
|
220
|
+
.string({
|
|
221
|
+
invalid_type_error: 'address_line2 must be a string',
|
|
222
|
+
description: 'Second line of the street address',
|
|
223
|
+
})
|
|
224
|
+
.optional(),
|
|
225
|
+
city: z
|
|
226
|
+
.string({
|
|
227
|
+
invalid_type_error: 'city must be a string',
|
|
228
|
+
description: 'City',
|
|
229
|
+
})
|
|
230
|
+
.optional(),
|
|
231
|
+
state_or_province: z
|
|
232
|
+
.string({
|
|
233
|
+
invalid_type_error: 'state_or_province must be a string',
|
|
234
|
+
description: 'State or province',
|
|
235
|
+
})
|
|
236
|
+
.optional(),
|
|
237
|
+
postal_code: z
|
|
238
|
+
.string({
|
|
239
|
+
invalid_type_error: 'postal_code must be a string',
|
|
240
|
+
description: 'Postal code',
|
|
241
|
+
})
|
|
242
|
+
.optional(),
|
|
243
|
+
country_code: z
|
|
244
|
+
.string({
|
|
245
|
+
invalid_type_error: 'country_code must be a string',
|
|
246
|
+
description: 'Two-letter ISO 3166-1 alpha-2 country code',
|
|
247
|
+
})
|
|
248
|
+
.optional(),
|
|
249
|
+
})
|
|
250
|
+
.optional(),
|
|
251
|
+
revision: z
|
|
252
|
+
.number({
|
|
253
|
+
invalid_type_error: 'revision must be a number',
|
|
254
|
+
description: 'Revision number of the payment dispute (required)',
|
|
255
|
+
})
|
|
256
|
+
.optional(),
|
|
257
|
+
});
|
|
258
|
+
/**
|
|
259
|
+
* Schema for uploadEvidenceFile method
|
|
260
|
+
* Endpoint: POST /payment_dispute/{payment_dispute_id}/upload_evidence_file
|
|
261
|
+
* Path: payment_dispute_id (required)
|
|
262
|
+
* Body: ArrayBuffer (binary file data)
|
|
263
|
+
*/
|
|
264
|
+
export const uploadEvidenceFileSchema = z.object({
|
|
265
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
266
|
+
file_data: z.instanceof(ArrayBuffer, {
|
|
267
|
+
message: 'File data must be an ArrayBuffer',
|
|
268
|
+
}),
|
|
269
|
+
});
|
|
270
|
+
/**
|
|
271
|
+
* Schema for addEvidence method
|
|
272
|
+
* Endpoint: POST /payment_dispute/{payment_dispute_id}/add_evidence
|
|
273
|
+
* Path: payment_dispute_id (required)
|
|
274
|
+
* Body: AddEvidencePaymentDisputeRequest - evidenceType, files, lineItems
|
|
275
|
+
*/
|
|
276
|
+
export const addEvidenceSchema = z.object({
|
|
277
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
278
|
+
evidence_type: z
|
|
279
|
+
.string({
|
|
280
|
+
invalid_type_error: 'evidence_type must be a string',
|
|
281
|
+
description: 'Type of evidence (e.g., PROOF_OF_DELIVERY, PROOF_OF_AUTHENTICATION)',
|
|
282
|
+
})
|
|
283
|
+
.optional(),
|
|
284
|
+
files: z
|
|
285
|
+
.array(z.object({
|
|
286
|
+
file_id: z
|
|
287
|
+
.string({
|
|
288
|
+
invalid_type_error: 'file_id must be a string',
|
|
289
|
+
description: 'Unique identifier of the evidence file',
|
|
290
|
+
})
|
|
291
|
+
.optional(),
|
|
292
|
+
}), {
|
|
293
|
+
invalid_type_error: 'files must be an array',
|
|
294
|
+
description: 'Array of evidence files',
|
|
295
|
+
})
|
|
296
|
+
.optional(),
|
|
297
|
+
line_items: z
|
|
298
|
+
.array(z.object({
|
|
299
|
+
item_id: z
|
|
300
|
+
.string({
|
|
301
|
+
invalid_type_error: 'item_id must be a string',
|
|
302
|
+
description: 'eBay listing ID',
|
|
303
|
+
})
|
|
304
|
+
.optional(),
|
|
305
|
+
line_item_id: z
|
|
306
|
+
.string({
|
|
307
|
+
invalid_type_error: 'line_item_id must be a string',
|
|
308
|
+
description: 'Unique identifier of the line item',
|
|
309
|
+
})
|
|
310
|
+
.optional(),
|
|
311
|
+
}), {
|
|
312
|
+
invalid_type_error: 'line_items must be an array',
|
|
313
|
+
description: 'Array of order line items',
|
|
314
|
+
})
|
|
315
|
+
.optional(),
|
|
316
|
+
});
|
|
317
|
+
/**
|
|
318
|
+
* Schema for updateEvidence method
|
|
319
|
+
* Endpoint: POST /payment_dispute/{payment_dispute_id}/update_evidence
|
|
320
|
+
* Path: payment_dispute_id (required)
|
|
321
|
+
* Body: UpdateEvidencePaymentDisputeRequest - evidenceId, evidenceType, files, lineItems
|
|
322
|
+
*/
|
|
323
|
+
export const updateEvidenceSchema = z.object({
|
|
324
|
+
payment_dispute_id: paymentDisputeIdSchema,
|
|
325
|
+
evidence_id: z
|
|
326
|
+
.string({
|
|
327
|
+
invalid_type_error: 'evidence_id must be a string',
|
|
328
|
+
description: 'Unique identifier of the evidence set to update',
|
|
329
|
+
})
|
|
330
|
+
.optional(),
|
|
331
|
+
evidence_type: z
|
|
332
|
+
.string({
|
|
333
|
+
invalid_type_error: 'evidence_type must be a string',
|
|
334
|
+
description: 'Type of evidence (e.g., PROOF_OF_DELIVERY, PROOF_OF_AUTHENTICATION)',
|
|
335
|
+
})
|
|
336
|
+
.optional(),
|
|
337
|
+
files: z
|
|
338
|
+
.array(z.object({
|
|
339
|
+
file_id: z
|
|
340
|
+
.string({
|
|
341
|
+
invalid_type_error: 'file_id must be a string',
|
|
342
|
+
description: 'Unique identifier of the evidence file',
|
|
343
|
+
})
|
|
344
|
+
.optional(),
|
|
345
|
+
}), {
|
|
346
|
+
invalid_type_error: 'files must be an array',
|
|
347
|
+
description: 'Array of evidence files',
|
|
348
|
+
})
|
|
349
|
+
.optional(),
|
|
350
|
+
line_items: z
|
|
351
|
+
.array(z.object({
|
|
352
|
+
item_id: z
|
|
353
|
+
.string({
|
|
354
|
+
invalid_type_error: 'item_id must be a string',
|
|
355
|
+
description: 'eBay listing ID',
|
|
356
|
+
})
|
|
357
|
+
.optional(),
|
|
358
|
+
line_item_id: z
|
|
359
|
+
.string({
|
|
360
|
+
invalid_type_error: 'line_item_id must be a string',
|
|
361
|
+
description: 'Unique identifier of the line item',
|
|
362
|
+
})
|
|
363
|
+
.optional(),
|
|
364
|
+
}), {
|
|
365
|
+
invalid_type_error: 'line_items must be an array',
|
|
366
|
+
description: 'Array of order line items',
|
|
367
|
+
})
|
|
368
|
+
.optional(),
|
|
369
|
+
});
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for getOrders method
|
|
4
|
+
* Endpoint: GET /order
|
|
5
|
+
* Query: filter, limit, offset
|
|
6
|
+
*/
|
|
7
|
+
export declare const getOrdersSchema: z.ZodObject<{
|
|
8
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
9
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
filter?: string | undefined;
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
offset?: number | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
filter?: string | undefined;
|
|
17
|
+
limit?: number | undefined;
|
|
18
|
+
offset?: number | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Schema for getOrder method
|
|
22
|
+
* Endpoint: GET /order/{orderId}
|
|
23
|
+
* Path: orderId (required)
|
|
24
|
+
*/
|
|
25
|
+
export declare const getOrderSchema: z.ZodObject<{
|
|
26
|
+
order_id: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
order_id: string;
|
|
29
|
+
}, {
|
|
30
|
+
order_id: string;
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Schema for createShippingFulfillment method
|
|
34
|
+
* Endpoint: POST /order/{orderId}/shipping_fulfillment
|
|
35
|
+
* Path: orderId (required)
|
|
36
|
+
* Body: ShippingFulfillmentDetails - lineItems, shippedDate, shippingCarrierCode, trackingNumber
|
|
37
|
+
*/
|
|
38
|
+
export declare const createShippingFulfillmentSchema: z.ZodObject<{
|
|
39
|
+
order_id: z.ZodString;
|
|
40
|
+
line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
line_item_id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
quantity?: number | undefined;
|
|
45
|
+
line_item_id?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
quantity?: number | undefined;
|
|
48
|
+
line_item_id?: string | undefined;
|
|
49
|
+
}>, "many">>;
|
|
50
|
+
shipped_date: z.ZodOptional<z.ZodString>;
|
|
51
|
+
shipping_carrier_code: z.ZodOptional<z.ZodString>;
|
|
52
|
+
tracking_number: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
order_id: string;
|
|
55
|
+
line_items?: {
|
|
56
|
+
quantity?: number | undefined;
|
|
57
|
+
line_item_id?: string | undefined;
|
|
58
|
+
}[] | undefined;
|
|
59
|
+
shipped_date?: string | undefined;
|
|
60
|
+
shipping_carrier_code?: string | undefined;
|
|
61
|
+
tracking_number?: string | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
order_id: string;
|
|
64
|
+
line_items?: {
|
|
65
|
+
quantity?: number | undefined;
|
|
66
|
+
line_item_id?: string | undefined;
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
shipped_date?: string | undefined;
|
|
69
|
+
shipping_carrier_code?: string | undefined;
|
|
70
|
+
tracking_number?: string | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Schema for getShippingFulfillments method
|
|
74
|
+
* Endpoint: GET /order/{orderId}/shipping_fulfillment
|
|
75
|
+
* Path: orderId (required)
|
|
76
|
+
*/
|
|
77
|
+
export declare const getShippingFulfillmentsSchema: z.ZodObject<{
|
|
78
|
+
order_id: z.ZodString;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
order_id: string;
|
|
81
|
+
}, {
|
|
82
|
+
order_id: string;
|
|
83
|
+
}>;
|
|
84
|
+
/**
|
|
85
|
+
* Schema for getShippingFulfillment method
|
|
86
|
+
* Endpoint: GET /order/{orderId}/shipping_fulfillment/{fulfillmentId}
|
|
87
|
+
* Path: orderId (required), fulfillmentId (required)
|
|
88
|
+
*/
|
|
89
|
+
export declare const getShippingFulfillmentSchema: z.ZodObject<{
|
|
90
|
+
order_id: z.ZodString;
|
|
91
|
+
fulfillment_id: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
order_id: string;
|
|
94
|
+
fulfillment_id: string;
|
|
95
|
+
}, {
|
|
96
|
+
order_id: string;
|
|
97
|
+
fulfillment_id: string;
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Schema for issueRefund method
|
|
101
|
+
* Endpoint: POST /order/{orderId}/issue_refund
|
|
102
|
+
* Path: orderId (required)
|
|
103
|
+
* Body: IssueRefundRequest - reasonForRefund, comment, refundItems, orderLevelRefundAmount
|
|
104
|
+
*/
|
|
105
|
+
export declare const issueRefundSchema: z.ZodObject<{
|
|
106
|
+
order_id: z.ZodString;
|
|
107
|
+
reason_for_refund: z.ZodOptional<z.ZodString>;
|
|
108
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
109
|
+
refund_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
line_item_id: z.ZodOptional<z.ZodString>;
|
|
111
|
+
refund_amount: z.ZodOptional<z.ZodObject<{
|
|
112
|
+
value: z.ZodOptional<z.ZodString>;
|
|
113
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
value?: string | undefined;
|
|
116
|
+
currency?: string | undefined;
|
|
117
|
+
}, {
|
|
118
|
+
value?: string | undefined;
|
|
119
|
+
currency?: string | undefined;
|
|
120
|
+
}>>;
|
|
121
|
+
legacy_reference: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
legacy_item_id: z.ZodOptional<z.ZodString>;
|
|
123
|
+
legacy_transaction_id: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
legacy_item_id?: string | undefined;
|
|
126
|
+
legacy_transaction_id?: string | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
legacy_item_id?: string | undefined;
|
|
129
|
+
legacy_transaction_id?: string | undefined;
|
|
130
|
+
}>>;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
line_item_id?: string | undefined;
|
|
133
|
+
refund_amount?: {
|
|
134
|
+
value?: string | undefined;
|
|
135
|
+
currency?: string | undefined;
|
|
136
|
+
} | undefined;
|
|
137
|
+
legacy_reference?: {
|
|
138
|
+
legacy_item_id?: string | undefined;
|
|
139
|
+
legacy_transaction_id?: string | undefined;
|
|
140
|
+
} | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
line_item_id?: string | undefined;
|
|
143
|
+
refund_amount?: {
|
|
144
|
+
value?: string | undefined;
|
|
145
|
+
currency?: string | undefined;
|
|
146
|
+
} | undefined;
|
|
147
|
+
legacy_reference?: {
|
|
148
|
+
legacy_item_id?: string | undefined;
|
|
149
|
+
legacy_transaction_id?: string | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
}>, "many">>;
|
|
152
|
+
order_level_refund_amount: z.ZodOptional<z.ZodObject<{
|
|
153
|
+
value: z.ZodOptional<z.ZodString>;
|
|
154
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
value?: string | undefined;
|
|
157
|
+
currency?: string | undefined;
|
|
158
|
+
}, {
|
|
159
|
+
value?: string | undefined;
|
|
160
|
+
currency?: string | undefined;
|
|
161
|
+
}>>;
|
|
162
|
+
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
order_id: string;
|
|
164
|
+
comment?: string | undefined;
|
|
165
|
+
reason_for_refund?: string | undefined;
|
|
166
|
+
refund_items?: {
|
|
167
|
+
line_item_id?: string | undefined;
|
|
168
|
+
refund_amount?: {
|
|
169
|
+
value?: string | undefined;
|
|
170
|
+
currency?: string | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
legacy_reference?: {
|
|
173
|
+
legacy_item_id?: string | undefined;
|
|
174
|
+
legacy_transaction_id?: string | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}[] | undefined;
|
|
177
|
+
order_level_refund_amount?: {
|
|
178
|
+
value?: string | undefined;
|
|
179
|
+
currency?: string | undefined;
|
|
180
|
+
} | undefined;
|
|
181
|
+
}, {
|
|
182
|
+
order_id: string;
|
|
183
|
+
comment?: string | undefined;
|
|
184
|
+
reason_for_refund?: string | undefined;
|
|
185
|
+
refund_items?: {
|
|
186
|
+
line_item_id?: string | undefined;
|
|
187
|
+
refund_amount?: {
|
|
188
|
+
value?: string | undefined;
|
|
189
|
+
currency?: string | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
legacy_reference?: {
|
|
192
|
+
legacy_item_id?: string | undefined;
|
|
193
|
+
legacy_transaction_id?: string | undefined;
|
|
194
|
+
} | undefined;
|
|
195
|
+
}[] | undefined;
|
|
196
|
+
order_level_refund_amount?: {
|
|
197
|
+
value?: string | undefined;
|
|
198
|
+
currency?: string | undefined;
|
|
199
|
+
} | undefined;
|
|
200
|
+
}>;
|