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,366 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
|
+
import { TimeDurationUnit, RegionType, ShippingCostType, ShippingOptionType, RefundMethod, ReturnMethod, ReturnShippingCostPayer, MarketplaceId, } from '../../types/ebay-enums.js';
|
|
4
|
+
/**
|
|
5
|
+
* Account Management API Schemas
|
|
6
|
+
*
|
|
7
|
+
* This file contains Zod schemas for all Account Management endpoints.
|
|
8
|
+
* Schemas are organized by endpoint and include both input and output validation.
|
|
9
|
+
*/
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// Common/Shared Response Schemas
|
|
12
|
+
// ============================================================================
|
|
13
|
+
const errorSchema = z.object({
|
|
14
|
+
errorId: z.number().optional(),
|
|
15
|
+
domain: z.string().optional(),
|
|
16
|
+
category: z.string().optional(),
|
|
17
|
+
message: z.string().optional(),
|
|
18
|
+
longMessage: z.string().optional(),
|
|
19
|
+
parameters: z.array(z.object({
|
|
20
|
+
name: z.string().optional(),
|
|
21
|
+
value: z.string().optional(),
|
|
22
|
+
})).optional(),
|
|
23
|
+
});
|
|
24
|
+
const timeDurationSchema = z.object({
|
|
25
|
+
unit: z.nativeEnum(TimeDurationUnit).optional(),
|
|
26
|
+
value: z.number().optional(),
|
|
27
|
+
});
|
|
28
|
+
const amountSchema = z.object({
|
|
29
|
+
currency: z.string().optional(),
|
|
30
|
+
value: z.string().optional(),
|
|
31
|
+
});
|
|
32
|
+
const regionSchema = z.object({
|
|
33
|
+
regionName: z.string().optional(),
|
|
34
|
+
regionType: z.nativeEnum(RegionType).optional(),
|
|
35
|
+
});
|
|
36
|
+
const regionSetSchema = z.object({
|
|
37
|
+
regionIncluded: z.array(regionSchema).optional(),
|
|
38
|
+
regionExcluded: z.array(regionSchema).optional(),
|
|
39
|
+
});
|
|
40
|
+
// ============================================================================
|
|
41
|
+
// Custom Policy Schemas
|
|
42
|
+
// ============================================================================
|
|
43
|
+
// Input
|
|
44
|
+
export const getCustomPoliciesInputSchema = z.object({
|
|
45
|
+
policyTypes: z.string().optional()
|
|
46
|
+
.describe('Comma-delimited list of policy types to retrieve (e.g., PRODUCT_COMPLIANCE, TAKE_BACK)'),
|
|
47
|
+
});
|
|
48
|
+
// Output
|
|
49
|
+
export const customPolicySchema = z.object({
|
|
50
|
+
customPolicyId: z.string().optional(),
|
|
51
|
+
label: z.string().optional(),
|
|
52
|
+
name: z.string().optional(),
|
|
53
|
+
description: z.string().optional(),
|
|
54
|
+
policyType: z.string().optional(),
|
|
55
|
+
});
|
|
56
|
+
export const customPolicyResponseSchema = z.object({
|
|
57
|
+
customPolicies: z.array(customPolicySchema).optional(),
|
|
58
|
+
href: z.string().optional(),
|
|
59
|
+
limit: z.number().optional(),
|
|
60
|
+
next: z.string().optional(),
|
|
61
|
+
offset: z.number().optional(),
|
|
62
|
+
prev: z.string().optional(),
|
|
63
|
+
total: z.number().optional(),
|
|
64
|
+
warnings: z.array(errorSchema).optional(),
|
|
65
|
+
});
|
|
66
|
+
export const createCustomPolicyInputSchema = z.object({
|
|
67
|
+
policy: z.object({
|
|
68
|
+
name: z.string(),
|
|
69
|
+
description: z.string().optional(),
|
|
70
|
+
policyType: z.string(),
|
|
71
|
+
label: z.string().optional(),
|
|
72
|
+
}),
|
|
73
|
+
});
|
|
74
|
+
export const createCustomPolicyOutputSchema = customPolicySchema;
|
|
75
|
+
// ============================================================================
|
|
76
|
+
// Fulfillment Policy Schemas
|
|
77
|
+
// ============================================================================
|
|
78
|
+
const categoryTypeSchema = z.object({
|
|
79
|
+
name: z.string().optional(),
|
|
80
|
+
default: z.boolean().optional(),
|
|
81
|
+
});
|
|
82
|
+
const shippingServiceSchema = z.object({
|
|
83
|
+
additionalShippingCost: amountSchema.optional(),
|
|
84
|
+
buyerResponsibleForPickup: z.boolean().optional(),
|
|
85
|
+
buyerResponsibleForShipping: z.boolean().optional(),
|
|
86
|
+
freeShipping: z.boolean().optional(),
|
|
87
|
+
shippingCarrierCode: z.string().optional(),
|
|
88
|
+
shippingCost: amountSchema.optional(),
|
|
89
|
+
shippingServiceCode: z.string().optional(),
|
|
90
|
+
shipToLocations: regionSetSchema.optional(),
|
|
91
|
+
sortOrder: z.number().optional(),
|
|
92
|
+
surcharge: amountSchema.optional(), // DEPRECATED but still in API
|
|
93
|
+
});
|
|
94
|
+
const shippingOptionSchema = z.object({
|
|
95
|
+
costType: z.nativeEnum(ShippingCostType).optional(),
|
|
96
|
+
optionType: z.nativeEnum(ShippingOptionType).optional(),
|
|
97
|
+
insuranceFee: amountSchema.optional(), // DEPRECATED but in API
|
|
98
|
+
insuranceOffered: z.boolean().optional(), // DEPRECATED but in API
|
|
99
|
+
packageHandlingCost: amountSchema.optional(),
|
|
100
|
+
rateTableId: z.string().optional(),
|
|
101
|
+
shippingDiscountProfileId: z.string().optional(),
|
|
102
|
+
shippingPromotionOffered: z.boolean().optional(),
|
|
103
|
+
shippingServices: z.array(shippingServiceSchema).optional(),
|
|
104
|
+
});
|
|
105
|
+
export const fulfillmentPolicySchema = z.object({
|
|
106
|
+
name: z.string(),
|
|
107
|
+
marketplaceId: z.nativeEnum(MarketplaceId),
|
|
108
|
+
categoryTypes: z.array(categoryTypeSchema).optional(),
|
|
109
|
+
description: z.string().optional(),
|
|
110
|
+
freightShipping: z.boolean().optional(),
|
|
111
|
+
globalShipping: z.boolean().optional(),
|
|
112
|
+
handlingTime: timeDurationSchema.optional(),
|
|
113
|
+
localPickup: z.boolean().optional(),
|
|
114
|
+
pickupDropOff: z.boolean().optional(),
|
|
115
|
+
shippingOptions: z.array(shippingOptionSchema).optional(),
|
|
116
|
+
shipToLocations: regionSetSchema.optional(),
|
|
117
|
+
});
|
|
118
|
+
export const fulfillmentPolicyResponseSchema = z.object({
|
|
119
|
+
fulfillmentPolicyId: z.string().optional(),
|
|
120
|
+
categoryTypes: z.array(categoryTypeSchema).optional(),
|
|
121
|
+
description: z.string().optional(),
|
|
122
|
+
freightShipping: z.boolean().optional(),
|
|
123
|
+
globalShipping: z.boolean().optional(),
|
|
124
|
+
handlingTime: timeDurationSchema.optional(),
|
|
125
|
+
localPickup: z.boolean().optional(),
|
|
126
|
+
marketplaceId: z.string().optional(),
|
|
127
|
+
name: z.string().optional(),
|
|
128
|
+
pickupDropOff: z.boolean().optional(),
|
|
129
|
+
shippingOptions: z.array(shippingOptionSchema).optional(),
|
|
130
|
+
shipToLocations: regionSetSchema.optional(),
|
|
131
|
+
warnings: z.array(errorSchema).optional(),
|
|
132
|
+
});
|
|
133
|
+
export const getFulfillmentPoliciesInputSchema = z.object({
|
|
134
|
+
marketplaceId: z.nativeEnum(MarketplaceId)
|
|
135
|
+
.describe('eBay marketplace ID (e.g., EBAY_US)'),
|
|
136
|
+
});
|
|
137
|
+
export const getFulfillmentPoliciesOutputSchema = z.object({
|
|
138
|
+
fulfillmentPolicies: z.array(fulfillmentPolicyResponseSchema).optional(),
|
|
139
|
+
href: z.string().optional(),
|
|
140
|
+
limit: z.number().optional(),
|
|
141
|
+
next: z.string().optional(),
|
|
142
|
+
offset: z.number().optional(),
|
|
143
|
+
prev: z.string().optional(),
|
|
144
|
+
total: z.number().optional(),
|
|
145
|
+
warnings: z.array(errorSchema).optional(),
|
|
146
|
+
});
|
|
147
|
+
export const createFulfillmentPolicyInputSchema = z.object({
|
|
148
|
+
policy: fulfillmentPolicySchema,
|
|
149
|
+
});
|
|
150
|
+
export const createFulfillmentPolicyOutputSchema = z.object({
|
|
151
|
+
fulfillmentPolicyId: z.string().optional(),
|
|
152
|
+
warnings: z.array(errorSchema).optional(),
|
|
153
|
+
});
|
|
154
|
+
// ============================================================================
|
|
155
|
+
// Payment Policy Schemas
|
|
156
|
+
// ============================================================================
|
|
157
|
+
const paymentMethodSchema = z.object({
|
|
158
|
+
paymentMethodType: z.string().optional(),
|
|
159
|
+
brands: z.array(z.string()).optional(), // DEPRECATED
|
|
160
|
+
recipientAccountReference: z.object({
|
|
161
|
+
referenceId: z.string().optional(),
|
|
162
|
+
referenceType: z.string().optional(),
|
|
163
|
+
}).optional(), // DEPRECATED
|
|
164
|
+
});
|
|
165
|
+
const depositSchema = z.object({
|
|
166
|
+
amount: amountSchema.optional(), // Fixed from depositAmount
|
|
167
|
+
dueIn: timeDurationSchema.optional(),
|
|
168
|
+
paymentMethods: z.array(paymentMethodSchema).optional(), // DEPRECATED but in API
|
|
169
|
+
});
|
|
170
|
+
export const paymentPolicySchema = z.object({
|
|
171
|
+
name: z.string(),
|
|
172
|
+
marketplaceId: z.nativeEnum(MarketplaceId),
|
|
173
|
+
categoryTypes: z.array(categoryTypeSchema).optional(),
|
|
174
|
+
description: z.string().optional(),
|
|
175
|
+
deposit: depositSchema.optional(),
|
|
176
|
+
fullPaymentDueIn: timeDurationSchema.optional(),
|
|
177
|
+
immediatePay: z.boolean().optional(),
|
|
178
|
+
paymentInstructions: z.string().optional(),
|
|
179
|
+
paymentMethods: z.array(paymentMethodSchema).optional(),
|
|
180
|
+
});
|
|
181
|
+
export const paymentPolicyResponseSchema = z.object({
|
|
182
|
+
paymentPolicyId: z.string().optional(),
|
|
183
|
+
categoryTypes: z.array(categoryTypeSchema).optional(),
|
|
184
|
+
deposit: depositSchema.optional(),
|
|
185
|
+
description: z.string().optional(),
|
|
186
|
+
fullPaymentDueIn: timeDurationSchema.optional(),
|
|
187
|
+
immediatePay: z.boolean().optional(),
|
|
188
|
+
marketplaceId: z.string().optional(),
|
|
189
|
+
name: z.string().optional(),
|
|
190
|
+
paymentInstructions: z.string().optional(),
|
|
191
|
+
paymentMethods: z.array(paymentMethodSchema).optional(),
|
|
192
|
+
warnings: z.array(errorSchema).optional(),
|
|
193
|
+
});
|
|
194
|
+
export const getPaymentPoliciesInputSchema = z.object({
|
|
195
|
+
marketplaceId: z.nativeEnum(MarketplaceId)
|
|
196
|
+
.describe('eBay marketplace ID'),
|
|
197
|
+
});
|
|
198
|
+
export const getPaymentPoliciesOutputSchema = z.object({
|
|
199
|
+
paymentPolicies: z.array(paymentPolicyResponseSchema).optional(),
|
|
200
|
+
href: z.string().optional(),
|
|
201
|
+
limit: z.number().optional(),
|
|
202
|
+
next: z.string().optional(),
|
|
203
|
+
offset: z.number().optional(),
|
|
204
|
+
prev: z.string().optional(),
|
|
205
|
+
total: z.number().optional(),
|
|
206
|
+
warnings: z.array(errorSchema).optional(),
|
|
207
|
+
});
|
|
208
|
+
export const createPaymentPolicyInputSchema = z.object({
|
|
209
|
+
policy: paymentPolicySchema,
|
|
210
|
+
});
|
|
211
|
+
export const createPaymentPolicyOutputSchema = z.object({
|
|
212
|
+
paymentPolicyId: z.string().optional(),
|
|
213
|
+
warnings: z.array(errorSchema).optional(),
|
|
214
|
+
});
|
|
215
|
+
// ============================================================================
|
|
216
|
+
// Return Policy Schemas
|
|
217
|
+
// ============================================================================
|
|
218
|
+
export const returnPolicySchema = z.object({
|
|
219
|
+
name: z.string(),
|
|
220
|
+
marketplaceId: z.nativeEnum(MarketplaceId),
|
|
221
|
+
categoryTypes: z.array(categoryTypeSchema).optional(),
|
|
222
|
+
description: z.string().optional(),
|
|
223
|
+
extendedHolidayReturnsOffered: z.boolean().optional(),
|
|
224
|
+
refundMethod: z.nativeEnum(RefundMethod).optional(),
|
|
225
|
+
restockingFeePercentage: z.string().optional(),
|
|
226
|
+
returnInstructions: z.string().optional(),
|
|
227
|
+
returnMethod: z.nativeEnum(ReturnMethod).optional(),
|
|
228
|
+
returnPeriod: timeDurationSchema.optional(),
|
|
229
|
+
returnsAccepted: z.boolean().optional(),
|
|
230
|
+
returnShippingCostPayer: z.nativeEnum(ReturnShippingCostPayer).optional(),
|
|
231
|
+
});
|
|
232
|
+
export const returnPolicyResponseSchema = z.object({
|
|
233
|
+
returnPolicyId: z.string().optional(),
|
|
234
|
+
categoryTypes: z.array(categoryTypeSchema).optional(),
|
|
235
|
+
description: z.string().optional(),
|
|
236
|
+
extendedHolidayReturnsOffered: z.boolean().optional(),
|
|
237
|
+
internationalOverride: z.object({
|
|
238
|
+
returnMethod: z.string().optional(),
|
|
239
|
+
returnPeriod: timeDurationSchema.optional(),
|
|
240
|
+
returnsAccepted: z.boolean().optional(),
|
|
241
|
+
returnShippingCostPayer: z.string().optional(),
|
|
242
|
+
}).optional(),
|
|
243
|
+
marketplaceId: z.string().optional(),
|
|
244
|
+
name: z.string().optional(),
|
|
245
|
+
refundMethod: z.string().optional(),
|
|
246
|
+
restockingFeePercentage: z.string().optional(), // DEPRECATED
|
|
247
|
+
returnInstructions: z.string().optional(),
|
|
248
|
+
returnMethod: z.string().optional(),
|
|
249
|
+
returnPeriod: timeDurationSchema.optional(),
|
|
250
|
+
returnsAccepted: z.boolean().optional(),
|
|
251
|
+
returnShippingCostPayer: z.string().optional(),
|
|
252
|
+
warnings: z.array(errorSchema).optional(),
|
|
253
|
+
});
|
|
254
|
+
export const getReturnPoliciesInputSchema = z.object({
|
|
255
|
+
marketplaceId: z.nativeEnum(MarketplaceId)
|
|
256
|
+
.describe('eBay marketplace ID'),
|
|
257
|
+
});
|
|
258
|
+
export const getReturnPoliciesOutputSchema = z.object({
|
|
259
|
+
returnPolicies: z.array(returnPolicyResponseSchema).optional(),
|
|
260
|
+
href: z.string().optional(),
|
|
261
|
+
limit: z.number().optional(),
|
|
262
|
+
next: z.string().optional(),
|
|
263
|
+
offset: z.number().optional(),
|
|
264
|
+
prev: z.string().optional(),
|
|
265
|
+
total: z.number().optional(),
|
|
266
|
+
warnings: z.array(errorSchema).optional(),
|
|
267
|
+
});
|
|
268
|
+
export const createReturnPolicyInputSchema = z.object({
|
|
269
|
+
policy: returnPolicySchema,
|
|
270
|
+
});
|
|
271
|
+
export const createReturnPolicyOutputSchema = z.object({
|
|
272
|
+
returnPolicyId: z.string().optional(),
|
|
273
|
+
warnings: z.array(errorSchema).optional(),
|
|
274
|
+
});
|
|
275
|
+
// ============================================================================
|
|
276
|
+
// Sales Tax Schemas
|
|
277
|
+
// ============================================================================
|
|
278
|
+
export const salesTaxBaseSchema = z.object({
|
|
279
|
+
salesTaxPercentage: z.string(),
|
|
280
|
+
shippingAndHandlingTaxed: z.boolean().optional(),
|
|
281
|
+
});
|
|
282
|
+
export const salesTaxSchema = z.object({
|
|
283
|
+
countryCode: z.string().optional(),
|
|
284
|
+
jurisdictionId: z.string().optional(),
|
|
285
|
+
salesTaxPercentage: z.string().optional(),
|
|
286
|
+
shippingAndHandlingTaxed: z.boolean().optional(),
|
|
287
|
+
});
|
|
288
|
+
export const getSalesTaxesOutputSchema = z.object({
|
|
289
|
+
salesTaxes: z.array(salesTaxSchema).optional(),
|
|
290
|
+
warnings: z.array(errorSchema).optional(),
|
|
291
|
+
});
|
|
292
|
+
// ============================================================================
|
|
293
|
+
// Program Schemas
|
|
294
|
+
// ============================================================================
|
|
295
|
+
export const programRequestSchema = z.object({
|
|
296
|
+
programType: z.string(),
|
|
297
|
+
});
|
|
298
|
+
export const programsOutputSchema = z.object({
|
|
299
|
+
programs: z.array(z.object({
|
|
300
|
+
programType: z.string().optional(),
|
|
301
|
+
programStatus: z.string().optional(),
|
|
302
|
+
})).optional(),
|
|
303
|
+
warnings: z.array(errorSchema).optional(),
|
|
304
|
+
});
|
|
305
|
+
// ============================================================================
|
|
306
|
+
// KYC Schemas
|
|
307
|
+
// ============================================================================
|
|
308
|
+
export const kycOutputSchema = z.object({
|
|
309
|
+
kycCheck: z.string().optional(),
|
|
310
|
+
detailedStatus: z.string().optional(),
|
|
311
|
+
warnings: z.array(errorSchema).optional(),
|
|
312
|
+
});
|
|
313
|
+
// ============================================================================
|
|
314
|
+
// Privileges Schemas
|
|
315
|
+
// ============================================================================
|
|
316
|
+
export const privilegesOutputSchema = z.object({
|
|
317
|
+
sellingLimit: z.object({
|
|
318
|
+
amount: amountSchema.optional(),
|
|
319
|
+
quantity: z.number().optional(),
|
|
320
|
+
}).optional(),
|
|
321
|
+
qualifiesForSelling: z.boolean().optional(),
|
|
322
|
+
sellerRegistrationCompleted: z.boolean().optional(),
|
|
323
|
+
warnings: z.array(errorSchema).optional(),
|
|
324
|
+
});
|
|
325
|
+
// ============================================================================
|
|
326
|
+
// JSON Schema Conversion Functions
|
|
327
|
+
// ============================================================================
|
|
328
|
+
/**
|
|
329
|
+
* Convert Zod schemas to JSON Schema format for MCP tools
|
|
330
|
+
*/
|
|
331
|
+
export function getAccountManagementJsonSchemas() {
|
|
332
|
+
return {
|
|
333
|
+
// Custom Policies
|
|
334
|
+
getCustomPoliciesInput: zodToJsonSchema(getCustomPoliciesInputSchema, 'getCustomPoliciesInput'),
|
|
335
|
+
getCustomPoliciesOutput: zodToJsonSchema(customPolicyResponseSchema, 'getCustomPoliciesOutput'),
|
|
336
|
+
createCustomPolicyInput: zodToJsonSchema(createCustomPolicyInputSchema, 'createCustomPolicyInput'),
|
|
337
|
+
createCustomPolicyOutput: zodToJsonSchema(createCustomPolicyOutputSchema, 'createCustomPolicyOutput'),
|
|
338
|
+
// Fulfillment Policies
|
|
339
|
+
getFulfillmentPoliciesInput: zodToJsonSchema(getFulfillmentPoliciesInputSchema, 'getFulfillmentPoliciesInput'),
|
|
340
|
+
getFulfillmentPoliciesOutput: zodToJsonSchema(getFulfillmentPoliciesOutputSchema, 'getFulfillmentPoliciesOutput'),
|
|
341
|
+
createFulfillmentPolicyInput: zodToJsonSchema(createFulfillmentPolicyInputSchema, 'createFulfillmentPolicyInput'),
|
|
342
|
+
createFulfillmentPolicyOutput: zodToJsonSchema(createFulfillmentPolicyOutputSchema, 'createFulfillmentPolicyOutput'),
|
|
343
|
+
fulfillmentPolicyDetails: zodToJsonSchema(fulfillmentPolicyResponseSchema, 'fulfillmentPolicyDetails'),
|
|
344
|
+
// Payment Policies
|
|
345
|
+
getPaymentPoliciesInput: zodToJsonSchema(getPaymentPoliciesInputSchema, 'getPaymentPoliciesInput'),
|
|
346
|
+
getPaymentPoliciesOutput: zodToJsonSchema(getPaymentPoliciesOutputSchema, 'getPaymentPoliciesOutput'),
|
|
347
|
+
createPaymentPolicyInput: zodToJsonSchema(createPaymentPolicyInputSchema, 'createPaymentPolicyInput'),
|
|
348
|
+
createPaymentPolicyOutput: zodToJsonSchema(createPaymentPolicyOutputSchema, 'createPaymentPolicyOutput'),
|
|
349
|
+
paymentPolicyDetails: zodToJsonSchema(paymentPolicyResponseSchema, 'paymentPolicyDetails'),
|
|
350
|
+
// Return Policies
|
|
351
|
+
getReturnPoliciesInput: zodToJsonSchema(getReturnPoliciesInputSchema, 'getReturnPoliciesInput'),
|
|
352
|
+
getReturnPoliciesOutput: zodToJsonSchema(getReturnPoliciesOutputSchema, 'getReturnPoliciesOutput'),
|
|
353
|
+
createReturnPolicyInput: zodToJsonSchema(createReturnPolicyInputSchema, 'createReturnPolicyInput'),
|
|
354
|
+
createReturnPolicyOutput: zodToJsonSchema(createReturnPolicyOutputSchema, 'createReturnPolicyOutput'),
|
|
355
|
+
returnPolicyDetails: zodToJsonSchema(returnPolicyResponseSchema, 'returnPolicyDetails'),
|
|
356
|
+
// Sales Tax
|
|
357
|
+
getSalesTaxesOutput: zodToJsonSchema(getSalesTaxesOutputSchema, 'getSalesTaxesOutput'),
|
|
358
|
+
salesTaxDetails: zodToJsonSchema(salesTaxSchema, 'salesTaxDetails'),
|
|
359
|
+
// Programs
|
|
360
|
+
programRequest: zodToJsonSchema(programRequestSchema, 'programRequest'),
|
|
361
|
+
programsOutput: zodToJsonSchema(programsOutputSchema, 'programsOutput'),
|
|
362
|
+
// KYC & Privileges
|
|
363
|
+
kycOutput: zodToJsonSchema(kycOutputSchema, 'kycOutput'),
|
|
364
|
+
privilegesOutput: zodToJsonSchema(privilegesOutputSchema, 'privilegesOutput'),
|
|
365
|
+
};
|
|
366
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert Zod schemas to JSON Schema format for MCP tools
|
|
3
|
+
*/
|
|
4
|
+
export declare function getAnalyticsJsonSchemas(): {
|
|
5
|
+
getCustomerServiceMetricInput: import("zod-to-json-schema").JsonSchema7Type & {
|
|
6
|
+
$schema?: string | undefined;
|
|
7
|
+
definitions?: {
|
|
8
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
9
|
+
} | undefined;
|
|
10
|
+
};
|
|
11
|
+
getCustomerServiceMetricOutput: import("zod-to-json-schema").JsonSchema7Type & {
|
|
12
|
+
$schema?: string | undefined;
|
|
13
|
+
definitions?: {
|
|
14
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
15
|
+
} | undefined;
|
|
16
|
+
};
|
|
17
|
+
findSellerStandardsProfilesOutput: import("zod-to-json-schema").JsonSchema7Type & {
|
|
18
|
+
$schema?: string | undefined;
|
|
19
|
+
definitions?: {
|
|
20
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
21
|
+
} | undefined;
|
|
22
|
+
};
|
|
23
|
+
getSellerStandardsProfileInput: import("zod-to-json-schema").JsonSchema7Type & {
|
|
24
|
+
$schema?: string | undefined;
|
|
25
|
+
definitions?: {
|
|
26
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
27
|
+
} | undefined;
|
|
28
|
+
};
|
|
29
|
+
getSellerStandardsProfileOutput: import("zod-to-json-schema").JsonSchema7Type & {
|
|
30
|
+
$schema?: string | undefined;
|
|
31
|
+
definitions?: {
|
|
32
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
33
|
+
} | undefined;
|
|
34
|
+
};
|
|
35
|
+
getTrafficReportInput: import("zod-to-json-schema").JsonSchema7Type & {
|
|
36
|
+
$schema?: string | undefined;
|
|
37
|
+
definitions?: {
|
|
38
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
39
|
+
} | undefined;
|
|
40
|
+
};
|
|
41
|
+
getTrafficReportOutput: import("zod-to-json-schema").JsonSchema7Type & {
|
|
42
|
+
$schema?: string | undefined;
|
|
43
|
+
definitions?: {
|
|
44
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
45
|
+
} | undefined;
|
|
46
|
+
};
|
|
47
|
+
benchmarkMetadata: import("zod-to-json-schema").JsonSchema7Type & {
|
|
48
|
+
$schema?: string | undefined;
|
|
49
|
+
definitions?: {
|
|
50
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
51
|
+
} | undefined;
|
|
52
|
+
};
|
|
53
|
+
cycle: import("zod-to-json-schema").JsonSchema7Type & {
|
|
54
|
+
$schema?: string | undefined;
|
|
55
|
+
definitions?: {
|
|
56
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
57
|
+
} | undefined;
|
|
58
|
+
};
|
|
59
|
+
definition: import("zod-to-json-schema").JsonSchema7Type & {
|
|
60
|
+
$schema?: string | undefined;
|
|
61
|
+
definitions?: {
|
|
62
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
63
|
+
} | undefined;
|
|
64
|
+
};
|
|
65
|
+
dimension: import("zod-to-json-schema").JsonSchema7Type & {
|
|
66
|
+
$schema?: string | undefined;
|
|
67
|
+
definitions?: {
|
|
68
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
69
|
+
} | undefined;
|
|
70
|
+
};
|
|
71
|
+
dimensionMetric: import("zod-to-json-schema").JsonSchema7Type & {
|
|
72
|
+
$schema?: string | undefined;
|
|
73
|
+
definitions?: {
|
|
74
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
75
|
+
} | undefined;
|
|
76
|
+
};
|
|
77
|
+
distribution: import("zod-to-json-schema").JsonSchema7Type & {
|
|
78
|
+
$schema?: string | undefined;
|
|
79
|
+
definitions?: {
|
|
80
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
81
|
+
} | undefined;
|
|
82
|
+
};
|
|
83
|
+
error: import("zod-to-json-schema").JsonSchema7Type & {
|
|
84
|
+
$schema?: string | undefined;
|
|
85
|
+
definitions?: {
|
|
86
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
87
|
+
} | undefined;
|
|
88
|
+
};
|
|
89
|
+
errorParameter: import("zod-to-json-schema").JsonSchema7Type & {
|
|
90
|
+
$schema?: string | undefined;
|
|
91
|
+
definitions?: {
|
|
92
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
93
|
+
} | undefined;
|
|
94
|
+
};
|
|
95
|
+
evaluationCycle: import("zod-to-json-schema").JsonSchema7Type & {
|
|
96
|
+
$schema?: string | undefined;
|
|
97
|
+
definitions?: {
|
|
98
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
99
|
+
} | undefined;
|
|
100
|
+
};
|
|
101
|
+
header: import("zod-to-json-schema").JsonSchema7Type & {
|
|
102
|
+
$schema?: string | undefined;
|
|
103
|
+
definitions?: {
|
|
104
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
105
|
+
} | undefined;
|
|
106
|
+
};
|
|
107
|
+
metadata: import("zod-to-json-schema").JsonSchema7Type & {
|
|
108
|
+
$schema?: string | undefined;
|
|
109
|
+
definitions?: {
|
|
110
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
111
|
+
} | undefined;
|
|
112
|
+
};
|
|
113
|
+
metadataHeader: import("zod-to-json-schema").JsonSchema7Type & {
|
|
114
|
+
$schema?: string | undefined;
|
|
115
|
+
definitions?: {
|
|
116
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
117
|
+
} | undefined;
|
|
118
|
+
};
|
|
119
|
+
metadataRecord: import("zod-to-json-schema").JsonSchema7Type & {
|
|
120
|
+
$schema?: string | undefined;
|
|
121
|
+
definitions?: {
|
|
122
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
123
|
+
} | undefined;
|
|
124
|
+
};
|
|
125
|
+
metric: import("zod-to-json-schema").JsonSchema7Type & {
|
|
126
|
+
$schema?: string | undefined;
|
|
127
|
+
definitions?: {
|
|
128
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
129
|
+
} | undefined;
|
|
130
|
+
};
|
|
131
|
+
metricBenchmark: import("zod-to-json-schema").JsonSchema7Type & {
|
|
132
|
+
$schema?: string | undefined;
|
|
133
|
+
definitions?: {
|
|
134
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
135
|
+
} | undefined;
|
|
136
|
+
};
|
|
137
|
+
metricDistribution: import("zod-to-json-schema").JsonSchema7Type & {
|
|
138
|
+
$schema?: string | undefined;
|
|
139
|
+
definitions?: {
|
|
140
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
141
|
+
} | undefined;
|
|
142
|
+
};
|
|
143
|
+
record: import("zod-to-json-schema").JsonSchema7Type & {
|
|
144
|
+
$schema?: string | undefined;
|
|
145
|
+
definitions?: {
|
|
146
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
147
|
+
} | undefined;
|
|
148
|
+
};
|
|
149
|
+
report: import("zod-to-json-schema").JsonSchema7Type & {
|
|
150
|
+
$schema?: string | undefined;
|
|
151
|
+
definitions?: {
|
|
152
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
153
|
+
} | undefined;
|
|
154
|
+
};
|
|
155
|
+
standardsProfile: import("zod-to-json-schema").JsonSchema7Type & {
|
|
156
|
+
$schema?: string | undefined;
|
|
157
|
+
definitions?: {
|
|
158
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
159
|
+
} | undefined;
|
|
160
|
+
};
|
|
161
|
+
value: import("zod-to-json-schema").JsonSchema7Type & {
|
|
162
|
+
$schema?: string | undefined;
|
|
163
|
+
definitions?: {
|
|
164
|
+
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
165
|
+
} | undefined;
|
|
166
|
+
};
|
|
167
|
+
};
|