@lehaotech/walmart-mcp 0.5.4
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/.env.example +25 -0
- package/CHANGELOG.md +247 -0
- package/LICENSE +21 -0
- package/README.md +344 -0
- package/build/api/advertising/ad-client.d.ts +24 -0
- package/build/api/advertising/ad-client.js +174 -0
- package/build/api/advertising/advertising-api.d.ts +50 -0
- package/build/api/advertising/advertising-api.js +89 -0
- package/build/api/client.d.ts +19 -0
- package/build/api/client.js +150 -0
- package/build/api/feeds/feeds-api.d.ts +15 -0
- package/build/api/feeds/feeds-api.js +53 -0
- package/build/api/fulfillment/fulfillment-api.d.ts +37 -0
- package/build/api/fulfillment/fulfillment-api.js +81 -0
- package/build/api/index.d.ts +44 -0
- package/build/api/index.js +56 -0
- package/build/api/inventory/inventory-api.d.ts +27 -0
- package/build/api/inventory/inventory-api.js +49 -0
- package/build/api/items/items-api.d.ts +33 -0
- package/build/api/items/items-api.js +67 -0
- package/build/api/notifications/notifications-api.d.ts +14 -0
- package/build/api/notifications/notifications-api.js +33 -0
- package/build/api/orders/orders-api.d.ts +32 -0
- package/build/api/orders/orders-api.js +47 -0
- package/build/api/pricing/pricing-api.d.ts +32 -0
- package/build/api/pricing/pricing-api.js +60 -0
- package/build/api/reports/reports-api.d.ts +37 -0
- package/build/api/reports/reports-api.js +51 -0
- package/build/api/returns/returns-api.d.ts +26 -0
- package/build/api/returns/returns-api.js +37 -0
- package/build/api/settings/settings-api.d.ts +9 -0
- package/build/api/settings/settings-api.js +21 -0
- package/build/auth/oauth.d.ts +16 -0
- package/build/auth/oauth.js +125 -0
- package/build/config/environment.d.ts +22 -0
- package/build/config/environment.js +50 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +180 -0
- package/build/scripts/client-configs.d.ts +36 -0
- package/build/scripts/client-configs.js +132 -0
- package/build/scripts/diagnose.d.ts +15 -0
- package/build/scripts/diagnose.js +320 -0
- package/build/scripts/setup.d.ts +17 -0
- package/build/scripts/setup.js +276 -0
- package/build/tools/definitions/advertising.d.ts +664 -0
- package/build/tools/definitions/advertising.js +315 -0
- package/build/tools/definitions/discovery.d.ts +24 -0
- package/build/tools/definitions/discovery.js +65 -0
- package/build/tools/definitions/feeds.d.ts +46 -0
- package/build/tools/definitions/feeds.js +42 -0
- package/build/tools/definitions/fulfillment.d.ts +1127 -0
- package/build/tools/definitions/fulfillment.js +272 -0
- package/build/tools/definitions/inventory.d.ts +392 -0
- package/build/tools/definitions/inventory.js +182 -0
- package/build/tools/definitions/items.d.ts +447 -0
- package/build/tools/definitions/items.js +223 -0
- package/build/tools/definitions/notifications.d.ts +84 -0
- package/build/tools/definitions/notifications.js +73 -0
- package/build/tools/definitions/orders.d.ts +2659 -0
- package/build/tools/definitions/orders.js +298 -0
- package/build/tools/definitions/pricing.d.ts +724 -0
- package/build/tools/definitions/pricing.js +254 -0
- package/build/tools/definitions/reports.d.ts +223 -0
- package/build/tools/definitions/reports.js +144 -0
- package/build/tools/definitions/returns.d.ts +441 -0
- package/build/tools/definitions/returns.js +126 -0
- package/build/tools/definitions/settings.d.ts +100 -0
- package/build/tools/definitions/settings.js +52 -0
- package/build/tools/definitions/shared-schemas.d.ts +40 -0
- package/build/tools/definitions/shared-schemas.js +47 -0
- package/build/tools/definitions/token-management.d.ts +16 -0
- package/build/tools/definitions/token-management.js +41 -0
- package/build/tools/index.d.ts +6924 -0
- package/build/tools/index.js +379 -0
- package/build/utils/api-error.d.ts +41 -0
- package/build/utils/api-error.js +97 -0
- package/build/utils/endpoint-catalog.d.ts +22 -0
- package/build/utils/endpoint-catalog.js +89 -0
- package/build/utils/env-file.d.ts +12 -0
- package/build/utils/env-file.js +27 -0
- package/build/utils/known-issues.d.ts +29 -0
- package/build/utils/known-issues.js +122 -0
- package/build/utils/logger.d.ts +15 -0
- package/build/utils/logger.js +56 -0
- package/build/utils/rate-limiter.d.ts +51 -0
- package/build/utils/rate-limiter.js +109 -0
- package/package.json +1 -0
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const returnTools: ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
status: z.ZodOptional<z.ZodString>;
|
|
9
|
+
returnCreationStartDate: z.ZodOptional<z.ZodString>;
|
|
10
|
+
returnCreationEndDate: z.ZodOptional<z.ZodString>;
|
|
11
|
+
customerOrderId: z.ZodOptional<z.ZodString>;
|
|
12
|
+
returnOrderId?: undefined;
|
|
13
|
+
approvalData?: undefined;
|
|
14
|
+
rejectionData?: undefined;
|
|
15
|
+
itemId?: undefined;
|
|
16
|
+
refundData?: undefined;
|
|
17
|
+
labelData?: undefined;
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
inputSchema: {
|
|
23
|
+
returnOrderId: z.ZodString;
|
|
24
|
+
limit?: undefined;
|
|
25
|
+
offset?: undefined;
|
|
26
|
+
status?: undefined;
|
|
27
|
+
returnCreationStartDate?: undefined;
|
|
28
|
+
returnCreationEndDate?: undefined;
|
|
29
|
+
customerOrderId?: undefined;
|
|
30
|
+
approvalData?: undefined;
|
|
31
|
+
rejectionData?: undefined;
|
|
32
|
+
itemId?: undefined;
|
|
33
|
+
refundData?: undefined;
|
|
34
|
+
labelData?: undefined;
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
inputSchema: {
|
|
40
|
+
approvalData: z.ZodObject<{
|
|
41
|
+
returnOrderId: z.ZodString;
|
|
42
|
+
returnOrderLines: z.ZodArray<z.ZodObject<{
|
|
43
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
44
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
45
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
46
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
47
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
48
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
49
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
50
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
51
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
52
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
53
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
54
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
55
|
+
}, "strict", z.ZodTypeAny, {
|
|
56
|
+
returnOrderId: string;
|
|
57
|
+
returnOrderLines: z.objectOutputType<{
|
|
58
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
59
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
60
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
61
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
62
|
+
}, {
|
|
63
|
+
returnOrderId: string;
|
|
64
|
+
returnOrderLines: z.objectInputType<{
|
|
65
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
66
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
67
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
68
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
69
|
+
}>;
|
|
70
|
+
limit?: undefined;
|
|
71
|
+
offset?: undefined;
|
|
72
|
+
status?: undefined;
|
|
73
|
+
returnCreationStartDate?: undefined;
|
|
74
|
+
returnCreationEndDate?: undefined;
|
|
75
|
+
customerOrderId?: undefined;
|
|
76
|
+
returnOrderId?: undefined;
|
|
77
|
+
rejectionData?: undefined;
|
|
78
|
+
itemId?: undefined;
|
|
79
|
+
refundData?: undefined;
|
|
80
|
+
labelData?: undefined;
|
|
81
|
+
};
|
|
82
|
+
} | {
|
|
83
|
+
name: string;
|
|
84
|
+
description: string;
|
|
85
|
+
inputSchema: {
|
|
86
|
+
rejectionData: z.ZodObject<{
|
|
87
|
+
returnOrderId: z.ZodString;
|
|
88
|
+
returnOrderLines: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
89
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
90
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
91
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
92
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
93
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
94
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
95
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
96
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
97
|
+
returnOrderLineNumber: z.ZodNumber;
|
|
98
|
+
returnReason: z.ZodOptional<z.ZodString>;
|
|
99
|
+
actionType: z.ZodOptional<z.ZodEnum<["APPROVE", "REJECT", "KEEP_IT"]>>;
|
|
100
|
+
}, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
|
|
101
|
+
rejectionReason: z.ZodString;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
rejectionReason: string;
|
|
104
|
+
}, {
|
|
105
|
+
rejectionReason: string;
|
|
106
|
+
}>>, "many">;
|
|
107
|
+
}, "strict", z.ZodTypeAny, {
|
|
108
|
+
returnOrderId: string;
|
|
109
|
+
returnOrderLines: ({
|
|
110
|
+
returnOrderLineNumber: number;
|
|
111
|
+
returnReason?: string | undefined;
|
|
112
|
+
actionType?: "APPROVE" | "REJECT" | "KEEP_IT" | undefined;
|
|
113
|
+
} & {
|
|
114
|
+
[k: string]: unknown;
|
|
115
|
+
} & {
|
|
116
|
+
rejectionReason: string;
|
|
117
|
+
})[];
|
|
118
|
+
}, {
|
|
119
|
+
returnOrderId: string;
|
|
120
|
+
returnOrderLines: ({
|
|
121
|
+
returnOrderLineNumber: number;
|
|
122
|
+
returnReason?: string | undefined;
|
|
123
|
+
actionType?: "APPROVE" | "REJECT" | "KEEP_IT" | undefined;
|
|
124
|
+
} & {
|
|
125
|
+
[k: string]: unknown;
|
|
126
|
+
} & {
|
|
127
|
+
rejectionReason: string;
|
|
128
|
+
})[];
|
|
129
|
+
}>;
|
|
130
|
+
limit?: undefined;
|
|
131
|
+
offset?: undefined;
|
|
132
|
+
status?: undefined;
|
|
133
|
+
returnCreationStartDate?: undefined;
|
|
134
|
+
returnCreationEndDate?: undefined;
|
|
135
|
+
customerOrderId?: undefined;
|
|
136
|
+
returnOrderId?: undefined;
|
|
137
|
+
approvalData?: undefined;
|
|
138
|
+
itemId?: undefined;
|
|
139
|
+
refundData?: undefined;
|
|
140
|
+
labelData?: undefined;
|
|
141
|
+
};
|
|
142
|
+
} | {
|
|
143
|
+
name: string;
|
|
144
|
+
description: string;
|
|
145
|
+
inputSchema: {
|
|
146
|
+
returnOrderId: z.ZodString;
|
|
147
|
+
itemId: z.ZodString;
|
|
148
|
+
refundData: z.ZodObject<{
|
|
149
|
+
refundReason: z.ZodString;
|
|
150
|
+
chargeRefunds: z.ZodArray<z.ZodObject<{
|
|
151
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
152
|
+
chargeName: z.ZodString;
|
|
153
|
+
chargeAmount: z.ZodObject<{
|
|
154
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
155
|
+
amount: z.ZodNumber;
|
|
156
|
+
}, "strict", z.ZodTypeAny, {
|
|
157
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
158
|
+
amount: number;
|
|
159
|
+
}, {
|
|
160
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
161
|
+
amount: number;
|
|
162
|
+
}>;
|
|
163
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
165
|
+
amount: z.ZodNumber;
|
|
166
|
+
}, "strict", z.ZodTypeAny, {
|
|
167
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
168
|
+
amount: number;
|
|
169
|
+
}, {
|
|
170
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
171
|
+
amount: number;
|
|
172
|
+
}>>;
|
|
173
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
174
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
175
|
+
chargeName: z.ZodString;
|
|
176
|
+
chargeAmount: z.ZodObject<{
|
|
177
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
178
|
+
amount: z.ZodNumber;
|
|
179
|
+
}, "strict", z.ZodTypeAny, {
|
|
180
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
181
|
+
amount: number;
|
|
182
|
+
}, {
|
|
183
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
184
|
+
amount: number;
|
|
185
|
+
}>;
|
|
186
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
188
|
+
amount: z.ZodNumber;
|
|
189
|
+
}, "strict", z.ZodTypeAny, {
|
|
190
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
191
|
+
amount: number;
|
|
192
|
+
}, {
|
|
193
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
194
|
+
amount: number;
|
|
195
|
+
}>>;
|
|
196
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
197
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
198
|
+
chargeName: z.ZodString;
|
|
199
|
+
chargeAmount: z.ZodObject<{
|
|
200
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
201
|
+
amount: z.ZodNumber;
|
|
202
|
+
}, "strict", z.ZodTypeAny, {
|
|
203
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
204
|
+
amount: number;
|
|
205
|
+
}, {
|
|
206
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
207
|
+
amount: number;
|
|
208
|
+
}>;
|
|
209
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
211
|
+
amount: z.ZodNumber;
|
|
212
|
+
}, "strict", z.ZodTypeAny, {
|
|
213
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
214
|
+
amount: number;
|
|
215
|
+
}, {
|
|
216
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
217
|
+
amount: number;
|
|
218
|
+
}>>;
|
|
219
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
220
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
222
|
+
refundReason: z.ZodString;
|
|
223
|
+
chargeRefunds: z.ZodArray<z.ZodObject<{
|
|
224
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
225
|
+
chargeName: z.ZodString;
|
|
226
|
+
chargeAmount: z.ZodObject<{
|
|
227
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
228
|
+
amount: z.ZodNumber;
|
|
229
|
+
}, "strict", z.ZodTypeAny, {
|
|
230
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
231
|
+
amount: number;
|
|
232
|
+
}, {
|
|
233
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
234
|
+
amount: number;
|
|
235
|
+
}>;
|
|
236
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
238
|
+
amount: z.ZodNumber;
|
|
239
|
+
}, "strict", z.ZodTypeAny, {
|
|
240
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
241
|
+
amount: number;
|
|
242
|
+
}, {
|
|
243
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
244
|
+
amount: number;
|
|
245
|
+
}>>;
|
|
246
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
247
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
248
|
+
chargeName: z.ZodString;
|
|
249
|
+
chargeAmount: z.ZodObject<{
|
|
250
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
251
|
+
amount: z.ZodNumber;
|
|
252
|
+
}, "strict", z.ZodTypeAny, {
|
|
253
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
254
|
+
amount: number;
|
|
255
|
+
}, {
|
|
256
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
257
|
+
amount: number;
|
|
258
|
+
}>;
|
|
259
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
260
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
261
|
+
amount: z.ZodNumber;
|
|
262
|
+
}, "strict", z.ZodTypeAny, {
|
|
263
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
264
|
+
amount: number;
|
|
265
|
+
}, {
|
|
266
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
267
|
+
amount: number;
|
|
268
|
+
}>>;
|
|
269
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
270
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
271
|
+
chargeName: z.ZodString;
|
|
272
|
+
chargeAmount: z.ZodObject<{
|
|
273
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
274
|
+
amount: z.ZodNumber;
|
|
275
|
+
}, "strict", z.ZodTypeAny, {
|
|
276
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
277
|
+
amount: number;
|
|
278
|
+
}, {
|
|
279
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
280
|
+
amount: number;
|
|
281
|
+
}>;
|
|
282
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
283
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
284
|
+
amount: z.ZodNumber;
|
|
285
|
+
}, "strict", z.ZodTypeAny, {
|
|
286
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
287
|
+
amount: number;
|
|
288
|
+
}, {
|
|
289
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
290
|
+
amount: number;
|
|
291
|
+
}>>;
|
|
292
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
293
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
295
|
+
refundReason: z.ZodString;
|
|
296
|
+
chargeRefunds: z.ZodArray<z.ZodObject<{
|
|
297
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
298
|
+
chargeName: z.ZodString;
|
|
299
|
+
chargeAmount: z.ZodObject<{
|
|
300
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
301
|
+
amount: z.ZodNumber;
|
|
302
|
+
}, "strict", z.ZodTypeAny, {
|
|
303
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
304
|
+
amount: number;
|
|
305
|
+
}, {
|
|
306
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
307
|
+
amount: number;
|
|
308
|
+
}>;
|
|
309
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
310
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
311
|
+
amount: z.ZodNumber;
|
|
312
|
+
}, "strict", z.ZodTypeAny, {
|
|
313
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
314
|
+
amount: number;
|
|
315
|
+
}, {
|
|
316
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
317
|
+
amount: number;
|
|
318
|
+
}>>;
|
|
319
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
320
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
321
|
+
chargeName: z.ZodString;
|
|
322
|
+
chargeAmount: z.ZodObject<{
|
|
323
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
324
|
+
amount: z.ZodNumber;
|
|
325
|
+
}, "strict", z.ZodTypeAny, {
|
|
326
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
327
|
+
amount: number;
|
|
328
|
+
}, {
|
|
329
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
330
|
+
amount: number;
|
|
331
|
+
}>;
|
|
332
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
334
|
+
amount: z.ZodNumber;
|
|
335
|
+
}, "strict", z.ZodTypeAny, {
|
|
336
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
337
|
+
amount: number;
|
|
338
|
+
}, {
|
|
339
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
340
|
+
amount: number;
|
|
341
|
+
}>>;
|
|
342
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
343
|
+
chargeType: z.ZodEnum<["PRODUCT", "SHIPPING", "TAX", "FEE"]>;
|
|
344
|
+
chargeName: z.ZodString;
|
|
345
|
+
chargeAmount: z.ZodObject<{
|
|
346
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
347
|
+
amount: z.ZodNumber;
|
|
348
|
+
}, "strict", z.ZodTypeAny, {
|
|
349
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
350
|
+
amount: number;
|
|
351
|
+
}, {
|
|
352
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
353
|
+
amount: number;
|
|
354
|
+
}>;
|
|
355
|
+
taxRefundAmount: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
currency: z.ZodEnum<["USD", "MXN", "CAD", "CLP"]>;
|
|
357
|
+
amount: z.ZodNumber;
|
|
358
|
+
}, "strict", z.ZodTypeAny, {
|
|
359
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
360
|
+
amount: number;
|
|
361
|
+
}, {
|
|
362
|
+
currency: "USD" | "MXN" | "CAD" | "CLP";
|
|
363
|
+
amount: number;
|
|
364
|
+
}>>;
|
|
365
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
366
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
367
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
368
|
+
limit?: undefined;
|
|
369
|
+
offset?: undefined;
|
|
370
|
+
status?: undefined;
|
|
371
|
+
returnCreationStartDate?: undefined;
|
|
372
|
+
returnCreationEndDate?: undefined;
|
|
373
|
+
customerOrderId?: undefined;
|
|
374
|
+
approvalData?: undefined;
|
|
375
|
+
rejectionData?: undefined;
|
|
376
|
+
labelData?: undefined;
|
|
377
|
+
};
|
|
378
|
+
} | {
|
|
379
|
+
name: string;
|
|
380
|
+
description: string;
|
|
381
|
+
inputSchema: {
|
|
382
|
+
returnOrderId: z.ZodString;
|
|
383
|
+
itemId: z.ZodString;
|
|
384
|
+
labelData: z.ZodObject<{
|
|
385
|
+
carrierName: z.ZodOptional<z.ZodString>;
|
|
386
|
+
carrierId: z.ZodOptional<z.ZodString>;
|
|
387
|
+
methodCode: z.ZodOptional<z.ZodString>;
|
|
388
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
389
|
+
carrierName: z.ZodOptional<z.ZodString>;
|
|
390
|
+
carrierId: z.ZodOptional<z.ZodString>;
|
|
391
|
+
methodCode: z.ZodOptional<z.ZodString>;
|
|
392
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
393
|
+
carrierName: z.ZodOptional<z.ZodString>;
|
|
394
|
+
carrierId: z.ZodOptional<z.ZodString>;
|
|
395
|
+
methodCode: z.ZodOptional<z.ZodString>;
|
|
396
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
397
|
+
limit?: undefined;
|
|
398
|
+
offset?: undefined;
|
|
399
|
+
status?: undefined;
|
|
400
|
+
returnCreationStartDate?: undefined;
|
|
401
|
+
returnCreationEndDate?: undefined;
|
|
402
|
+
customerOrderId?: undefined;
|
|
403
|
+
approvalData?: undefined;
|
|
404
|
+
rejectionData?: undefined;
|
|
405
|
+
refundData?: undefined;
|
|
406
|
+
};
|
|
407
|
+
} | {
|
|
408
|
+
name: string;
|
|
409
|
+
description: string;
|
|
410
|
+
inputSchema: {
|
|
411
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
413
|
+
status?: undefined;
|
|
414
|
+
returnCreationStartDate?: undefined;
|
|
415
|
+
returnCreationEndDate?: undefined;
|
|
416
|
+
customerOrderId?: undefined;
|
|
417
|
+
returnOrderId?: undefined;
|
|
418
|
+
approvalData?: undefined;
|
|
419
|
+
rejectionData?: undefined;
|
|
420
|
+
itemId?: undefined;
|
|
421
|
+
refundData?: undefined;
|
|
422
|
+
labelData?: undefined;
|
|
423
|
+
};
|
|
424
|
+
} | {
|
|
425
|
+
name: string;
|
|
426
|
+
description: string;
|
|
427
|
+
inputSchema: {
|
|
428
|
+
status: z.ZodOptional<z.ZodString>;
|
|
429
|
+
limit?: undefined;
|
|
430
|
+
offset?: undefined;
|
|
431
|
+
returnCreationStartDate?: undefined;
|
|
432
|
+
returnCreationEndDate?: undefined;
|
|
433
|
+
customerOrderId?: undefined;
|
|
434
|
+
returnOrderId?: undefined;
|
|
435
|
+
approvalData?: undefined;
|
|
436
|
+
rejectionData?: undefined;
|
|
437
|
+
itemId?: undefined;
|
|
438
|
+
refundData?: undefined;
|
|
439
|
+
labelData?: undefined;
|
|
440
|
+
};
|
|
441
|
+
})[];
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SkuSchema, MoneySchema } from './shared-schemas.js';
|
|
3
|
+
// Walmart return line — used in approve/reject body.
|
|
4
|
+
// Each entry references one return order line.
|
|
5
|
+
const ReturnOrderLineSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
returnOrderLineNumber: z.number().int().min(1),
|
|
8
|
+
returnReason: z.string().optional(),
|
|
9
|
+
actionType: z.enum(['APPROVE', 'REJECT', 'KEEP_IT']).optional(),
|
|
10
|
+
})
|
|
11
|
+
.passthrough();
|
|
12
|
+
const ApproveReturnBodySchema = z
|
|
13
|
+
.object({
|
|
14
|
+
returnOrderId: z.string().min(1, 'returnOrderId required'),
|
|
15
|
+
returnOrderLines: z
|
|
16
|
+
.array(ReturnOrderLineSchema)
|
|
17
|
+
.min(1, 'Need at least 1 return order line to approve'),
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
const RejectReturnBodySchema = z
|
|
21
|
+
.object({
|
|
22
|
+
returnOrderId: z.string().min(1, 'returnOrderId required'),
|
|
23
|
+
returnOrderLines: z
|
|
24
|
+
.array(ReturnOrderLineSchema.and(z.object({
|
|
25
|
+
rejectionReason: z.string().min(1, 'rejectionReason required for each line'),
|
|
26
|
+
})))
|
|
27
|
+
.min(1),
|
|
28
|
+
})
|
|
29
|
+
.strict();
|
|
30
|
+
// Refund charges per line.
|
|
31
|
+
const ChargeRefundSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
chargeType: z.enum(['PRODUCT', 'SHIPPING', 'TAX', 'FEE']),
|
|
34
|
+
chargeName: z.string().min(1),
|
|
35
|
+
chargeAmount: MoneySchema,
|
|
36
|
+
taxRefundAmount: MoneySchema.optional(),
|
|
37
|
+
})
|
|
38
|
+
.passthrough();
|
|
39
|
+
const RefundBodySchema = z
|
|
40
|
+
.object({
|
|
41
|
+
refundReason: z.string().min(1, 'refundReason required'),
|
|
42
|
+
chargeRefunds: z
|
|
43
|
+
.array(ChargeRefundSchema)
|
|
44
|
+
.min(1, 'Need at least 1 charge refund entry'),
|
|
45
|
+
sku: SkuSchema.optional(),
|
|
46
|
+
})
|
|
47
|
+
.passthrough();
|
|
48
|
+
// Generate return label body — typically empty or carrier preference.
|
|
49
|
+
const LabelBodySchema = z
|
|
50
|
+
.object({
|
|
51
|
+
carrierName: z.string().optional(),
|
|
52
|
+
carrierId: z.string().optional(),
|
|
53
|
+
methodCode: z.string().optional(),
|
|
54
|
+
})
|
|
55
|
+
.passthrough();
|
|
56
|
+
export const returnTools = [
|
|
57
|
+
{
|
|
58
|
+
name: 'walmart_get_all_returns',
|
|
59
|
+
description: 'Get all returns with optional filters. Returns include status, reason, and refund details.',
|
|
60
|
+
inputSchema: {
|
|
61
|
+
limit: z.number().int().min(1).max(200).optional().describe('Results per page'),
|
|
62
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset'),
|
|
63
|
+
status: z.string().optional().describe('Filter by return status'),
|
|
64
|
+
returnCreationStartDate: z.string().optional().describe('Start date filter (ISO 8601)'),
|
|
65
|
+
returnCreationEndDate: z.string().optional().describe('End date filter (ISO 8601)'),
|
|
66
|
+
customerOrderId: z.string().optional().describe('Filter by customer order ID'),
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'walmart_get_return',
|
|
71
|
+
description: 'Get a single return by return order ID. Returns full details including items, reason, and refund info.',
|
|
72
|
+
inputSchema: {
|
|
73
|
+
returnOrderId: z.string().describe('Return order ID'),
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'walmart_approve_return',
|
|
78
|
+
description: 'Approve a customer return request. Required for seller-fulfilled returns. Body must include ' +
|
|
79
|
+
'returnOrderId and a non-empty returnOrderLines array.',
|
|
80
|
+
inputSchema: {
|
|
81
|
+
approvalData: ApproveReturnBodySchema,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'walmart_reject_return',
|
|
86
|
+
description: 'Reject a customer return request. Each returnOrderLine must include a rejectionReason string.',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
rejectionData: RejectReturnBodySchema,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'walmart_issue_return_refund',
|
|
93
|
+
description: 'Issue a refund for a returned item. refundData requires refundReason and a non-empty ' +
|
|
94
|
+
'chargeRefunds array. Refund amount cannot exceed the original charge.',
|
|
95
|
+
inputSchema: {
|
|
96
|
+
returnOrderId: z.string().describe('Return order ID'),
|
|
97
|
+
itemId: z.string().describe('Return item ID to refund'),
|
|
98
|
+
refundData: RefundBodySchema,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'walmart_generate_return_label',
|
|
103
|
+
description: 'Generate a prepaid return shipping label for a return item.',
|
|
104
|
+
inputSchema: {
|
|
105
|
+
returnOrderId: z.string().describe('Return order ID'),
|
|
106
|
+
itemId: z.string().describe('Return item ID'),
|
|
107
|
+
labelData: LabelBodySchema,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'walmart_get_wfs_returns',
|
|
112
|
+
description: 'Get WFS (Walmart Fulfillment Services) returns by sending GET /v3/returns?isWFSEnabled=Y. ' +
|
|
113
|
+
'For sellers without WFS enrollment, Walmart returns the same set as walmart_get_all_returns.',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
limit: z.number().int().min(1).max(200).optional().describe('Results per page'),
|
|
116
|
+
offset: z.number().int().min(0).optional().describe('Pagination offset'),
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'walmart_get_return_count',
|
|
121
|
+
description: 'Get count of returns grouped by status. Useful for dashboard metrics.',
|
|
122
|
+
inputSchema: {
|
|
123
|
+
status: z.string().optional().describe('Filter by return status'),
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
];
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const settingsTools: ({
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
settingsData?: undefined;
|
|
7
|
+
};
|
|
8
|
+
} | {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
inputSchema: {
|
|
12
|
+
settingsData: z.ZodObject<{
|
|
13
|
+
shippingTemplates: z.ZodArray<z.ZodObject<{
|
|
14
|
+
templateName: z.ZodString;
|
|
15
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
17
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
18
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
21
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
22
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
24
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
25
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
26
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
29
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
30
|
+
templateName: z.ZodString;
|
|
31
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
33
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
34
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
36
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
37
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
38
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
41
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
42
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
45
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
46
|
+
templateName: z.ZodString;
|
|
47
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
49
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
50
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
52
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
53
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
54
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
57
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
58
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
60
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
61
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
62
|
+
}, "strict", z.ZodTypeAny, {
|
|
63
|
+
shippingTemplates: z.objectOutputType<{
|
|
64
|
+
templateName: z.ZodString;
|
|
65
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
67
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
68
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
70
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
71
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
72
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
74
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
75
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
76
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
78
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
79
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
80
|
+
}, {
|
|
81
|
+
shippingTemplates: z.objectInputType<{
|
|
82
|
+
templateName: z.ZodString;
|
|
83
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
methods: z.ZodArray<z.ZodObject<{
|
|
85
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
86
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
88
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
89
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
90
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
93
|
+
methodCode: z.ZodEnum<["Standard", "Expedited", "OneDay", "TwoDay", "Freight", "Value"]>;
|
|
94
|
+
transitTime: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
isActive: z.ZodDefault<z.ZodBoolean>;
|
|
96
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
97
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
98
|
+
}>;
|
|
99
|
+
};
|
|
100
|
+
})[];
|