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,1088 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
|
+
/**
|
|
4
|
+
* Marketing API Schemas
|
|
5
|
+
*
|
|
6
|
+
* This file contains Zod schemas for all Marketing API endpoints including:
|
|
7
|
+
* - Campaign Management (create, get, update, pause, resume, end campaigns)
|
|
8
|
+
* - Ad Operations (bulk and single ad operations)
|
|
9
|
+
* - Ad Group Management
|
|
10
|
+
* - Keyword Management
|
|
11
|
+
* - Negative Keyword Management (campaign and ad group level)
|
|
12
|
+
* - Targeting schemas
|
|
13
|
+
* - Suggestion schemas (bids, keywords, budget)
|
|
14
|
+
* - Reporting schemas
|
|
15
|
+
* - Item Promotion schemas
|
|
16
|
+
* - Recommendation schemas
|
|
17
|
+
*/
|
|
18
|
+
// ============================================================================
|
|
19
|
+
// Common/Shared Response Schemas
|
|
20
|
+
// ============================================================================
|
|
21
|
+
export const errorSchema = z.object({
|
|
22
|
+
errorId: z.number().optional(),
|
|
23
|
+
domain: z.string().optional(),
|
|
24
|
+
category: z.string().optional(),
|
|
25
|
+
message: z.string().optional(),
|
|
26
|
+
longMessage: z.string().optional(),
|
|
27
|
+
subdomain: z.string().optional(),
|
|
28
|
+
inputRefIds: z.array(z.string()).optional(),
|
|
29
|
+
outputRefIds: z.array(z.string()).optional(),
|
|
30
|
+
parameters: z.array(z.object({
|
|
31
|
+
name: z.string().optional(),
|
|
32
|
+
value: z.string().optional(),
|
|
33
|
+
})).optional(),
|
|
34
|
+
});
|
|
35
|
+
export const errorParameterSchema = z.object({
|
|
36
|
+
name: z.string().optional(),
|
|
37
|
+
value: z.string().optional(),
|
|
38
|
+
});
|
|
39
|
+
export const amountSchema = z.object({
|
|
40
|
+
currency: z.string().optional(),
|
|
41
|
+
value: z.string().optional(),
|
|
42
|
+
});
|
|
43
|
+
export const alertSchema = z.object({
|
|
44
|
+
alertId: z.string().optional(),
|
|
45
|
+
message: z.string().optional(),
|
|
46
|
+
});
|
|
47
|
+
export const alertDetailsSchema = z.object({
|
|
48
|
+
alertId: z.string().optional(),
|
|
49
|
+
details: z.string().optional(),
|
|
50
|
+
});
|
|
51
|
+
export const alertDimensionSchema = z.object({
|
|
52
|
+
dimensionKey: z.string().optional(),
|
|
53
|
+
value: z.string().optional(),
|
|
54
|
+
});
|
|
55
|
+
export const baseResponseSchema = z.object({
|
|
56
|
+
warnings: z.array(errorSchema).optional(),
|
|
57
|
+
});
|
|
58
|
+
// ============================================================================
|
|
59
|
+
// Inventory Reference Schemas
|
|
60
|
+
// ============================================================================
|
|
61
|
+
export const marketingInventoryItemSchema = z.object({
|
|
62
|
+
inventoryReferenceId: z.string().optional(),
|
|
63
|
+
inventoryReferenceType: z.string().optional(),
|
|
64
|
+
});
|
|
65
|
+
export const inventoryReferenceSchema = z.object({
|
|
66
|
+
inventoryReferenceId: z.string().optional(),
|
|
67
|
+
inventoryReferenceType: z.string().optional(),
|
|
68
|
+
});
|
|
69
|
+
// ============================================================================
|
|
70
|
+
// Campaign Management Schemas
|
|
71
|
+
// ============================================================================
|
|
72
|
+
export const budgetSchema = z.object({
|
|
73
|
+
amount: z.string().optional(),
|
|
74
|
+
currency: z.string().optional(),
|
|
75
|
+
});
|
|
76
|
+
export const budgetRequestSchema = z.object({
|
|
77
|
+
amount: z.string().optional(),
|
|
78
|
+
currency: z.string().optional(),
|
|
79
|
+
});
|
|
80
|
+
export const campaignBudgetSchema = z.object({
|
|
81
|
+
daily: budgetSchema.optional(),
|
|
82
|
+
});
|
|
83
|
+
export const campaignBudgetRequestSchema = z.object({
|
|
84
|
+
daily: budgetRequestSchema.optional(),
|
|
85
|
+
});
|
|
86
|
+
export const fundingStrategySchema = z.object({
|
|
87
|
+
bidPercentage: z.string().optional(),
|
|
88
|
+
fundingModel: z.string().optional(),
|
|
89
|
+
});
|
|
90
|
+
export const selectionRuleSchema = z.object({
|
|
91
|
+
brands: z.array(z.string()).optional(),
|
|
92
|
+
categoryIds: z.array(z.string()).optional(),
|
|
93
|
+
categoryScope: z.string().optional(),
|
|
94
|
+
listingConditionIds: z.array(z.string()).optional(),
|
|
95
|
+
maxPrice: amountSchema.optional(),
|
|
96
|
+
minPrice: amountSchema.optional(),
|
|
97
|
+
});
|
|
98
|
+
export const campaignCriterionSchema = z.object({
|
|
99
|
+
autoSelectFutureInventory: z.boolean().optional(),
|
|
100
|
+
criterionType: z.string().optional(),
|
|
101
|
+
selectionRules: z.array(selectionRuleSchema).optional(),
|
|
102
|
+
});
|
|
103
|
+
export const campaignSchema = z.object({
|
|
104
|
+
alerts: z.array(alertSchema).optional(),
|
|
105
|
+
budget: campaignBudgetSchema.optional(),
|
|
106
|
+
campaignCriterion: campaignCriterionSchema.optional(),
|
|
107
|
+
campaignId: z.string().optional(),
|
|
108
|
+
campaignName: z.string().optional(),
|
|
109
|
+
campaignStatus: z.string().optional(),
|
|
110
|
+
campaignTargetingType: z.string().optional(),
|
|
111
|
+
channels: z.array(z.string()).optional(),
|
|
112
|
+
endDate: z.string().optional(),
|
|
113
|
+
fundingStrategy: fundingStrategySchema.optional(),
|
|
114
|
+
marketplaceId: z.string().optional(),
|
|
115
|
+
startDate: z.string().optional(),
|
|
116
|
+
});
|
|
117
|
+
export const createCampaignRequestSchema = z.object({
|
|
118
|
+
campaignCriterion: campaignCriterionSchema.optional(),
|
|
119
|
+
campaignName: z.string(),
|
|
120
|
+
budget: campaignBudgetRequestSchema.optional(),
|
|
121
|
+
channels: z.array(z.string()).optional(),
|
|
122
|
+
endDate: z.string().optional(),
|
|
123
|
+
fundingStrategy: fundingStrategySchema.optional(),
|
|
124
|
+
marketplaceId: z.string(),
|
|
125
|
+
startDate: z.string(),
|
|
126
|
+
});
|
|
127
|
+
export const cloneCampaignRequestSchema = z.object({
|
|
128
|
+
campaignName: z.string(),
|
|
129
|
+
endDate: z.string().optional(),
|
|
130
|
+
fundingStrategy: fundingStrategySchema.optional(),
|
|
131
|
+
startDate: z.string().optional(),
|
|
132
|
+
});
|
|
133
|
+
export const updateCampaignRequestSchema = z.object({
|
|
134
|
+
campaignName: z.string().optional(),
|
|
135
|
+
endDate: z.string().optional(),
|
|
136
|
+
fundingStrategy: fundingStrategySchema.optional(),
|
|
137
|
+
startDate: z.string().optional(),
|
|
138
|
+
});
|
|
139
|
+
export const updateCampaignBudgetRequestSchema = z.object({
|
|
140
|
+
budget: campaignBudgetRequestSchema.optional(),
|
|
141
|
+
});
|
|
142
|
+
export const updateCampaignIdentificationRequestSchema = z.object({
|
|
143
|
+
campaignName: z.string().optional(),
|
|
144
|
+
});
|
|
145
|
+
export const updateBidPercentageRequestSchema = z.object({
|
|
146
|
+
bidPercentage: z.string(),
|
|
147
|
+
});
|
|
148
|
+
export const updateBiddingStrategyRequestSchema = z.object({
|
|
149
|
+
bidPercentage: z.string().optional(),
|
|
150
|
+
biddingStrategy: z.string().optional(),
|
|
151
|
+
});
|
|
152
|
+
export const updateAdrateStrategyRequestSchema = z.object({
|
|
153
|
+
adRateStrategy: z.string().optional(),
|
|
154
|
+
});
|
|
155
|
+
export const campaignPagedCollectionResponseSchema = z.object({
|
|
156
|
+
campaigns: z.array(campaignSchema).optional(),
|
|
157
|
+
href: z.string().optional(),
|
|
158
|
+
limit: z.number().optional(),
|
|
159
|
+
next: z.string().optional(),
|
|
160
|
+
offset: z.number().optional(),
|
|
161
|
+
prev: z.string().optional(),
|
|
162
|
+
total: z.number().optional(),
|
|
163
|
+
});
|
|
164
|
+
export const campaignsSchema = z.object({
|
|
165
|
+
campaigns: z.array(campaignSchema).optional(),
|
|
166
|
+
});
|
|
167
|
+
// ============================================================================
|
|
168
|
+
// Ad Group Management Schemas
|
|
169
|
+
// ============================================================================
|
|
170
|
+
export const adGroupSchema = z.object({
|
|
171
|
+
adGroupId: z.string().optional(),
|
|
172
|
+
adGroupStatus: z.string().optional(),
|
|
173
|
+
defaultBid: amountSchema.optional(),
|
|
174
|
+
name: z.string().optional(),
|
|
175
|
+
});
|
|
176
|
+
export const createAdGroupRequestSchema = z.object({
|
|
177
|
+
defaultBid: amountSchema.optional(),
|
|
178
|
+
name: z.string(),
|
|
179
|
+
});
|
|
180
|
+
export const updateAdGroupRequestSchema = z.object({
|
|
181
|
+
adGroupStatus: z.string().optional(),
|
|
182
|
+
defaultBid: amountSchema.optional(),
|
|
183
|
+
name: z.string().optional(),
|
|
184
|
+
});
|
|
185
|
+
export const adGroupPagedCollectionResponseSchema = z.object({
|
|
186
|
+
adGroups: z.array(adGroupSchema).optional(),
|
|
187
|
+
href: z.string().optional(),
|
|
188
|
+
limit: z.number().optional(),
|
|
189
|
+
next: z.string().optional(),
|
|
190
|
+
offset: z.number().optional(),
|
|
191
|
+
prev: z.string().optional(),
|
|
192
|
+
total: z.number().optional(),
|
|
193
|
+
});
|
|
194
|
+
// ============================================================================
|
|
195
|
+
// Ad Operations Schemas
|
|
196
|
+
// ============================================================================
|
|
197
|
+
export const adSchema = z.object({
|
|
198
|
+
adGroupId: z.string().optional(),
|
|
199
|
+
adId: z.string().optional(),
|
|
200
|
+
adStatus: z.string().optional(),
|
|
201
|
+
alerts: z.array(alertSchema).optional(),
|
|
202
|
+
bidPercentage: z.string().optional(),
|
|
203
|
+
inventoryReferenceId: z.string().optional(),
|
|
204
|
+
inventoryReferenceType: z.string().optional(),
|
|
205
|
+
listingId: z.string().optional(),
|
|
206
|
+
});
|
|
207
|
+
export const createAdRequestSchema = z.object({
|
|
208
|
+
adGroupId: z.string().optional(),
|
|
209
|
+
bidPercentage: z.string().optional(),
|
|
210
|
+
listingId: z.string().optional(),
|
|
211
|
+
});
|
|
212
|
+
export const adsSchema = z.object({
|
|
213
|
+
ads: z.array(createAdRequestSchema).optional(),
|
|
214
|
+
});
|
|
215
|
+
export const createAdsByInventoryReferenceRequestSchema = z.object({
|
|
216
|
+
bidPercentage: z.string().optional(),
|
|
217
|
+
inventoryReferenceId: z.string().optional(),
|
|
218
|
+
inventoryReferenceType: z.string().optional(),
|
|
219
|
+
});
|
|
220
|
+
export const adReferenceSchema = z.object({
|
|
221
|
+
adId: z.string().optional(),
|
|
222
|
+
href: z.string().optional(),
|
|
223
|
+
});
|
|
224
|
+
export const adReferencesSchema = z.object({
|
|
225
|
+
ads: z.array(adReferenceSchema).optional(),
|
|
226
|
+
});
|
|
227
|
+
export const adResponseSchema = z.object({
|
|
228
|
+
adGroupId: z.string().optional(),
|
|
229
|
+
adId: z.string().optional(),
|
|
230
|
+
errors: z.array(errorSchema).optional(),
|
|
231
|
+
href: z.string().optional(),
|
|
232
|
+
listingId: z.string().optional(),
|
|
233
|
+
statusCode: z.number().optional(),
|
|
234
|
+
warnings: z.array(errorSchema).optional(),
|
|
235
|
+
});
|
|
236
|
+
export const createAdsByInventoryReferenceResponseSchema = z.object({
|
|
237
|
+
ads: z.array(adResponseSchema).optional(),
|
|
238
|
+
errors: z.array(errorSchema).optional(),
|
|
239
|
+
inventoryReferenceId: z.string().optional(),
|
|
240
|
+
inventoryReferenceType: z.string().optional(),
|
|
241
|
+
statusCode: z.number().optional(),
|
|
242
|
+
warnings: z.array(errorSchema).optional(),
|
|
243
|
+
});
|
|
244
|
+
export const adPagedCollectionResponseSchema = z.object({
|
|
245
|
+
ads: z.array(adSchema).optional(),
|
|
246
|
+
href: z.string().optional(),
|
|
247
|
+
limit: z.number().optional(),
|
|
248
|
+
next: z.string().optional(),
|
|
249
|
+
offset: z.number().optional(),
|
|
250
|
+
prev: z.string().optional(),
|
|
251
|
+
total: z.number().optional(),
|
|
252
|
+
});
|
|
253
|
+
// Ad Update Schemas
|
|
254
|
+
export const updateAdStatusRequestSchema = z.object({
|
|
255
|
+
adStatus: z.string(),
|
|
256
|
+
});
|
|
257
|
+
export const updateAdStatusByListingIdRequestSchema = z.object({
|
|
258
|
+
adStatus: z.string(),
|
|
259
|
+
listingId: z.string(),
|
|
260
|
+
});
|
|
261
|
+
export const adUpdateStatusResponseSchema = z.object({
|
|
262
|
+
adId: z.string().optional(),
|
|
263
|
+
errors: z.array(errorSchema).optional(),
|
|
264
|
+
href: z.string().optional(),
|
|
265
|
+
statusCode: z.number().optional(),
|
|
266
|
+
});
|
|
267
|
+
export const adUpdateStatusByListingIdResponseSchema = z.object({
|
|
268
|
+
errors: z.array(errorSchema).optional(),
|
|
269
|
+
href: z.string().optional(),
|
|
270
|
+
listingId: z.string().optional(),
|
|
271
|
+
statusCode: z.number().optional(),
|
|
272
|
+
});
|
|
273
|
+
export const adUpdateResponseSchema = z.object({
|
|
274
|
+
ads: z.array(adUpdateStatusResponseSchema).optional(),
|
|
275
|
+
});
|
|
276
|
+
// Bulk Ad Operations
|
|
277
|
+
export const bulkCreateAdRequestSchema = z.object({
|
|
278
|
+
requests: z.array(createAdRequestSchema).optional(),
|
|
279
|
+
});
|
|
280
|
+
export const bulkAdResponseSchema = z.object({
|
|
281
|
+
responses: z.array(adResponseSchema).optional(),
|
|
282
|
+
});
|
|
283
|
+
export const bulkCreateAdsByInventoryReferenceRequestSchema = z.object({
|
|
284
|
+
requests: z.array(createAdsByInventoryReferenceRequestSchema).optional(),
|
|
285
|
+
});
|
|
286
|
+
export const bulkCreateAdsByInventoryReferenceResponseSchema = z.object({
|
|
287
|
+
responses: z.array(createAdsByInventoryReferenceResponseSchema).optional(),
|
|
288
|
+
});
|
|
289
|
+
export const bulkUpdateAdStatusRequestSchema = z.object({
|
|
290
|
+
requests: z.array(updateAdStatusRequestSchema).optional(),
|
|
291
|
+
});
|
|
292
|
+
export const bulkUpdateAdStatusByListingIdRequestSchema = z.object({
|
|
293
|
+
requests: z.array(updateAdStatusByListingIdRequestSchema).optional(),
|
|
294
|
+
});
|
|
295
|
+
export const bulkAdUpdateStatusResponseSchema = z.object({
|
|
296
|
+
responses: z.array(adUpdateStatusResponseSchema).optional(),
|
|
297
|
+
});
|
|
298
|
+
export const bulkAdUpdateStatusByListingIdResponseSchema = z.object({
|
|
299
|
+
responses: z.array(adUpdateStatusByListingIdResponseSchema).optional(),
|
|
300
|
+
});
|
|
301
|
+
export const bulkAdUpdateResponseSchema = z.object({
|
|
302
|
+
responses: z.array(adUpdateResponseSchema).optional(),
|
|
303
|
+
});
|
|
304
|
+
// Delete Ad Schemas
|
|
305
|
+
export const adIdsSchema = z.object({
|
|
306
|
+
adIds: z.array(z.string()).optional(),
|
|
307
|
+
});
|
|
308
|
+
export const deleteAdRequestSchema = z.object({
|
|
309
|
+
adId: z.string().optional(),
|
|
310
|
+
});
|
|
311
|
+
export const deleteAdResponseSchema = z.object({
|
|
312
|
+
adId: z.string().optional(),
|
|
313
|
+
errors: z.array(errorSchema).optional(),
|
|
314
|
+
listingId: z.string().optional(),
|
|
315
|
+
statusCode: z.number().optional(),
|
|
316
|
+
});
|
|
317
|
+
export const bulkDeleteAdRequestSchema = z.object({
|
|
318
|
+
requests: z.array(deleteAdRequestSchema).optional(),
|
|
319
|
+
});
|
|
320
|
+
export const bulkDeleteAdResponseSchema = z.object({
|
|
321
|
+
responses: z.array(deleteAdResponseSchema).optional(),
|
|
322
|
+
});
|
|
323
|
+
export const deleteAdsByInventoryReferenceRequestSchema = z.object({
|
|
324
|
+
inventoryReferenceId: z.string().optional(),
|
|
325
|
+
inventoryReferenceType: z.string().optional(),
|
|
326
|
+
});
|
|
327
|
+
export const deleteAdsByInventoryReferenceResponseSchema = z.object({
|
|
328
|
+
ads: z.array(deleteAdResponseSchema).optional(),
|
|
329
|
+
errors: z.array(errorSchema).optional(),
|
|
330
|
+
inventoryReferenceId: z.string().optional(),
|
|
331
|
+
inventoryReferenceType: z.string().optional(),
|
|
332
|
+
statusCode: z.number().optional(),
|
|
333
|
+
});
|
|
334
|
+
export const bulkDeleteAdsByInventoryReferenceRequestSchema = z.object({
|
|
335
|
+
requests: z.array(deleteAdsByInventoryReferenceRequestSchema).optional(),
|
|
336
|
+
});
|
|
337
|
+
export const bulkDeleteAdsByInventoryReferenceResponseSchema = z.object({
|
|
338
|
+
responses: z.array(deleteAdsByInventoryReferenceResponseSchema).optional(),
|
|
339
|
+
});
|
|
340
|
+
export const updateAdsByInventoryReferenceResponseSchema = z.object({
|
|
341
|
+
ads: z.array(adUpdateStatusResponseSchema).optional(),
|
|
342
|
+
errors: z.array(errorSchema).optional(),
|
|
343
|
+
inventoryReferenceId: z.string().optional(),
|
|
344
|
+
inventoryReferenceType: z.string().optional(),
|
|
345
|
+
statusCode: z.number().optional(),
|
|
346
|
+
});
|
|
347
|
+
export const bulkUpdateAdsByInventoryReferenceResponseSchema = z.object({
|
|
348
|
+
responses: z.array(updateAdsByInventoryReferenceResponseSchema).optional(),
|
|
349
|
+
});
|
|
350
|
+
// ============================================================================
|
|
351
|
+
// Keyword Management Schemas
|
|
352
|
+
// ============================================================================
|
|
353
|
+
export const keywordSchema = z.object({
|
|
354
|
+
adGroupId: z.string().optional(),
|
|
355
|
+
bid: amountSchema.optional(),
|
|
356
|
+
keywordId: z.string().optional(),
|
|
357
|
+
keywordStatus: z.string().optional(),
|
|
358
|
+
keywordText: z.string().optional(),
|
|
359
|
+
matchType: z.string().optional(),
|
|
360
|
+
});
|
|
361
|
+
export const keywordRequestSchema = z.object({
|
|
362
|
+
keywordText: z.string().optional(),
|
|
363
|
+
matchType: z.string().optional(),
|
|
364
|
+
});
|
|
365
|
+
export const createKeywordRequestSchema = z.object({
|
|
366
|
+
adGroupId: z.string(),
|
|
367
|
+
bid: amountSchema.optional(),
|
|
368
|
+
keywordText: z.string(),
|
|
369
|
+
matchType: z.string(),
|
|
370
|
+
});
|
|
371
|
+
export const keywordResponseSchema = z.object({
|
|
372
|
+
adGroupId: z.string().optional(),
|
|
373
|
+
errors: z.array(errorSchema).optional(),
|
|
374
|
+
href: z.string().optional(),
|
|
375
|
+
keywordId: z.string().optional(),
|
|
376
|
+
keywordText: z.string().optional(),
|
|
377
|
+
matchType: z.string().optional(),
|
|
378
|
+
statusCode: z.number().optional(),
|
|
379
|
+
warnings: z.array(errorSchema).optional(),
|
|
380
|
+
});
|
|
381
|
+
export const updateKeywordRequestSchema = z.object({
|
|
382
|
+
bid: amountSchema.optional(),
|
|
383
|
+
keywordStatus: z.string().optional(),
|
|
384
|
+
});
|
|
385
|
+
export const updateKeywordByKeywordIdRequestSchema = z.object({
|
|
386
|
+
bid: amountSchema.optional(),
|
|
387
|
+
keywordStatus: z.string().optional(),
|
|
388
|
+
});
|
|
389
|
+
export const updateKeywordResponseSchema = z.object({
|
|
390
|
+
errors: z.array(errorSchema).optional(),
|
|
391
|
+
href: z.string().optional(),
|
|
392
|
+
keywordId: z.string().optional(),
|
|
393
|
+
statusCode: z.number().optional(),
|
|
394
|
+
warnings: z.array(errorSchema).optional(),
|
|
395
|
+
});
|
|
396
|
+
export const keywordPagedCollectionResponseSchema = z.object({
|
|
397
|
+
href: z.string().optional(),
|
|
398
|
+
keywords: z.array(keywordSchema).optional(),
|
|
399
|
+
limit: z.number().optional(),
|
|
400
|
+
next: z.string().optional(),
|
|
401
|
+
offset: z.number().optional(),
|
|
402
|
+
prev: z.string().optional(),
|
|
403
|
+
total: z.number().optional(),
|
|
404
|
+
});
|
|
405
|
+
// Bulk Keyword Operations
|
|
406
|
+
export const bulkCreateKeywordRequestSchema = z.object({
|
|
407
|
+
requests: z.array(createKeywordRequestSchema).optional(),
|
|
408
|
+
});
|
|
409
|
+
export const bulkCreateKeywordResponseSchema = z.object({
|
|
410
|
+
responses: z.array(keywordResponseSchema).optional(),
|
|
411
|
+
});
|
|
412
|
+
export const bulkUpdateKeywordRequestSchema = z.object({
|
|
413
|
+
requests: z.array(z.object({
|
|
414
|
+
keywordId: z.string(),
|
|
415
|
+
bid: amountSchema.optional(),
|
|
416
|
+
keywordStatus: z.string().optional(),
|
|
417
|
+
})).optional(),
|
|
418
|
+
});
|
|
419
|
+
export const bulkUpdateKeywordResponseSchema = z.object({
|
|
420
|
+
responses: z.array(updateKeywordResponseSchema).optional(),
|
|
421
|
+
});
|
|
422
|
+
// ============================================================================
|
|
423
|
+
// Negative Keyword Management Schemas
|
|
424
|
+
// ============================================================================
|
|
425
|
+
export const negativeKeywordSchema = z.object({
|
|
426
|
+
adGroupId: z.string().optional(),
|
|
427
|
+
campaignId: z.string().optional(),
|
|
428
|
+
negativeKeywordId: z.string().optional(),
|
|
429
|
+
negativeKeywordMatchType: z.string().optional(),
|
|
430
|
+
negativeKeywordStatus: z.string().optional(),
|
|
431
|
+
negativeKeywordText: z.string().optional(),
|
|
432
|
+
});
|
|
433
|
+
export const createNegativeKeywordRequestSchema = z.object({
|
|
434
|
+
adGroupId: z.string().optional(),
|
|
435
|
+
campaignId: z.string().optional(),
|
|
436
|
+
negativeKeywordMatchType: z.string(),
|
|
437
|
+
negativeKeywordText: z.string(),
|
|
438
|
+
});
|
|
439
|
+
export const negativeKeywordResponseSchema = z.object({
|
|
440
|
+
adGroupId: z.string().optional(),
|
|
441
|
+
campaignId: z.string().optional(),
|
|
442
|
+
errors: z.array(errorSchema).optional(),
|
|
443
|
+
href: z.string().optional(),
|
|
444
|
+
negativeKeywordId: z.string().optional(),
|
|
445
|
+
negativeKeywordMatchType: z.string().optional(),
|
|
446
|
+
negativeKeywordText: z.string().optional(),
|
|
447
|
+
statusCode: z.number().optional(),
|
|
448
|
+
warnings: z.array(errorSchema).optional(),
|
|
449
|
+
});
|
|
450
|
+
export const updateNegativeKeywordRequestSchema = z.object({
|
|
451
|
+
negativeKeywordStatus: z.string().optional(),
|
|
452
|
+
});
|
|
453
|
+
export const updateNegativeKeywordIdRequestSchema = z.object({
|
|
454
|
+
negativeKeywordStatus: z.string().optional(),
|
|
455
|
+
});
|
|
456
|
+
export const updateNegativeKeywordResponseSchema = z.object({
|
|
457
|
+
errors: z.array(errorSchema).optional(),
|
|
458
|
+
href: z.string().optional(),
|
|
459
|
+
negativeKeywordId: z.string().optional(),
|
|
460
|
+
statusCode: z.number().optional(),
|
|
461
|
+
warnings: z.array(errorSchema).optional(),
|
|
462
|
+
});
|
|
463
|
+
export const negativeKeywordPagedCollectionResponseSchema = z.object({
|
|
464
|
+
href: z.string().optional(),
|
|
465
|
+
limit: z.number().optional(),
|
|
466
|
+
negativeKeywords: z.array(negativeKeywordSchema).optional(),
|
|
467
|
+
next: z.string().optional(),
|
|
468
|
+
offset: z.number().optional(),
|
|
469
|
+
prev: z.string().optional(),
|
|
470
|
+
total: z.number().optional(),
|
|
471
|
+
});
|
|
472
|
+
// Bulk Negative Keyword Operations
|
|
473
|
+
export const bulkCreateNegativeKeywordRequestSchema = z.object({
|
|
474
|
+
requests: z.array(createNegativeKeywordRequestSchema).optional(),
|
|
475
|
+
});
|
|
476
|
+
export const bulkCreateNegativeKeywordResponseSchema = z.object({
|
|
477
|
+
responses: z.array(negativeKeywordResponseSchema).optional(),
|
|
478
|
+
});
|
|
479
|
+
export const bulkUpdateNegativeKeywordRequestSchema = z.object({
|
|
480
|
+
requests: z.array(z.object({
|
|
481
|
+
negativeKeywordId: z.string(),
|
|
482
|
+
negativeKeywordStatus: z.string().optional(),
|
|
483
|
+
})).optional(),
|
|
484
|
+
});
|
|
485
|
+
export const bulkUpdateNegativeKeywordResponseSchema = z.object({
|
|
486
|
+
responses: z.array(updateNegativeKeywordResponseSchema).optional(),
|
|
487
|
+
});
|
|
488
|
+
// ============================================================================
|
|
489
|
+
// Targeting and Bid Schemas
|
|
490
|
+
// ============================================================================
|
|
491
|
+
export const targetedBidRequestSchema = z.object({
|
|
492
|
+
bid: amountSchema.optional(),
|
|
493
|
+
listingId: z.string().optional(),
|
|
494
|
+
});
|
|
495
|
+
export const targetedKeywordRequestSchema = z.object({
|
|
496
|
+
adGroupId: z.string().optional(),
|
|
497
|
+
bid: amountSchema.optional(),
|
|
498
|
+
keywordText: z.string().optional(),
|
|
499
|
+
matchType: z.string().optional(),
|
|
500
|
+
});
|
|
501
|
+
export const targetedAdsPagedCollectionSchema = z.object({
|
|
502
|
+
ads: z.array(adSchema).optional(),
|
|
503
|
+
href: z.string().optional(),
|
|
504
|
+
limit: z.number().optional(),
|
|
505
|
+
next: z.string().optional(),
|
|
506
|
+
offset: z.number().optional(),
|
|
507
|
+
prev: z.string().optional(),
|
|
508
|
+
total: z.number().optional(),
|
|
509
|
+
});
|
|
510
|
+
export const targetedBidsPagedCollectionSchema = z.object({
|
|
511
|
+
bids: z.array(targetedBidRequestSchema).optional(),
|
|
512
|
+
href: z.string().optional(),
|
|
513
|
+
limit: z.number().optional(),
|
|
514
|
+
next: z.string().optional(),
|
|
515
|
+
offset: z.number().optional(),
|
|
516
|
+
prev: z.string().optional(),
|
|
517
|
+
total: z.number().optional(),
|
|
518
|
+
});
|
|
519
|
+
export const targetedKeywordsPagedCollectionSchema = z.object({
|
|
520
|
+
href: z.string().optional(),
|
|
521
|
+
keywords: z.array(targetedKeywordRequestSchema).optional(),
|
|
522
|
+
limit: z.number().optional(),
|
|
523
|
+
next: z.string().optional(),
|
|
524
|
+
offset: z.number().optional(),
|
|
525
|
+
prev: z.string().optional(),
|
|
526
|
+
total: z.number().optional(),
|
|
527
|
+
});
|
|
528
|
+
export const targetingItemsSchema = z.object({
|
|
529
|
+
inventoryCriterion: z.array(z.object({
|
|
530
|
+
inventoryItems: z.array(marketingInventoryItemSchema).optional(),
|
|
531
|
+
listingIds: z.array(z.string()).optional(),
|
|
532
|
+
})).optional(),
|
|
533
|
+
});
|
|
534
|
+
// ============================================================================
|
|
535
|
+
// Suggestion Schemas (Bids, Keywords, Budget)
|
|
536
|
+
// ============================================================================
|
|
537
|
+
export const proposedBidSchema = z.object({
|
|
538
|
+
amount: amountSchema.optional(),
|
|
539
|
+
basis: z.string().optional(),
|
|
540
|
+
});
|
|
541
|
+
export const suggestedBidsSchema = z.object({
|
|
542
|
+
keywordText: z.string().optional(),
|
|
543
|
+
matchType: z.string().optional(),
|
|
544
|
+
proposedBid: proposedBidSchema.optional(),
|
|
545
|
+
});
|
|
546
|
+
export const additionalInfoDataSchema = z.object({
|
|
547
|
+
key: z.string().optional(),
|
|
548
|
+
value: z.string().optional(),
|
|
549
|
+
});
|
|
550
|
+
export const additionalInfoSchema = z.object({
|
|
551
|
+
data: z.array(additionalInfoDataSchema).optional(),
|
|
552
|
+
type: z.string().optional(),
|
|
553
|
+
});
|
|
554
|
+
export const suggestedKeywordsSchema = z.object({
|
|
555
|
+
additionalInfo: z.array(additionalInfoSchema).optional(),
|
|
556
|
+
keywordText: z.string().optional(),
|
|
557
|
+
matchType: z.string().optional(),
|
|
558
|
+
});
|
|
559
|
+
export const budgetRecommendationResponseSchema = z.object({
|
|
560
|
+
amount: amountSchema.optional(),
|
|
561
|
+
type: z.string().optional(),
|
|
562
|
+
});
|
|
563
|
+
export const suggestBudgetResponseSchema = z.object({
|
|
564
|
+
suggestedBudget: z.array(budgetRecommendationResponseSchema).optional(),
|
|
565
|
+
});
|
|
566
|
+
export const maxCpcSchema = z.object({
|
|
567
|
+
amount: amountSchema.optional(),
|
|
568
|
+
});
|
|
569
|
+
export const suggestMaxCpcRequestSchema = z.object({
|
|
570
|
+
listingIds: z.array(z.string()).optional(),
|
|
571
|
+
marketplaceId: z.string().optional(),
|
|
572
|
+
});
|
|
573
|
+
export const suggestMaxCpcResponseSchema = z.object({
|
|
574
|
+
amount: amountSchema.optional(),
|
|
575
|
+
marketplaceId: z.string().optional(),
|
|
576
|
+
});
|
|
577
|
+
export const bidPreferenceSchema = z.object({
|
|
578
|
+
bidPercentage: z.string().optional(),
|
|
579
|
+
});
|
|
580
|
+
export const dynamicAdRatePreferenceSchema = z.object({
|
|
581
|
+
maxAdRate: z.string().optional(),
|
|
582
|
+
minAdRate: z.string().optional(),
|
|
583
|
+
});
|
|
584
|
+
// Quick Setup Schema
|
|
585
|
+
export const quickSetupRequestSchema = z.object({
|
|
586
|
+
campaignName: z.string(),
|
|
587
|
+
dailyBudget: amountSchema.optional(),
|
|
588
|
+
endDate: z.string().optional(),
|
|
589
|
+
fundingStrategy: fundingStrategySchema.optional(),
|
|
590
|
+
listingIds: z.array(z.string()).optional(),
|
|
591
|
+
marketplaceId: z.string(),
|
|
592
|
+
startDate: z.string().optional(),
|
|
593
|
+
});
|
|
594
|
+
// ============================================================================
|
|
595
|
+
// Reporting Schemas
|
|
596
|
+
// ============================================================================
|
|
597
|
+
export const dimensionSchema = z.object({
|
|
598
|
+
dimensionKey: z.string().optional(),
|
|
599
|
+
dimensionValues: z.array(z.string()).optional(),
|
|
600
|
+
});
|
|
601
|
+
export const dimensionKeyAnnotationSchema = z.object({
|
|
602
|
+
annotationKey: z.string().optional(),
|
|
603
|
+
value: z.string().optional(),
|
|
604
|
+
});
|
|
605
|
+
export const dimensionMetadataSchema = z.object({
|
|
606
|
+
annotations: z.array(dimensionKeyAnnotationSchema).optional(),
|
|
607
|
+
dataType: z.string().optional(),
|
|
608
|
+
dimensionKey: z.string().optional(),
|
|
609
|
+
});
|
|
610
|
+
export const metricMetadataSchema = z.object({
|
|
611
|
+
dataType: z.string().optional(),
|
|
612
|
+
metricKey: z.string().optional(),
|
|
613
|
+
});
|
|
614
|
+
export const reportMetadataSchema = z.object({
|
|
615
|
+
dimensionMetadata: z.array(dimensionMetadataSchema).optional(),
|
|
616
|
+
maxNumberOfDimensionsToRequest: z.number().optional(),
|
|
617
|
+
maxNumberOfMetricsToRequest: z.number().optional(),
|
|
618
|
+
channel: z.string().optional(),
|
|
619
|
+
metricMetadata: z.array(metricMetadataSchema).optional(),
|
|
620
|
+
reportType: z.string().optional(),
|
|
621
|
+
});
|
|
622
|
+
export const reportMetadatasSchema = z.object({
|
|
623
|
+
reportMetadata: z.array(reportMetadataSchema).optional(),
|
|
624
|
+
});
|
|
625
|
+
export const createReportTaskSchema = z.object({
|
|
626
|
+
campaignIds: z.array(z.string()).optional(),
|
|
627
|
+
channels: z.array(z.string()).optional(),
|
|
628
|
+
dateFrom: z.string(),
|
|
629
|
+
dateTo: z.string(),
|
|
630
|
+
dimensions: z.array(dimensionSchema).optional(),
|
|
631
|
+
fundingModels: z.array(z.string()).optional(),
|
|
632
|
+
inventoryReferences: z.array(inventoryReferenceSchema).optional(),
|
|
633
|
+
listingIds: z.array(z.string()).optional(),
|
|
634
|
+
marketplaceId: z.string(),
|
|
635
|
+
metricKeys: z.array(z.string()).optional(),
|
|
636
|
+
reportFormat: z.string().optional(),
|
|
637
|
+
reportType: z.string(),
|
|
638
|
+
});
|
|
639
|
+
export const reportTaskSchema = z.object({
|
|
640
|
+
campaignIds: z.array(z.string()).optional(),
|
|
641
|
+
channels: z.array(z.string()).optional(),
|
|
642
|
+
dateFrom: z.string().optional(),
|
|
643
|
+
dateTo: z.string().optional(),
|
|
644
|
+
dimensions: z.array(dimensionSchema).optional(),
|
|
645
|
+
fundingModels: z.array(z.string()).optional(),
|
|
646
|
+
inventoryReferences: z.array(inventoryReferenceSchema).optional(),
|
|
647
|
+
listingIds: z.array(z.string()).optional(),
|
|
648
|
+
marketplaceId: z.string().optional(),
|
|
649
|
+
metricKeys: z.array(z.string()).optional(),
|
|
650
|
+
reportExpirationDate: z.string().optional(),
|
|
651
|
+
reportFormat: z.string().optional(),
|
|
652
|
+
reportHref: z.string().optional(),
|
|
653
|
+
reportId: z.string().optional(),
|
|
654
|
+
reportName: z.string().optional(),
|
|
655
|
+
reportTaskCompletionDate: z.string().optional(),
|
|
656
|
+
reportTaskCreationDate: z.string().optional(),
|
|
657
|
+
reportTaskExpectedCompletionDate: z.string().optional(),
|
|
658
|
+
reportTaskId: z.string().optional(),
|
|
659
|
+
reportTaskStatus: z.string().optional(),
|
|
660
|
+
reportTaskStatusMessage: z.string().optional(),
|
|
661
|
+
reportType: z.string().optional(),
|
|
662
|
+
});
|
|
663
|
+
export const reportTaskPagedCollectionSchema = z.object({
|
|
664
|
+
href: z.string().optional(),
|
|
665
|
+
limit: z.number().optional(),
|
|
666
|
+
next: z.string().optional(),
|
|
667
|
+
offset: z.number().optional(),
|
|
668
|
+
prev: z.string().optional(),
|
|
669
|
+
total: z.number().optional(),
|
|
670
|
+
reportTasks: z.array(reportTaskSchema).optional(),
|
|
671
|
+
});
|
|
672
|
+
export const summaryReportResponseSchema = z.object({
|
|
673
|
+
baseSale: amountSchema.optional(),
|
|
674
|
+
lastUpdated: z.string().optional(),
|
|
675
|
+
percentageSalesLift: z.string().optional(),
|
|
676
|
+
promotionHref: z.string().optional(),
|
|
677
|
+
promotionId: z.string().optional(),
|
|
678
|
+
promotionReportId: z.string().optional(),
|
|
679
|
+
promotionSale: amountSchema.optional(),
|
|
680
|
+
totalDiscount: amountSchema.optional(),
|
|
681
|
+
totalSale: amountSchema.optional(),
|
|
682
|
+
});
|
|
683
|
+
// ============================================================================
|
|
684
|
+
// Item Promotion (Discounts) Schemas
|
|
685
|
+
// ============================================================================
|
|
686
|
+
export const discountBenefitSchema = z.object({
|
|
687
|
+
amountOffItem: amountSchema.optional(),
|
|
688
|
+
amountOffOrder: amountSchema.optional(),
|
|
689
|
+
percentageOffItem: z.string().optional(),
|
|
690
|
+
percentageOffOrder: z.string().optional(),
|
|
691
|
+
});
|
|
692
|
+
export const priceRangeSchema = z.object({
|
|
693
|
+
maxPrice: amountSchema.optional(),
|
|
694
|
+
minPrice: amountSchema.optional(),
|
|
695
|
+
});
|
|
696
|
+
export const discountSpecificationSchema = z.object({
|
|
697
|
+
forEachAmount: amountSchema.optional(),
|
|
698
|
+
forEachQuantity: z.number().optional(),
|
|
699
|
+
minAmount: amountSchema.optional(),
|
|
700
|
+
minQuantity: z.number().optional(),
|
|
701
|
+
numberOfDiscountedItems: z.number().optional(),
|
|
702
|
+
});
|
|
703
|
+
export const discountRuleSchema = z.object({
|
|
704
|
+
discountBenefit: discountBenefitSchema.optional(),
|
|
705
|
+
discountSpecification: discountSpecificationSchema.optional(),
|
|
706
|
+
ruleOrder: z.number().optional(),
|
|
707
|
+
});
|
|
708
|
+
export const inventoryCriterionSchema = z.object({
|
|
709
|
+
inventoryCriterionType: z.string().optional(),
|
|
710
|
+
inventoryItems: z.array(marketingInventoryItemSchema).optional(),
|
|
711
|
+
listingIds: z.array(z.string()).optional(),
|
|
712
|
+
ruleCriteria: z.object({
|
|
713
|
+
excludeInventoryItems: z.array(marketingInventoryItemSchema).optional(),
|
|
714
|
+
excludeListingIds: z.array(z.string()).optional(),
|
|
715
|
+
markupInventoryItems: z.array(marketingInventoryItemSchema).optional(),
|
|
716
|
+
markupListingIds: z.array(z.string()).optional(),
|
|
717
|
+
selectionRules: z.array(selectionRuleSchema).optional(),
|
|
718
|
+
}).optional(),
|
|
719
|
+
});
|
|
720
|
+
export const couponConfigurationSchema = z.object({
|
|
721
|
+
couponCode: z.string().optional(),
|
|
722
|
+
couponType: z.string().optional(),
|
|
723
|
+
maxCouponRedemptionPerUser: z.number().optional(),
|
|
724
|
+
});
|
|
725
|
+
export const itemPromotionSchema = z.object({
|
|
726
|
+
applyDiscountToSingleItemOnly: z.boolean().optional(),
|
|
727
|
+
budget: amountSchema.optional(),
|
|
728
|
+
couponConfiguration: couponConfigurationSchema.optional(),
|
|
729
|
+
description: z.string().optional(),
|
|
730
|
+
discountRules: z.array(discountRuleSchema).optional(),
|
|
731
|
+
endDate: z.string().optional(),
|
|
732
|
+
inventoryCriterion: inventoryCriterionSchema.optional(),
|
|
733
|
+
marketplaceId: z.string().optional(),
|
|
734
|
+
name: z.string().optional(),
|
|
735
|
+
priority: z.string().optional(),
|
|
736
|
+
promotionImageUrl: z.string().optional(),
|
|
737
|
+
promotionStatus: z.string().optional(),
|
|
738
|
+
promotionType: z.string().optional(),
|
|
739
|
+
startDate: z.string().optional(),
|
|
740
|
+
});
|
|
741
|
+
export const itemPromotionResponseSchema = z.object({
|
|
742
|
+
applyDiscountToSingleItemOnly: z.boolean().optional(),
|
|
743
|
+
budget: amountSchema.optional(),
|
|
744
|
+
couponConfiguration: couponConfigurationSchema.optional(),
|
|
745
|
+
description: z.string().optional(),
|
|
746
|
+
discountRules: z.array(discountRuleSchema).optional(),
|
|
747
|
+
endDate: z.string().optional(),
|
|
748
|
+
inventoryCriterion: inventoryCriterionSchema.optional(),
|
|
749
|
+
marketplaceId: z.string().optional(),
|
|
750
|
+
name: z.string().optional(),
|
|
751
|
+
priority: z.string().optional(),
|
|
752
|
+
promotionId: z.string().optional(),
|
|
753
|
+
promotionImageUrl: z.string().optional(),
|
|
754
|
+
promotionStatus: z.string().optional(),
|
|
755
|
+
promotionType: z.string().optional(),
|
|
756
|
+
startDate: z.string().optional(),
|
|
757
|
+
});
|
|
758
|
+
export const selectedInventoryDiscountSchema = z.object({
|
|
759
|
+
discountBenefit: discountBenefitSchema.optional(),
|
|
760
|
+
discountId: z.string().optional(),
|
|
761
|
+
inventoryCriterion: inventoryCriterionSchema.optional(),
|
|
762
|
+
ruleOrder: z.number().optional(),
|
|
763
|
+
});
|
|
764
|
+
export const itemMarkdownStatusSchema = z.object({
|
|
765
|
+
listingPromotionStatus: z.string().optional(),
|
|
766
|
+
timestamp: z.string().optional(),
|
|
767
|
+
});
|
|
768
|
+
export const listingDetailSchema = z.object({
|
|
769
|
+
currentPrice: amountSchema.optional(),
|
|
770
|
+
freeShipping: z.boolean().optional(),
|
|
771
|
+
inventoryReferenceId: z.string().optional(),
|
|
772
|
+
inventoryReferenceType: z.string().optional(),
|
|
773
|
+
listingCategoryId: z.string().optional(),
|
|
774
|
+
listingCondition: z.string().optional(),
|
|
775
|
+
listingConditionId: z.string().optional(),
|
|
776
|
+
listingId: z.string().optional(),
|
|
777
|
+
listingPromotionStatuses: z.array(itemMarkdownStatusSchema).optional(),
|
|
778
|
+
quantity: z.number().optional(),
|
|
779
|
+
storeCategoryId: z.string().optional(),
|
|
780
|
+
title: z.string().optional(),
|
|
781
|
+
});
|
|
782
|
+
export const itemsPagedCollectionSchema = z.object({
|
|
783
|
+
href: z.string().optional(),
|
|
784
|
+
limit: z.number().optional(),
|
|
785
|
+
listings: z.array(listingDetailSchema).optional(),
|
|
786
|
+
next: z.string().optional(),
|
|
787
|
+
offset: z.number().optional(),
|
|
788
|
+
prev: z.string().optional(),
|
|
789
|
+
total: z.number().optional(),
|
|
790
|
+
warnings: z.array(errorSchema).optional(),
|
|
791
|
+
});
|
|
792
|
+
export const promotionsPagedCollectionSchema = z.object({
|
|
793
|
+
href: z.string().optional(),
|
|
794
|
+
limit: z.number().optional(),
|
|
795
|
+
next: z.string().optional(),
|
|
796
|
+
offset: z.number().optional(),
|
|
797
|
+
prev: z.string().optional(),
|
|
798
|
+
promotions: z.array(itemPromotionResponseSchema).optional(),
|
|
799
|
+
total: z.number().optional(),
|
|
800
|
+
});
|
|
801
|
+
export const promotionDetailSchema = z.object({
|
|
802
|
+
description: z.string().optional(),
|
|
803
|
+
endDate: z.string().optional(),
|
|
804
|
+
marketplaceId: z.string().optional(),
|
|
805
|
+
name: z.string().optional(),
|
|
806
|
+
priority: z.string().optional(),
|
|
807
|
+
promotionId: z.string().optional(),
|
|
808
|
+
promotionImageUrl: z.string().optional(),
|
|
809
|
+
promotionStatus: z.string().optional(),
|
|
810
|
+
promotionType: z.string().optional(),
|
|
811
|
+
startDate: z.string().optional(),
|
|
812
|
+
});
|
|
813
|
+
export const promotionReportDetailSchema = z.object({
|
|
814
|
+
averageItemDiscount: amountSchema.optional(),
|
|
815
|
+
averageItemRevenue: amountSchema.optional(),
|
|
816
|
+
averageOrderDiscount: amountSchema.optional(),
|
|
817
|
+
averageOrderRevenue: amountSchema.optional(),
|
|
818
|
+
averageOrderSize: z.string().optional(),
|
|
819
|
+
baseSale: amountSchema.optional(),
|
|
820
|
+
clicksToPromotion: z.number().optional(),
|
|
821
|
+
impressionsToPromotion: z.number().optional(),
|
|
822
|
+
numberOfItemsSoldInPromotion: z.number().optional(),
|
|
823
|
+
numberOfOrdersWithPromotion: z.number().optional(),
|
|
824
|
+
percentageSalesLift: z.string().optional(),
|
|
825
|
+
promotionHref: z.string().optional(),
|
|
826
|
+
promotionId: z.string().optional(),
|
|
827
|
+
promotionReportId: z.string().optional(),
|
|
828
|
+
promotionSale: amountSchema.optional(),
|
|
829
|
+
totalDiscount: amountSchema.optional(),
|
|
830
|
+
totalSale: amountSchema.optional(),
|
|
831
|
+
});
|
|
832
|
+
export const promotionsReportPagedCollectionSchema = z.object({
|
|
833
|
+
href: z.string().optional(),
|
|
834
|
+
limit: z.number().optional(),
|
|
835
|
+
next: z.string().optional(),
|
|
836
|
+
offset: z.number().optional(),
|
|
837
|
+
prev: z.string().optional(),
|
|
838
|
+
promotionReports: z.array(promotionReportDetailSchema).optional(),
|
|
839
|
+
total: z.number().optional(),
|
|
840
|
+
});
|
|
841
|
+
// Item Price Markdown Schemas
|
|
842
|
+
export const itemBasisSchema = z.object({
|
|
843
|
+
itemIds: z.array(z.string()).optional(),
|
|
844
|
+
priceRange: priceRangeSchema.optional(),
|
|
845
|
+
});
|
|
846
|
+
export const itemPriceMarkdownSchema = z.object({
|
|
847
|
+
applyFreeShipping: z.boolean().optional(),
|
|
848
|
+
autoSelectFutureInventory: z.boolean().optional(),
|
|
849
|
+
blockPriceIncreaseInItemRevision: z.boolean().optional(),
|
|
850
|
+
description: z.string().optional(),
|
|
851
|
+
endDate: z.string().optional(),
|
|
852
|
+
marketplaceId: z.string().optional(),
|
|
853
|
+
name: z.string().optional(),
|
|
854
|
+
priority: z.string().optional(),
|
|
855
|
+
promotionImageUrl: z.string().optional(),
|
|
856
|
+
promotionStatus: z.string().optional(),
|
|
857
|
+
selectedInventoryDiscounts: z.array(selectedInventoryDiscountSchema).optional(),
|
|
858
|
+
startDate: z.string().optional(),
|
|
859
|
+
});
|
|
860
|
+
// ============================================================================
|
|
861
|
+
// Email Campaign Schemas
|
|
862
|
+
// ============================================================================
|
|
863
|
+
export const campaignAudienceSchema = z.object({
|
|
864
|
+
audienceType: z.string().optional(),
|
|
865
|
+
code: z.string().optional(),
|
|
866
|
+
name: z.string().optional(),
|
|
867
|
+
});
|
|
868
|
+
export const campaignDTOSchema = z.object({
|
|
869
|
+
audiences: z.array(campaignAudienceSchema).optional(),
|
|
870
|
+
creationDate: z.string().optional(),
|
|
871
|
+
emailCampaignId: z.string().optional(),
|
|
872
|
+
emailCampaignStatus: z.string().optional(),
|
|
873
|
+
emailCampaignType: z.string().optional(),
|
|
874
|
+
marketplaceId: z.string().optional(),
|
|
875
|
+
modificationDate: z.string().optional(),
|
|
876
|
+
scheduleDate: z.string().optional(),
|
|
877
|
+
scheduleDateType: z.string().optional(),
|
|
878
|
+
sentDate: z.string().optional(),
|
|
879
|
+
subject: z.string().optional(),
|
|
880
|
+
});
|
|
881
|
+
export const createEmailCampaignRequestSchema = z.object({
|
|
882
|
+
audiences: z.array(campaignAudienceSchema).optional(),
|
|
883
|
+
emailCampaignType: z.string(),
|
|
884
|
+
itemIds: z.array(z.string()).optional(),
|
|
885
|
+
marketplaceId: z.string(),
|
|
886
|
+
scheduleDate: z.string().optional(),
|
|
887
|
+
scheduleDateType: z.string().optional(),
|
|
888
|
+
subject: z.string().optional(),
|
|
889
|
+
});
|
|
890
|
+
export const createEmailCampaignResponseSchema = z.object({
|
|
891
|
+
emailCampaignId: z.string().optional(),
|
|
892
|
+
href: z.string().optional(),
|
|
893
|
+
});
|
|
894
|
+
export const updateEmailCampaignResponseSchema = z.object({
|
|
895
|
+
emailCampaignId: z.string().optional(),
|
|
896
|
+
href: z.string().optional(),
|
|
897
|
+
});
|
|
898
|
+
export const deleteEmailCampaignResponseSchema = z.object({
|
|
899
|
+
emailCampaignId: z.string().optional(),
|
|
900
|
+
});
|
|
901
|
+
export const getEmailCampaignResponseSchema = z.object({
|
|
902
|
+
emailCampaign: campaignDTOSchema.optional(),
|
|
903
|
+
});
|
|
904
|
+
export const getEmailCampaignsResponseSchema = z.object({
|
|
905
|
+
emailCampaigns: z.array(campaignDTOSchema).optional(),
|
|
906
|
+
href: z.string().optional(),
|
|
907
|
+
limit: z.number().optional(),
|
|
908
|
+
next: z.string().optional(),
|
|
909
|
+
offset: z.number().optional(),
|
|
910
|
+
prev: z.string().optional(),
|
|
911
|
+
total: z.number().optional(),
|
|
912
|
+
});
|
|
913
|
+
export const getEmailCampaignAudiencesResponseSchema = z.object({
|
|
914
|
+
audiences: z.array(campaignAudienceSchema).optional(),
|
|
915
|
+
href: z.string().optional(),
|
|
916
|
+
limit: z.number().optional(),
|
|
917
|
+
next: z.string().optional(),
|
|
918
|
+
offset: z.number().optional(),
|
|
919
|
+
prev: z.string().optional(),
|
|
920
|
+
total: z.number().optional(),
|
|
921
|
+
});
|
|
922
|
+
export const getEmailPreviewResponseSchema = z.object({
|
|
923
|
+
emailPreviewHtml: z.string().optional(),
|
|
924
|
+
});
|
|
925
|
+
export const getEmailReportResponseSchema = z.object({
|
|
926
|
+
clickRate: z.string().optional(),
|
|
927
|
+
numberOfClicks: z.number().optional(),
|
|
928
|
+
numberOfOpens: z.number().optional(),
|
|
929
|
+
numberOfRecipients: z.number().optional(),
|
|
930
|
+
numberOfUnsubscribes: z.number().optional(),
|
|
931
|
+
openRate: z.string().optional(),
|
|
932
|
+
unsubscribeRate: z.string().optional(),
|
|
933
|
+
});
|
|
934
|
+
// ============================================================================
|
|
935
|
+
// Recommendation Schemas (from sellRecommendationV1Oas3.ts)
|
|
936
|
+
// ============================================================================
|
|
937
|
+
export const bidPercentagesSchema = z.object({
|
|
938
|
+
basis: z.string().optional(),
|
|
939
|
+
value: z.string().optional(),
|
|
940
|
+
});
|
|
941
|
+
export const adRecommendationSchema = z.object({
|
|
942
|
+
bidPercentages: z.array(bidPercentagesSchema).optional(),
|
|
943
|
+
promoteWithAd: z.string().optional(),
|
|
944
|
+
});
|
|
945
|
+
export const marketingRecommendationSchema = z.object({
|
|
946
|
+
ad: adRecommendationSchema.optional(),
|
|
947
|
+
message: z.string().optional(),
|
|
948
|
+
});
|
|
949
|
+
export const listingRecommendationSchema = z.object({
|
|
950
|
+
listingId: z.string().optional(),
|
|
951
|
+
marketing: marketingRecommendationSchema.optional(),
|
|
952
|
+
});
|
|
953
|
+
export const pagedListingRecommendationCollectionSchema = z.object({
|
|
954
|
+
href: z.string().optional(),
|
|
955
|
+
limit: z.number().optional(),
|
|
956
|
+
listingRecommendations: z.array(listingRecommendationSchema).optional(),
|
|
957
|
+
next: z.string().optional(),
|
|
958
|
+
offset: z.number().optional(),
|
|
959
|
+
prev: z.string().optional(),
|
|
960
|
+
total: z.number().optional(),
|
|
961
|
+
});
|
|
962
|
+
export const findListingRecommendationRequestSchema = z.object({
|
|
963
|
+
listingIds: z.array(z.string()).optional(),
|
|
964
|
+
});
|
|
965
|
+
// Input Schemas for Find Listing Recommendations
|
|
966
|
+
export const findListingRecommendationsInputSchema = z.object({
|
|
967
|
+
filter: z.string().optional()
|
|
968
|
+
.describe('Filter by recommendation types (e.g., recommendationTypes:{AD})'),
|
|
969
|
+
limit: z.string().optional()
|
|
970
|
+
.describe('Maximum number of ads to return per page (default: 10, max: 500)'),
|
|
971
|
+
offset: z.string().optional()
|
|
972
|
+
.describe('Number of ads to skip before returning results (default: 0)'),
|
|
973
|
+
'X-EBAY-C-MARKETPLACE-ID': z.string()
|
|
974
|
+
.describe('eBay marketplace ID where items are listed'),
|
|
975
|
+
body: findListingRecommendationRequestSchema.optional(),
|
|
976
|
+
});
|
|
977
|
+
// ============================================================================
|
|
978
|
+
// Aspect Schema
|
|
979
|
+
// ============================================================================
|
|
980
|
+
export const aspectSchema = z.object({
|
|
981
|
+
aspectValues: z.array(z.string()).optional(),
|
|
982
|
+
localizedAspectName: z.string().optional(),
|
|
983
|
+
});
|
|
984
|
+
// ============================================================================
|
|
985
|
+
// JSON Schema Conversion Functions
|
|
986
|
+
// ============================================================================
|
|
987
|
+
/**
|
|
988
|
+
* Convert Zod schemas to JSON Schema format for MCP tools
|
|
989
|
+
*/
|
|
990
|
+
export function getMarketingJsonSchemas() {
|
|
991
|
+
return {
|
|
992
|
+
// Campaign Management
|
|
993
|
+
getCampaignsOutput: zodToJsonSchema(campaignPagedCollectionResponseSchema, 'getCampaignsOutput'),
|
|
994
|
+
getCampaignDetails: zodToJsonSchema(campaignSchema, 'getCampaignDetails'),
|
|
995
|
+
createCampaignInput: zodToJsonSchema(createCampaignRequestSchema, 'createCampaignInput'),
|
|
996
|
+
createCampaignOutput: zodToJsonSchema(z.object({
|
|
997
|
+
campaignId: z.string().optional(),
|
|
998
|
+
warnings: z.array(errorSchema).optional()
|
|
999
|
+
}), 'createCampaignOutput'),
|
|
1000
|
+
cloneCampaignInput: zodToJsonSchema(cloneCampaignRequestSchema, 'cloneCampaignInput'),
|
|
1001
|
+
updateCampaignInput: zodToJsonSchema(updateCampaignRequestSchema, 'updateCampaignInput'),
|
|
1002
|
+
updateCampaignBudgetInput: zodToJsonSchema(updateCampaignBudgetRequestSchema, 'updateCampaignBudgetInput'),
|
|
1003
|
+
updateBidPercentageInput: zodToJsonSchema(updateBidPercentageRequestSchema, 'updateBidPercentageInput'),
|
|
1004
|
+
// Ad Group Management
|
|
1005
|
+
getAdGroupsOutput: zodToJsonSchema(adGroupPagedCollectionResponseSchema, 'getAdGroupsOutput'),
|
|
1006
|
+
getAdGroupDetails: zodToJsonSchema(adGroupSchema, 'getAdGroupDetails'),
|
|
1007
|
+
createAdGroupInput: zodToJsonSchema(createAdGroupRequestSchema, 'createAdGroupInput'),
|
|
1008
|
+
updateAdGroupInput: zodToJsonSchema(updateAdGroupRequestSchema, 'updateAdGroupInput'),
|
|
1009
|
+
// Ad Operations
|
|
1010
|
+
getAdsOutput: zodToJsonSchema(adPagedCollectionResponseSchema, 'getAdsOutput'),
|
|
1011
|
+
getAdDetails: zodToJsonSchema(adSchema, 'getAdDetails'),
|
|
1012
|
+
createAdInput: zodToJsonSchema(createAdRequestSchema, 'createAdInput'),
|
|
1013
|
+
createAdOutput: zodToJsonSchema(adResponseSchema, 'createAdOutput'),
|
|
1014
|
+
createAdsByInventoryReferenceInput: zodToJsonSchema(createAdsByInventoryReferenceRequestSchema, 'createAdsByInventoryReferenceInput'),
|
|
1015
|
+
createAdsByInventoryReferenceOutput: zodToJsonSchema(createAdsByInventoryReferenceResponseSchema, 'createAdsByInventoryReferenceOutput'),
|
|
1016
|
+
updateAdStatusInput: zodToJsonSchema(updateAdStatusRequestSchema, 'updateAdStatusInput'),
|
|
1017
|
+
bulkCreateAdsInput: zodToJsonSchema(bulkCreateAdRequestSchema, 'bulkCreateAdsInput'),
|
|
1018
|
+
bulkCreateAdsOutput: zodToJsonSchema(bulkAdResponseSchema, 'bulkCreateAdsOutput'),
|
|
1019
|
+
bulkUpdateAdStatusInput: zodToJsonSchema(bulkUpdateAdStatusRequestSchema, 'bulkUpdateAdStatusInput'),
|
|
1020
|
+
bulkDeleteAdsInput: zodToJsonSchema(bulkDeleteAdRequestSchema, 'bulkDeleteAdsInput'),
|
|
1021
|
+
// Keyword Management
|
|
1022
|
+
getKeywordsOutput: zodToJsonSchema(keywordPagedCollectionResponseSchema, 'getKeywordsOutput'),
|
|
1023
|
+
getKeywordDetails: zodToJsonSchema(keywordSchema, 'getKeywordDetails'),
|
|
1024
|
+
createKeywordInput: zodToJsonSchema(createKeywordRequestSchema, 'createKeywordInput'),
|
|
1025
|
+
createKeywordOutput: zodToJsonSchema(keywordResponseSchema, 'createKeywordOutput'),
|
|
1026
|
+
updateKeywordInput: zodToJsonSchema(updateKeywordRequestSchema, 'updateKeywordInput'),
|
|
1027
|
+
bulkCreateKeywordsInput: zodToJsonSchema(bulkCreateKeywordRequestSchema, 'bulkCreateKeywordsInput'),
|
|
1028
|
+
bulkCreateKeywordsOutput: zodToJsonSchema(bulkCreateKeywordResponseSchema, 'bulkCreateKeywordsOutput'),
|
|
1029
|
+
bulkUpdateKeywordsInput: zodToJsonSchema(bulkUpdateKeywordRequestSchema, 'bulkUpdateKeywordsInput'),
|
|
1030
|
+
// Negative Keyword Management
|
|
1031
|
+
getNegativeKeywordsOutput: zodToJsonSchema(negativeKeywordPagedCollectionResponseSchema, 'getNegativeKeywordsOutput'),
|
|
1032
|
+
getNegativeKeywordDetails: zodToJsonSchema(negativeKeywordSchema, 'getNegativeKeywordDetails'),
|
|
1033
|
+
createNegativeKeywordInput: zodToJsonSchema(createNegativeKeywordRequestSchema, 'createNegativeKeywordInput'),
|
|
1034
|
+
createNegativeKeywordOutput: zodToJsonSchema(negativeKeywordResponseSchema, 'createNegativeKeywordOutput'),
|
|
1035
|
+
updateNegativeKeywordInput: zodToJsonSchema(updateNegativeKeywordRequestSchema, 'updateNegativeKeywordInput'),
|
|
1036
|
+
bulkCreateNegativeKeywordsInput: zodToJsonSchema(bulkCreateNegativeKeywordRequestSchema, 'bulkCreateNegativeKeywordsInput'),
|
|
1037
|
+
bulkCreateNegativeKeywordsOutput: zodToJsonSchema(bulkCreateNegativeKeywordResponseSchema, 'bulkCreateNegativeKeywordsOutput'),
|
|
1038
|
+
// Suggestions
|
|
1039
|
+
suggestBidsOutput: zodToJsonSchema(z.object({
|
|
1040
|
+
suggestedBids: z.array(suggestedBidsSchema).optional()
|
|
1041
|
+
}), 'suggestBidsOutput'),
|
|
1042
|
+
suggestKeywordsOutput: zodToJsonSchema(z.object({
|
|
1043
|
+
suggestedKeywords: z.array(suggestedKeywordsSchema).optional()
|
|
1044
|
+
}), 'suggestKeywordsOutput'),
|
|
1045
|
+
suggestBudgetOutput: zodToJsonSchema(suggestBudgetResponseSchema, 'suggestBudgetOutput'),
|
|
1046
|
+
suggestMaxCpcInput: zodToJsonSchema(suggestMaxCpcRequestSchema, 'suggestMaxCpcInput'),
|
|
1047
|
+
suggestMaxCpcOutput: zodToJsonSchema(suggestMaxCpcResponseSchema, 'suggestMaxCpcOutput'),
|
|
1048
|
+
// Reporting
|
|
1049
|
+
getReportMetadataOutput: zodToJsonSchema(reportMetadatasSchema, 'getReportMetadataOutput'),
|
|
1050
|
+
createReportTaskInput: zodToJsonSchema(createReportTaskSchema, 'createReportTaskInput'),
|
|
1051
|
+
createReportTaskOutput: zodToJsonSchema(z.object({
|
|
1052
|
+
reportTaskId: z.string().optional(),
|
|
1053
|
+
href: z.string().optional()
|
|
1054
|
+
}), 'createReportTaskOutput'),
|
|
1055
|
+
getReportTasksOutput: zodToJsonSchema(reportTaskPagedCollectionSchema, 'getReportTasksOutput'),
|
|
1056
|
+
getReportTaskDetails: zodToJsonSchema(reportTaskSchema, 'getReportTaskDetails'),
|
|
1057
|
+
getSummaryReportOutput: zodToJsonSchema(summaryReportResponseSchema, 'getSummaryReportOutput'),
|
|
1058
|
+
// Item Promotions (Discounts)
|
|
1059
|
+
getPromotionsOutput: zodToJsonSchema(promotionsPagedCollectionSchema, 'getPromotionsOutput'),
|
|
1060
|
+
getPromotionDetails: zodToJsonSchema(itemPromotionResponseSchema, 'getPromotionDetails'),
|
|
1061
|
+
createItemPromotionInput: zodToJsonSchema(itemPromotionSchema, 'createItemPromotionInput'),
|
|
1062
|
+
createItemPromotionOutput: zodToJsonSchema(z.object({
|
|
1063
|
+
promotionId: z.string().optional(),
|
|
1064
|
+
href: z.string().optional()
|
|
1065
|
+
}), 'createItemPromotionOutput'),
|
|
1066
|
+
updateItemPromotionInput: zodToJsonSchema(itemPromotionSchema, 'updateItemPromotionInput'),
|
|
1067
|
+
getPromotionListingsOutput: zodToJsonSchema(itemsPagedCollectionSchema, 'getPromotionListingsOutput'),
|
|
1068
|
+
getPromotionReportsOutput: zodToJsonSchema(promotionsReportPagedCollectionSchema, 'getPromotionReportsOutput'),
|
|
1069
|
+
createItemPriceMarkdownInput: zodToJsonSchema(itemPriceMarkdownSchema, 'createItemPriceMarkdownInput'),
|
|
1070
|
+
// Email Campaigns
|
|
1071
|
+
createEmailCampaignInput: zodToJsonSchema(createEmailCampaignRequestSchema, 'createEmailCampaignInput'),
|
|
1072
|
+
createEmailCampaignOutput: zodToJsonSchema(createEmailCampaignResponseSchema, 'createEmailCampaignOutput'),
|
|
1073
|
+
getEmailCampaignsOutput: zodToJsonSchema(getEmailCampaignsResponseSchema, 'getEmailCampaignsOutput'),
|
|
1074
|
+
getEmailCampaignDetails: zodToJsonSchema(getEmailCampaignResponseSchema, 'getEmailCampaignDetails'),
|
|
1075
|
+
getEmailCampaignAudiencesOutput: zodToJsonSchema(getEmailCampaignAudiencesResponseSchema, 'getEmailCampaignAudiencesOutput'),
|
|
1076
|
+
getEmailPreviewOutput: zodToJsonSchema(getEmailPreviewResponseSchema, 'getEmailPreviewOutput'),
|
|
1077
|
+
getEmailReportOutput: zodToJsonSchema(getEmailReportResponseSchema, 'getEmailReportOutput'),
|
|
1078
|
+
// Recommendations
|
|
1079
|
+
findListingRecommendationsInput: zodToJsonSchema(findListingRecommendationsInputSchema, 'findListingRecommendationsInput'),
|
|
1080
|
+
findListingRecommendationsOutput: zodToJsonSchema(pagedListingRecommendationCollectionSchema, 'findListingRecommendationsOutput'),
|
|
1081
|
+
listingRecommendationDetails: zodToJsonSchema(listingRecommendationSchema, 'listingRecommendationDetails'),
|
|
1082
|
+
// Quick Setup
|
|
1083
|
+
quickSetupInput: zodToJsonSchema(quickSetupRequestSchema, 'quickSetupInput'),
|
|
1084
|
+
// Common schemas
|
|
1085
|
+
error: zodToJsonSchema(errorSchema, 'error'),
|
|
1086
|
+
amount: zodToJsonSchema(amountSchema, 'amount'),
|
|
1087
|
+
};
|
|
1088
|
+
}
|