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,205 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schemas for Fulfillment API input validation
|
|
4
|
+
* Based on: src/api/order-management/fulfillment.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 order ID
|
|
9
|
+
const orderIdSchema = z.string({
|
|
10
|
+
message: 'Order ID is required',
|
|
11
|
+
required_error: 'order_id is required',
|
|
12
|
+
invalid_type_error: 'order_id must be a string',
|
|
13
|
+
description: 'The unique identifier of the order',
|
|
14
|
+
});
|
|
15
|
+
// Reusable schema for fulfillment ID
|
|
16
|
+
const fulfillmentIdSchema = z.string({
|
|
17
|
+
message: 'Fulfillment ID is required',
|
|
18
|
+
required_error: 'fulfillment_id is required',
|
|
19
|
+
invalid_type_error: 'fulfillment_id must be a string',
|
|
20
|
+
description: 'The unique identifier of the shipping fulfillment',
|
|
21
|
+
});
|
|
22
|
+
// Reusable schema for filter parameter
|
|
23
|
+
const filterSchema = z
|
|
24
|
+
.string({
|
|
25
|
+
invalid_type_error: 'filter must be a string',
|
|
26
|
+
description: 'Filter criteria for orders (e.g., orderfulfillmentstatus:{NOT_STARTED|IN_PROGRESS}, creationdate:[2020-01-01T00:00:00.000Z..2020-12-31T23:59:59.999Z])',
|
|
27
|
+
})
|
|
28
|
+
.optional();
|
|
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 orders to return (default: 50)',
|
|
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 orders to skip (zero-based index)',
|
|
41
|
+
})
|
|
42
|
+
.optional();
|
|
43
|
+
/**
|
|
44
|
+
* Schema for getOrders method
|
|
45
|
+
* Endpoint: GET /order
|
|
46
|
+
* Query: filter, limit, offset
|
|
47
|
+
*/
|
|
48
|
+
export const getOrdersSchema = z.object({
|
|
49
|
+
filter: filterSchema,
|
|
50
|
+
limit: limitSchema,
|
|
51
|
+
offset: offsetSchema,
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Schema for getOrder method
|
|
55
|
+
* Endpoint: GET /order/{orderId}
|
|
56
|
+
* Path: orderId (required)
|
|
57
|
+
*/
|
|
58
|
+
export const getOrderSchema = z.object({
|
|
59
|
+
order_id: orderIdSchema,
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Schema for createShippingFulfillment method
|
|
63
|
+
* Endpoint: POST /order/{orderId}/shipping_fulfillment
|
|
64
|
+
* Path: orderId (required)
|
|
65
|
+
* Body: ShippingFulfillmentDetails - lineItems, shippedDate, shippingCarrierCode, trackingNumber
|
|
66
|
+
*/
|
|
67
|
+
export const createShippingFulfillmentSchema = z.object({
|
|
68
|
+
order_id: orderIdSchema,
|
|
69
|
+
line_items: z
|
|
70
|
+
.array(z.object({
|
|
71
|
+
line_item_id: z
|
|
72
|
+
.string({
|
|
73
|
+
invalid_type_error: 'line_item_id must be a string',
|
|
74
|
+
description: 'Unique identifier of the line item',
|
|
75
|
+
})
|
|
76
|
+
.optional(),
|
|
77
|
+
quantity: z
|
|
78
|
+
.number({
|
|
79
|
+
invalid_type_error: 'quantity must be a number',
|
|
80
|
+
description: 'Number of units being fulfilled',
|
|
81
|
+
})
|
|
82
|
+
.optional(),
|
|
83
|
+
}), {
|
|
84
|
+
invalid_type_error: 'line_items must be an array',
|
|
85
|
+
description: 'Array of line items to fulfill (required)',
|
|
86
|
+
})
|
|
87
|
+
.optional(),
|
|
88
|
+
shipped_date: z
|
|
89
|
+
.string({
|
|
90
|
+
invalid_type_error: 'shipped_date must be a string',
|
|
91
|
+
description: 'Date/time the order was shipped (ISO 8601 format, defaults to current time)',
|
|
92
|
+
})
|
|
93
|
+
.optional(),
|
|
94
|
+
shipping_carrier_code: z
|
|
95
|
+
.string({
|
|
96
|
+
invalid_type_error: 'shipping_carrier_code must be a string',
|
|
97
|
+
description: 'Shipping carrier code (e.g., USPS, UPS, FEDEX)',
|
|
98
|
+
})
|
|
99
|
+
.optional(),
|
|
100
|
+
tracking_number: z
|
|
101
|
+
.string({
|
|
102
|
+
invalid_type_error: 'tracking_number must be a string',
|
|
103
|
+
description: 'Shipment tracking number',
|
|
104
|
+
})
|
|
105
|
+
.optional(),
|
|
106
|
+
});
|
|
107
|
+
/**
|
|
108
|
+
* Schema for getShippingFulfillments method
|
|
109
|
+
* Endpoint: GET /order/{orderId}/shipping_fulfillment
|
|
110
|
+
* Path: orderId (required)
|
|
111
|
+
*/
|
|
112
|
+
export const getShippingFulfillmentsSchema = z.object({
|
|
113
|
+
order_id: orderIdSchema,
|
|
114
|
+
});
|
|
115
|
+
/**
|
|
116
|
+
* Schema for getShippingFulfillment method
|
|
117
|
+
* Endpoint: GET /order/{orderId}/shipping_fulfillment/{fulfillmentId}
|
|
118
|
+
* Path: orderId (required), fulfillmentId (required)
|
|
119
|
+
*/
|
|
120
|
+
export const getShippingFulfillmentSchema = z.object({
|
|
121
|
+
order_id: orderIdSchema,
|
|
122
|
+
fulfillment_id: fulfillmentIdSchema,
|
|
123
|
+
});
|
|
124
|
+
/**
|
|
125
|
+
* Schema for issueRefund method
|
|
126
|
+
* Endpoint: POST /order/{orderId}/issue_refund
|
|
127
|
+
* Path: orderId (required)
|
|
128
|
+
* Body: IssueRefundRequest - reasonForRefund, comment, refundItems, orderLevelRefundAmount
|
|
129
|
+
*/
|
|
130
|
+
export const issueRefundSchema = z.object({
|
|
131
|
+
order_id: orderIdSchema,
|
|
132
|
+
reason_for_refund: z
|
|
133
|
+
.string({
|
|
134
|
+
invalid_type_error: 'reason_for_refund must be a string',
|
|
135
|
+
description: 'Reason for issuing the refund (e.g., BUYER_CANCEL, OUT_OF_STOCK)',
|
|
136
|
+
})
|
|
137
|
+
.optional(),
|
|
138
|
+
comment: z
|
|
139
|
+
.string({
|
|
140
|
+
invalid_type_error: 'comment must be a string',
|
|
141
|
+
description: 'Optional comment about the refund',
|
|
142
|
+
})
|
|
143
|
+
.optional(),
|
|
144
|
+
refund_items: z
|
|
145
|
+
.array(z.object({
|
|
146
|
+
line_item_id: z
|
|
147
|
+
.string({
|
|
148
|
+
invalid_type_error: 'line_item_id must be a string',
|
|
149
|
+
description: 'Unique identifier of the line item to refund',
|
|
150
|
+
})
|
|
151
|
+
.optional(),
|
|
152
|
+
refund_amount: z
|
|
153
|
+
.object({
|
|
154
|
+
value: z
|
|
155
|
+
.string({
|
|
156
|
+
invalid_type_error: 'value must be a string',
|
|
157
|
+
description: 'Monetary amount',
|
|
158
|
+
})
|
|
159
|
+
.optional(),
|
|
160
|
+
currency: z
|
|
161
|
+
.string({
|
|
162
|
+
invalid_type_error: 'currency must be a string',
|
|
163
|
+
description: 'Three-letter ISO 4217 currency code',
|
|
164
|
+
})
|
|
165
|
+
.optional(),
|
|
166
|
+
})
|
|
167
|
+
.optional(),
|
|
168
|
+
legacy_reference: z
|
|
169
|
+
.object({
|
|
170
|
+
legacy_item_id: z
|
|
171
|
+
.string({
|
|
172
|
+
invalid_type_error: 'legacy_item_id must be a string',
|
|
173
|
+
description: 'Legacy eBay item ID',
|
|
174
|
+
})
|
|
175
|
+
.optional(),
|
|
176
|
+
legacy_transaction_id: z
|
|
177
|
+
.string({
|
|
178
|
+
invalid_type_error: 'legacy_transaction_id must be a string',
|
|
179
|
+
description: 'Legacy transaction ID',
|
|
180
|
+
})
|
|
181
|
+
.optional(),
|
|
182
|
+
})
|
|
183
|
+
.optional(),
|
|
184
|
+
}), {
|
|
185
|
+
invalid_type_error: 'refund_items must be an array',
|
|
186
|
+
description: 'Array of line items to refund',
|
|
187
|
+
})
|
|
188
|
+
.optional(),
|
|
189
|
+
order_level_refund_amount: z
|
|
190
|
+
.object({
|
|
191
|
+
value: z
|
|
192
|
+
.string({
|
|
193
|
+
invalid_type_error: 'value must be a string',
|
|
194
|
+
description: 'Monetary amount',
|
|
195
|
+
})
|
|
196
|
+
.optional(),
|
|
197
|
+
currency: z
|
|
198
|
+
.string({
|
|
199
|
+
invalid_type_error: 'currency must be a string',
|
|
200
|
+
description: 'Three-letter ISO 4217 currency code',
|
|
201
|
+
})
|
|
202
|
+
.optional(),
|
|
203
|
+
})
|
|
204
|
+
.optional(),
|
|
205
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for getListingViolations method
|
|
4
|
+
* Endpoint: GET /listing_violation
|
|
5
|
+
* Query: GetListingViolationsParams - compliance_type (required), offset, limit, listing_id, filter
|
|
6
|
+
*/
|
|
7
|
+
export declare const getListingViolationsSchema: z.ZodObject<{
|
|
8
|
+
compliance_type: z.ZodString;
|
|
9
|
+
offset: z.ZodOptional<z.ZodString>;
|
|
10
|
+
limit: z.ZodOptional<z.ZodString>;
|
|
11
|
+
listing_id: z.ZodOptional<z.ZodString>;
|
|
12
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
compliance_type: string;
|
|
15
|
+
filter?: string | undefined;
|
|
16
|
+
limit?: string | undefined;
|
|
17
|
+
offset?: string | undefined;
|
|
18
|
+
listing_id?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
compliance_type: string;
|
|
21
|
+
filter?: string | undefined;
|
|
22
|
+
limit?: string | undefined;
|
|
23
|
+
offset?: string | undefined;
|
|
24
|
+
listing_id?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Schema for getListingViolationsSummary method
|
|
28
|
+
* Endpoint: GET /listing_violation_summary
|
|
29
|
+
* Query: GetListingViolationsSummaryParams - compliance_type
|
|
30
|
+
*/
|
|
31
|
+
export declare const getListingViolationsSummarySchema: z.ZodObject<{
|
|
32
|
+
compliance_type: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
compliance_type?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
compliance_type?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Schema for suppressViolation method
|
|
40
|
+
* Endpoint: POST /suppress_violation
|
|
41
|
+
* Body: listing_violation_id (required)
|
|
42
|
+
*/
|
|
43
|
+
export declare const suppressViolationSchema: z.ZodObject<{
|
|
44
|
+
listing_violation_id: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
listing_violation_id: string;
|
|
47
|
+
}, {
|
|
48
|
+
listing_violation_id: string;
|
|
49
|
+
}>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Zod schemas for Compliance API input validation
|
|
4
|
+
* Based on: src/api/other/compliance.ts
|
|
5
|
+
* OpenAPI spec: docs/sell-apps/other-apis/sell_compliance_v1_oas3.json
|
|
6
|
+
* Types from: src/types/sell_compliance_v1_oas3.ts
|
|
7
|
+
*/
|
|
8
|
+
// Reusable schema for compliance_type parameter
|
|
9
|
+
const complianceTypeSchema = z
|
|
10
|
+
.string({
|
|
11
|
+
invalid_type_error: 'compliance_type must be a string',
|
|
12
|
+
description: 'Compliance type(s) to filter violations (e.g., ASPECTS_ADOPTION, HTTPS, OUTSIDE_EBAY_BUYING_AND_SELLING, RETURNS_POLICY)',
|
|
13
|
+
})
|
|
14
|
+
.optional();
|
|
15
|
+
// Reusable schema for offset parameter (string in API)
|
|
16
|
+
const offsetSchema = z
|
|
17
|
+
.string({
|
|
18
|
+
invalid_type_error: 'offset must be a string',
|
|
19
|
+
description: 'Number of items to skip (zero-based index)',
|
|
20
|
+
})
|
|
21
|
+
.optional();
|
|
22
|
+
// Reusable schema for limit parameter (string in API)
|
|
23
|
+
const limitSchema = z
|
|
24
|
+
.string({
|
|
25
|
+
invalid_type_error: 'limit must be a string',
|
|
26
|
+
description: 'Maximum number of items to return (default: 100, max: 200)',
|
|
27
|
+
})
|
|
28
|
+
.optional();
|
|
29
|
+
/**
|
|
30
|
+
* Schema for getListingViolations method
|
|
31
|
+
* Endpoint: GET /listing_violation
|
|
32
|
+
* Query: GetListingViolationsParams - compliance_type (required), offset, limit, listing_id, filter
|
|
33
|
+
*/
|
|
34
|
+
export const getListingViolationsSchema = z.object({
|
|
35
|
+
compliance_type: z.string({
|
|
36
|
+
message: 'Compliance type is required',
|
|
37
|
+
required_error: 'compliance_type is required',
|
|
38
|
+
invalid_type_error: 'compliance_type must be a string',
|
|
39
|
+
description: 'The compliance type of violations to retrieve (only one type allowed per call)',
|
|
40
|
+
}),
|
|
41
|
+
offset: offsetSchema,
|
|
42
|
+
limit: limitSchema,
|
|
43
|
+
listing_id: z
|
|
44
|
+
.string({
|
|
45
|
+
invalid_type_error: 'listing_id must be a string',
|
|
46
|
+
description: 'Filter by specific eBay listing ID (not yet supported)',
|
|
47
|
+
})
|
|
48
|
+
.optional(),
|
|
49
|
+
filter: z
|
|
50
|
+
.string({
|
|
51
|
+
invalid_type_error: 'filter must be a string',
|
|
52
|
+
description: 'Filter by compliance state (e.g., complianceState:{OUT_OF_COMPLIANCE})',
|
|
53
|
+
})
|
|
54
|
+
.optional(),
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* Schema for getListingViolationsSummary method
|
|
58
|
+
* Endpoint: GET /listing_violation_summary
|
|
59
|
+
* Query: GetListingViolationsSummaryParams - compliance_type
|
|
60
|
+
*/
|
|
61
|
+
export const getListingViolationsSummarySchema = z.object({
|
|
62
|
+
compliance_type: complianceTypeSchema,
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* Schema for suppressViolation method
|
|
66
|
+
* Endpoint: POST /suppress_violation
|
|
67
|
+
* Body: listing_violation_id (required)
|
|
68
|
+
*/
|
|
69
|
+
export const suppressViolationSchema = z.object({
|
|
70
|
+
listing_violation_id: z.string({
|
|
71
|
+
message: 'Listing violation ID is required',
|
|
72
|
+
required_error: 'listing_violation_id is required',
|
|
73
|
+
invalid_type_error: 'listing_violation_id must be a string',
|
|
74
|
+
description: 'The unique identifier of the listing violation to suppress',
|
|
75
|
+
}),
|
|
76
|
+
});
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for createShippingQuote method
|
|
4
|
+
* Endpoint: POST /shipping_quote
|
|
5
|
+
* Body: ShippingQuoteRequest - complex object with shipping details
|
|
6
|
+
*/
|
|
7
|
+
export declare const createShippingQuoteSchema: z.ZodObject<{
|
|
8
|
+
shipping_quote_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
shipping_quote_request: Record<string, unknown>;
|
|
11
|
+
}, {
|
|
12
|
+
shipping_quote_request: Record<string, unknown>;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Schema for getShippingQuote method
|
|
16
|
+
* Endpoint: GET /shipping_quote/{shipping_quote_id}
|
|
17
|
+
* Path: shipping_quote_id (required)
|
|
18
|
+
*/
|
|
19
|
+
export declare const getShippingQuoteSchema: z.ZodObject<{
|
|
20
|
+
shipping_quote_id: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
shipping_quote_id: string;
|
|
23
|
+
}, {
|
|
24
|
+
shipping_quote_id: string;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Schema for getActualCosts method
|
|
28
|
+
* Endpoint: GET /actual_costs
|
|
29
|
+
*/
|
|
30
|
+
export declare const getActualCostsSchema: z.ZodObject<{
|
|
31
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
params?: Record<string, string> | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
params?: Record<string, string> | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Schema for getAddressPreferences method
|
|
39
|
+
* Endpoint: GET /address_preference
|
|
40
|
+
*/
|
|
41
|
+
export declare const getAddressPreferencesSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
42
|
+
/**
|
|
43
|
+
* Schema for createAddressPreference method
|
|
44
|
+
* Endpoint: POST /address_preference
|
|
45
|
+
*/
|
|
46
|
+
export declare const createAddressPreferenceSchema: z.ZodObject<{
|
|
47
|
+
address_preference: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
address_preference: Record<string, unknown>;
|
|
50
|
+
}, {
|
|
51
|
+
address_preference: Record<string, unknown>;
|
|
52
|
+
}>;
|
|
53
|
+
/**
|
|
54
|
+
* Schema for getConsignPreferences method
|
|
55
|
+
* Endpoint: GET /consign_preference
|
|
56
|
+
*/
|
|
57
|
+
export declare const getConsignPreferencesSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
58
|
+
/**
|
|
59
|
+
* Schema for createConsignPreference method
|
|
60
|
+
* Endpoint: POST /consign_preference
|
|
61
|
+
*/
|
|
62
|
+
export declare const createConsignPreferenceSchema: z.ZodObject<{
|
|
63
|
+
consign_preference: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
consign_preference: Record<string, unknown>;
|
|
66
|
+
}, {
|
|
67
|
+
consign_preference: Record<string, unknown>;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Schema for getAgents method
|
|
71
|
+
* Endpoint: GET /agents
|
|
72
|
+
*/
|
|
73
|
+
export declare const getAgentsSchema: z.ZodObject<{
|
|
74
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
params?: Record<string, string> | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
params?: Record<string, string> | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Schema for getBatteryQualifications method
|
|
82
|
+
* Endpoint: GET /battery_qualifications
|
|
83
|
+
*/
|
|
84
|
+
export declare const getBatteryQualificationsSchema: z.ZodObject<{
|
|
85
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
params?: Record<string, string> | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
params?: Record<string, string> | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Schema for getDropoffSites method
|
|
93
|
+
* Endpoint: GET /dropoff_sites
|
|
94
|
+
*/
|
|
95
|
+
export declare const getDropoffSitesSchema: z.ZodObject<{
|
|
96
|
+
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
params: Record<string, string>;
|
|
99
|
+
}, {
|
|
100
|
+
params: Record<string, string>;
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* Schema for getShippingServices method
|
|
104
|
+
* Endpoint: GET /services
|
|
105
|
+
*/
|
|
106
|
+
export declare const getShippingServicesSchema: z.ZodObject<{
|
|
107
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
params?: Record<string, string> | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
params?: Record<string, string> | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Schema for createBundle method
|
|
115
|
+
* Endpoint: POST /bundle
|
|
116
|
+
*/
|
|
117
|
+
export declare const createBundleSchema: z.ZodObject<{
|
|
118
|
+
bundle_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
bundle_request: Record<string, unknown>;
|
|
121
|
+
}, {
|
|
122
|
+
bundle_request: Record<string, unknown>;
|
|
123
|
+
}>;
|
|
124
|
+
/**
|
|
125
|
+
* Schema for getBundle method
|
|
126
|
+
* Endpoint: GET /bundle/{bundle_id}
|
|
127
|
+
*/
|
|
128
|
+
export declare const getBundleSchema: z.ZodObject<{
|
|
129
|
+
bundle_id: z.ZodString;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
bundle_id: string;
|
|
132
|
+
}, {
|
|
133
|
+
bundle_id: string;
|
|
134
|
+
}>;
|
|
135
|
+
/**
|
|
136
|
+
* Schema for cancelBundle method
|
|
137
|
+
* Endpoint: POST /bundle/{bundle_id}/cancel
|
|
138
|
+
*/
|
|
139
|
+
export declare const cancelBundleSchema: z.ZodObject<{
|
|
140
|
+
bundle_id: z.ZodString;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
bundle_id: string;
|
|
143
|
+
}, {
|
|
144
|
+
bundle_id: string;
|
|
145
|
+
}>;
|
|
146
|
+
/**
|
|
147
|
+
* Schema for getBundleLabel method
|
|
148
|
+
* Endpoint: GET /bundle/{bundle_id}/label
|
|
149
|
+
*/
|
|
150
|
+
export declare const getBundleLabelSchema: z.ZodObject<{
|
|
151
|
+
bundle_id: z.ZodString;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
bundle_id: string;
|
|
154
|
+
}, {
|
|
155
|
+
bundle_id: string;
|
|
156
|
+
}>;
|
|
157
|
+
/**
|
|
158
|
+
* Schema for createPackage method
|
|
159
|
+
* Endpoint: POST /package
|
|
160
|
+
*/
|
|
161
|
+
export declare const createPackageSchema: z.ZodObject<{
|
|
162
|
+
package_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
package_request: Record<string, unknown>;
|
|
165
|
+
}, {
|
|
166
|
+
package_request: Record<string, unknown>;
|
|
167
|
+
}>;
|
|
168
|
+
/**
|
|
169
|
+
* Schema for getPackage method
|
|
170
|
+
* Endpoint: GET /package/{package_id}
|
|
171
|
+
*/
|
|
172
|
+
export declare const getPackageSchema: z.ZodObject<{
|
|
173
|
+
package_id: z.ZodString;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
package_id: string;
|
|
176
|
+
}, {
|
|
177
|
+
package_id: string;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* Schema for deletePackage method
|
|
181
|
+
* Endpoint: DELETE /package/{package_id}
|
|
182
|
+
*/
|
|
183
|
+
export declare const deletePackageSchema: z.ZodObject<{
|
|
184
|
+
package_id: z.ZodString;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
package_id: string;
|
|
187
|
+
}, {
|
|
188
|
+
package_id: string;
|
|
189
|
+
}>;
|
|
190
|
+
/**
|
|
191
|
+
* Schema for getPackageByOrderLineItem method
|
|
192
|
+
* Endpoint: GET /package/{order_line_item_id}/item
|
|
193
|
+
*/
|
|
194
|
+
export declare const getPackageByOrderLineItemSchema: z.ZodObject<{
|
|
195
|
+
order_line_item_id: z.ZodString;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
order_line_item_id: string;
|
|
198
|
+
}, {
|
|
199
|
+
order_line_item_id: string;
|
|
200
|
+
}>;
|
|
201
|
+
/**
|
|
202
|
+
* Schema for cancelPackage method
|
|
203
|
+
* Endpoint: POST /package/{package_id}/cancel
|
|
204
|
+
*/
|
|
205
|
+
export declare const cancelPackageSchema: z.ZodObject<{
|
|
206
|
+
package_id: z.ZodString;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
package_id: string;
|
|
209
|
+
}, {
|
|
210
|
+
package_id: string;
|
|
211
|
+
}>;
|
|
212
|
+
/**
|
|
213
|
+
* Schema for clonePackage method
|
|
214
|
+
* Endpoint: POST /package/{package_id}/clone
|
|
215
|
+
*/
|
|
216
|
+
export declare const clonePackageSchema: z.ZodObject<{
|
|
217
|
+
package_id: z.ZodString;
|
|
218
|
+
}, "strip", z.ZodTypeAny, {
|
|
219
|
+
package_id: string;
|
|
220
|
+
}, {
|
|
221
|
+
package_id: string;
|
|
222
|
+
}>;
|
|
223
|
+
/**
|
|
224
|
+
* Schema for confirmPackage method
|
|
225
|
+
* Endpoint: POST /package/{package_id}/confirm
|
|
226
|
+
*/
|
|
227
|
+
export declare const confirmPackageSchema: z.ZodObject<{
|
|
228
|
+
package_id: z.ZodString;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
package_id: string;
|
|
231
|
+
}, {
|
|
232
|
+
package_id: string;
|
|
233
|
+
}>;
|
|
234
|
+
/**
|
|
235
|
+
* Schema for bulkCancelPackages method
|
|
236
|
+
* Endpoint: POST /package/bulk_cancel_packages
|
|
237
|
+
*/
|
|
238
|
+
export declare const bulkCancelPackagesSchema: z.ZodObject<{
|
|
239
|
+
bulk_cancel_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
bulk_cancel_request: Record<string, unknown>;
|
|
242
|
+
}, {
|
|
243
|
+
bulk_cancel_request: Record<string, unknown>;
|
|
244
|
+
}>;
|
|
245
|
+
/**
|
|
246
|
+
* Schema for bulkConfirmPackages method
|
|
247
|
+
* Endpoint: POST /package/bulk_confirm_packages
|
|
248
|
+
*/
|
|
249
|
+
export declare const bulkConfirmPackagesSchema: z.ZodObject<{
|
|
250
|
+
bulk_confirm_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
251
|
+
}, "strip", z.ZodTypeAny, {
|
|
252
|
+
bulk_confirm_request: Record<string, unknown>;
|
|
253
|
+
}, {
|
|
254
|
+
bulk_confirm_request: Record<string, unknown>;
|
|
255
|
+
}>;
|
|
256
|
+
/**
|
|
257
|
+
* Schema for bulkDeletePackages method
|
|
258
|
+
* Endpoint: POST /package/bulk_delete_packages
|
|
259
|
+
*/
|
|
260
|
+
export declare const bulkDeletePackagesSchema: z.ZodObject<{
|
|
261
|
+
bulk_delete_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
262
|
+
}, "strip", z.ZodTypeAny, {
|
|
263
|
+
bulk_delete_request: Record<string, unknown>;
|
|
264
|
+
}, {
|
|
265
|
+
bulk_delete_request: Record<string, unknown>;
|
|
266
|
+
}>;
|
|
267
|
+
/**
|
|
268
|
+
* Schema for getLabels method
|
|
269
|
+
* Endpoint: GET /labels
|
|
270
|
+
*/
|
|
271
|
+
export declare const getLabelsSchema: z.ZodObject<{
|
|
272
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
params?: Record<string, string> | undefined;
|
|
275
|
+
}, {
|
|
276
|
+
params?: Record<string, string> | undefined;
|
|
277
|
+
}>;
|
|
278
|
+
/**
|
|
279
|
+
* Schema for getHandoverSheet method
|
|
280
|
+
* Endpoint: GET /handover_sheet
|
|
281
|
+
*/
|
|
282
|
+
export declare const getHandoverSheetSchema: z.ZodObject<{
|
|
283
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
|
+
params?: Record<string, string> | undefined;
|
|
286
|
+
}, {
|
|
287
|
+
params?: Record<string, string> | undefined;
|
|
288
|
+
}>;
|
|
289
|
+
/**
|
|
290
|
+
* Schema for getTracking method
|
|
291
|
+
* Endpoint: GET /tracking
|
|
292
|
+
*/
|
|
293
|
+
export declare const getTrackingSchema: z.ZodObject<{
|
|
294
|
+
params: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
295
|
+
}, "strip", z.ZodTypeAny, {
|
|
296
|
+
params: Record<string, string>;
|
|
297
|
+
}, {
|
|
298
|
+
params: Record<string, string>;
|
|
299
|
+
}>;
|
|
300
|
+
/**
|
|
301
|
+
* Schema for createComplaint method
|
|
302
|
+
* Endpoint: POST /complaint
|
|
303
|
+
*/
|
|
304
|
+
export declare const createComplaintSchema: z.ZodObject<{
|
|
305
|
+
complaint_request: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
complaint_request: Record<string, unknown>;
|
|
308
|
+
}, {
|
|
309
|
+
complaint_request: Record<string, unknown>;
|
|
310
|
+
}>;
|