@epcc-sdk/sdks-cart-checkout-order 0.4.0 → 0.5.1
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/README.md +95 -0
- package/dist/client/mcp-support.gen.cjs +98 -0
- package/dist/client/mcp-support.gen.cjs.map +1 -0
- package/dist/client/mcp-support.gen.mjs +63 -0
- package/dist/client/mcp-support.gen.mjs.map +1 -0
- package/dist/client/mcp.gen.cjs +2426 -0
- package/dist/client/mcp.gen.cjs.map +1 -0
- package/dist/client/mcp.gen.mjs +2497 -0
- package/dist/client/mcp.gen.mjs.map +1 -0
- package/dist/index.d.cts +3 -328
- package/dist/index.d.ts +3 -328
- package/dist/mcp.cjs +23 -0
- package/dist/mcp.cjs.map +1 -0
- package/dist/mcp.d.cts +17247 -0
- package/dist/mcp.d.ts +17247 -0
- package/dist/mcp.mjs +2 -0
- package/dist/mcp.mjs.map +1 -0
- package/dist/types.gen-Boa6zDxY.d.cts +328 -0
- package/dist/types.gen-Boa6zDxY.d.ts +328 -0
- package/package.json +19 -1
|
@@ -0,0 +1,2426 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var mcp_gen_exports = {};
|
|
30
|
+
__export(mcp_gen_exports, {
|
|
31
|
+
addCustomDiscountToCartItemTool: () => addCustomDiscountToCartItemTool,
|
|
32
|
+
addTaxItemToCartItemComponentTool: () => addTaxItemToCartItemComponentTool,
|
|
33
|
+
addTaxItemToCartTool: () => addTaxItemToCartTool,
|
|
34
|
+
anonymizeOrdersTool: () => anonymizeOrdersTool,
|
|
35
|
+
bulkAddCustomDiscountsToCartTool: () => bulkAddCustomDiscountsToCartTool,
|
|
36
|
+
bulkAddTaxItemsToCartTool: () => bulkAddTaxItemsToCartTool,
|
|
37
|
+
bulkDeleteCustomDiscountsFromCartTool: () => bulkDeleteCustomDiscountsFromCartTool,
|
|
38
|
+
bulkDeleteTaxItemsFromCartTool: () => bulkDeleteTaxItemsFromCartTool,
|
|
39
|
+
bulkUpdateItemsInCartTool: () => bulkUpdateItemsInCartTool,
|
|
40
|
+
cancelATransactionTool: () => cancelATransactionTool,
|
|
41
|
+
captureATransactionTool: () => captureATransactionTool,
|
|
42
|
+
checkoutApiTool: () => checkoutApiTool,
|
|
43
|
+
confirmOrderTool: () => confirmOrderTool,
|
|
44
|
+
confirmPaymentTool: () => confirmPaymentTool,
|
|
45
|
+
createACartTool: () => createACartTool,
|
|
46
|
+
createAccountCartAssociationTool: () => createAccountCartAssociationTool,
|
|
47
|
+
createCartPaymentIntentTool: () => createCartPaymentIntentTool,
|
|
48
|
+
createCustomerCartAssociationTool: () => createCustomerCartAssociationTool,
|
|
49
|
+
createOrderShippingGroupTool: () => createOrderShippingGroupTool,
|
|
50
|
+
createShippingGroupTool: () => createShippingGroupTool,
|
|
51
|
+
deleteACartItemTool: () => deleteACartItemTool,
|
|
52
|
+
deleteACartTool: () => deleteACartTool,
|
|
53
|
+
deleteAPromotionViaPromotionCodeTool: () => deleteAPromotionViaPromotionCodeTool,
|
|
54
|
+
deleteATaxItemTool: () => deleteATaxItemTool,
|
|
55
|
+
deleteAccountCartAssociationTool: () => deleteAccountCartAssociationTool,
|
|
56
|
+
deleteAllCartItemsTool: () => deleteAllCartItemsTool,
|
|
57
|
+
deleteCartShippingGroupTool: () => deleteCartShippingGroupTool,
|
|
58
|
+
deleteCustomDiscountFromCartItemTool: () => deleteCustomDiscountFromCartItemTool,
|
|
59
|
+
deleteCustomDiscountFromCartTool: () => deleteCustomDiscountFromCartTool,
|
|
60
|
+
deleteCustomerCartAssociationTool: () => deleteCustomerCartAssociationTool,
|
|
61
|
+
deleteTaxItemFromCartItemComponentTool: () => deleteTaxItemFromCartItemComponentTool,
|
|
62
|
+
getACartTool: () => getACartTool,
|
|
63
|
+
getATransactionTool: () => getATransactionTool,
|
|
64
|
+
getAnOrderTool: () => getAnOrderTool,
|
|
65
|
+
getCartItemsTool: () => getCartItemsTool,
|
|
66
|
+
getCartsTool: () => getCartsTool,
|
|
67
|
+
getCustomerOrdersTool: () => getCustomerOrdersTool,
|
|
68
|
+
getOrderItemsTool: () => getOrderItemsTool,
|
|
69
|
+
getOrderShippingGroupsTool: () => getOrderShippingGroupsTool,
|
|
70
|
+
getOrderTransactionsTool: () => getOrderTransactionsTool,
|
|
71
|
+
getShippingGroupByIdTool: () => getShippingGroupByIdTool,
|
|
72
|
+
getShippingGroupsByIdTool: () => getShippingGroupsByIdTool,
|
|
73
|
+
getShippingGroupsTool: () => getShippingGroupsTool,
|
|
74
|
+
getV2SettingsCartStoreIdTool: () => getV2SettingsCartStoreIdTool,
|
|
75
|
+
getV2SettingsCartTool: () => getV2SettingsCartTool,
|
|
76
|
+
manageCartsTool: () => manageCartsTool,
|
|
77
|
+
paymentSetupTool: () => paymentSetupTool,
|
|
78
|
+
putShippingGroupByIdTool: () => putShippingGroupByIdTool,
|
|
79
|
+
putV2SettingsCartStoreIdTool: () => putV2SettingsCartStoreIdTool,
|
|
80
|
+
putV2SettingsCartTool: () => putV2SettingsCartTool,
|
|
81
|
+
refundATransactionTool: () => refundATransactionTool,
|
|
82
|
+
tools: () => tools,
|
|
83
|
+
updateACartItemTool: () => updateACartItemTool,
|
|
84
|
+
updateACartTool: () => updateACartTool,
|
|
85
|
+
updateATaxItemTool: () => updateATaxItemTool,
|
|
86
|
+
updateAnOrderTool: () => updateAnOrderTool,
|
|
87
|
+
updateCartPaymentIntentTool: () => updateCartPaymentIntentTool,
|
|
88
|
+
updateCustomDiscountForCartItemTool: () => updateCustomDiscountForCartItemTool,
|
|
89
|
+
updateCustomDiscountForCartTool: () => updateCustomDiscountForCartTool,
|
|
90
|
+
updateShippingGroupTool: () => updateShippingGroupTool,
|
|
91
|
+
updateTaxItemFromCartItemComponentTool: () => updateTaxItemFromCartItemComponentTool
|
|
92
|
+
});
|
|
93
|
+
module.exports = __toCommonJS(mcp_gen_exports);
|
|
94
|
+
var z = __toESM(require("zod"), 1);
|
|
95
|
+
var import_mcp_support = require('./mcp-support.gen.cjs');
|
|
96
|
+
var import_sdk = require('./sdk.gen.cjs');
|
|
97
|
+
var import_zod = require('./zod.gen.cjs');
|
|
98
|
+
const getCartsInput = z.object({
|
|
99
|
+
query: import_zod.zGetCartsQuery.strict().optional(),
|
|
100
|
+
headers: import_zod.zGetCartsHeaders.strict().optional()
|
|
101
|
+
}).strict();
|
|
102
|
+
const getCartsTool = (options) => {
|
|
103
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
104
|
+
(0, import_sdk.getCarts)({
|
|
105
|
+
...args,
|
|
106
|
+
client: options?.client,
|
|
107
|
+
signal: extra.signal,
|
|
108
|
+
throwOnError: false
|
|
109
|
+
})
|
|
110
|
+
);
|
|
111
|
+
return {
|
|
112
|
+
name: "cart_checkout_order_get_carts",
|
|
113
|
+
config: {
|
|
114
|
+
title: "Get Carts",
|
|
115
|
+
description: "Lists carts, most recently updated first. Which carts come back depends on the token: a customer token gives that customer's carts, an account token that account's carts, and client credentials all carts or only registered ones, as the show_all_carts cart setting decides. To read one cart, get it by ID.",
|
|
116
|
+
inputSchema: getCartsInput,
|
|
117
|
+
annotations: {
|
|
118
|
+
readOnlyHint: true,
|
|
119
|
+
destructiveHint: false,
|
|
120
|
+
idempotentHint: true,
|
|
121
|
+
openWorldHint: true
|
|
122
|
+
},
|
|
123
|
+
_meta: {
|
|
124
|
+
"com.elasticpath/operation": {
|
|
125
|
+
id: "cart_checkout_order.getCarts",
|
|
126
|
+
method: "GET",
|
|
127
|
+
path: "/v2/carts",
|
|
128
|
+
risk: "read"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
handler
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
const createACartInput = z.object({
|
|
136
|
+
headers: import_zod.zCreateACartHeaders.strict().optional(),
|
|
137
|
+
body: (0, import_mcp_support.loose)(import_zod.zCreateACartBody).optional()
|
|
138
|
+
}).strict();
|
|
139
|
+
const createACartTool = (options) => {
|
|
140
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
141
|
+
(0, import_sdk.createACart)({
|
|
142
|
+
...args,
|
|
143
|
+
client: options?.client,
|
|
144
|
+
signal: extra.signal,
|
|
145
|
+
throwOnError: false
|
|
146
|
+
})
|
|
147
|
+
);
|
|
148
|
+
return {
|
|
149
|
+
name: "cart_checkout_order_create_a_cart",
|
|
150
|
+
config: {
|
|
151
|
+
title: "Create a Cart",
|
|
152
|
+
description: "Creates a new, empty cart. A shopper can have several carts and check each out without affecting the others. It can set a name, custom attributes for promotions, a contact email for a guest cart, and whether custom discounts or deferred inventory checks apply. A cart with a snapshot_date is a promotion preview cart and cannot be checked out.",
|
|
153
|
+
inputSchema: createACartInput,
|
|
154
|
+
annotations: {
|
|
155
|
+
readOnlyHint: false,
|
|
156
|
+
destructiveHint: false,
|
|
157
|
+
idempotentHint: false,
|
|
158
|
+
openWorldHint: true
|
|
159
|
+
},
|
|
160
|
+
_meta: {
|
|
161
|
+
"com.elasticpath/operation": {
|
|
162
|
+
id: "cart_checkout_order.createACart",
|
|
163
|
+
method: "POST",
|
|
164
|
+
path: "/v2/carts",
|
|
165
|
+
risk: "create"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
handler
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
const deleteACartInput = z.object({
|
|
173
|
+
path: import_zod.zDeleteACartPath.strict()
|
|
174
|
+
}).strict();
|
|
175
|
+
const deleteACartTool = (options) => {
|
|
176
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
177
|
+
(0, import_sdk.deleteACart)({
|
|
178
|
+
...args,
|
|
179
|
+
client: options?.client,
|
|
180
|
+
signal: extra.signal,
|
|
181
|
+
throwOnError: false
|
|
182
|
+
})
|
|
183
|
+
);
|
|
184
|
+
return {
|
|
185
|
+
name: "cart_checkout_order_delete_a_cart",
|
|
186
|
+
config: {
|
|
187
|
+
title: "Delete a Cart",
|
|
188
|
+
description: "Deletes a cart with its items, name and description, and removes all its associations. Fails with 400 when it is the last cart associated with a customer. To empty a cart but keep it, delete all its items instead.",
|
|
189
|
+
inputSchema: deleteACartInput,
|
|
190
|
+
annotations: {
|
|
191
|
+
readOnlyHint: false,
|
|
192
|
+
destructiveHint: true,
|
|
193
|
+
idempotentHint: true,
|
|
194
|
+
openWorldHint: true
|
|
195
|
+
},
|
|
196
|
+
_meta: {
|
|
197
|
+
"com.elasticpath/operation": {
|
|
198
|
+
id: "cart_checkout_order.deleteACart",
|
|
199
|
+
method: "DELETE",
|
|
200
|
+
path: "/v2/carts/{cartID}",
|
|
201
|
+
risk: "delete"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
handler
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
const getACartInput = z.object({
|
|
209
|
+
path: import_zod.zGetACartPath.strict(),
|
|
210
|
+
query: import_zod.zGetACartQuery.strict().optional()
|
|
211
|
+
}).strict();
|
|
212
|
+
const getACartTool = (options) => {
|
|
213
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
214
|
+
(0, import_sdk.getACart)({
|
|
215
|
+
...args,
|
|
216
|
+
client: options?.client,
|
|
217
|
+
signal: extra.signal,
|
|
218
|
+
throwOnError: false
|
|
219
|
+
})
|
|
220
|
+
);
|
|
221
|
+
return {
|
|
222
|
+
name: "cart_checkout_order_get_a_cart",
|
|
223
|
+
config: {
|
|
224
|
+
title: "Get a Cart",
|
|
225
|
+
description: "Gets one cart by ID, optionally including its custom discounts or promotions. A cart ID that does not exist creates a new, empty cart instead of returning an error. To list the cart's items, get the cart items.",
|
|
226
|
+
inputSchema: getACartInput,
|
|
227
|
+
annotations: {
|
|
228
|
+
readOnlyHint: true,
|
|
229
|
+
destructiveHint: false,
|
|
230
|
+
idempotentHint: true,
|
|
231
|
+
openWorldHint: true
|
|
232
|
+
},
|
|
233
|
+
_meta: {
|
|
234
|
+
"com.elasticpath/operation": {
|
|
235
|
+
id: "cart_checkout_order.getACart",
|
|
236
|
+
method: "GET",
|
|
237
|
+
path: "/v2/carts/{cartID}",
|
|
238
|
+
risk: "read"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
handler
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
const updateACartInput = z.object({
|
|
246
|
+
path: import_zod.zUpdateACartPath.strict(),
|
|
247
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateACartBody).optional()
|
|
248
|
+
}).strict();
|
|
249
|
+
const updateACartTool = (options) => {
|
|
250
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
251
|
+
(0, import_sdk.updateACart)({
|
|
252
|
+
...args,
|
|
253
|
+
client: options?.client,
|
|
254
|
+
signal: extra.signal,
|
|
255
|
+
throwOnError: false
|
|
256
|
+
})
|
|
257
|
+
);
|
|
258
|
+
return {
|
|
259
|
+
name: "cart_checkout_order_update_a_cart",
|
|
260
|
+
config: {
|
|
261
|
+
title: "Update a Cart",
|
|
262
|
+
description: "Updates one cart's own properties, such as its name, custom attributes, and whether custom discounts or deferred inventory checks apply. It does not change the cart's items; update the cart items for that.",
|
|
263
|
+
inputSchema: updateACartInput,
|
|
264
|
+
annotations: {
|
|
265
|
+
readOnlyHint: false,
|
|
266
|
+
destructiveHint: true,
|
|
267
|
+
idempotentHint: true,
|
|
268
|
+
openWorldHint: true
|
|
269
|
+
},
|
|
270
|
+
_meta: {
|
|
271
|
+
"com.elasticpath/operation": {
|
|
272
|
+
id: "cart_checkout_order.updateACart",
|
|
273
|
+
method: "PUT",
|
|
274
|
+
path: "/v2/carts/{cartID}",
|
|
275
|
+
risk: "update"
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
handler
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
const deleteAllCartItemsInput = z.object({
|
|
283
|
+
path: import_zod.zDeleteAllCartItemsPath.strict()
|
|
284
|
+
}).strict();
|
|
285
|
+
const deleteAllCartItemsTool = (options) => {
|
|
286
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
287
|
+
(0, import_sdk.deleteAllCartItems)({
|
|
288
|
+
...args,
|
|
289
|
+
client: options?.client,
|
|
290
|
+
signal: extra.signal,
|
|
291
|
+
throwOnError: false
|
|
292
|
+
})
|
|
293
|
+
);
|
|
294
|
+
return {
|
|
295
|
+
name: "cart_checkout_order_delete_all_cart_items",
|
|
296
|
+
config: {
|
|
297
|
+
title: "Delete all Cart Items",
|
|
298
|
+
description: "Removes every item from a cart, including custom items and promotions. The cart itself stays, with its ID, name, description and any account or customer associations, and can be filled again. To remove one item, delete that item; to remove the cart too, delete the cart.",
|
|
299
|
+
inputSchema: deleteAllCartItemsInput,
|
|
300
|
+
annotations: {
|
|
301
|
+
readOnlyHint: false,
|
|
302
|
+
destructiveHint: true,
|
|
303
|
+
idempotentHint: true,
|
|
304
|
+
openWorldHint: true
|
|
305
|
+
},
|
|
306
|
+
_meta: {
|
|
307
|
+
"com.elasticpath/operation": {
|
|
308
|
+
id: "cart_checkout_order.deleteAllCartItems",
|
|
309
|
+
method: "DELETE",
|
|
310
|
+
path: "/v2/carts/{cartID}/items",
|
|
311
|
+
risk: "delete"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
handler
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
const getCartItemsInput = z.object({
|
|
319
|
+
path: import_zod.zGetCartItemsPath.strict(),
|
|
320
|
+
query: import_zod.zGetCartItemsQuery.strict().optional()
|
|
321
|
+
}).strict();
|
|
322
|
+
const getCartItemsTool = (options) => {
|
|
323
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
324
|
+
(0, import_sdk.getCartItems)({
|
|
325
|
+
...args,
|
|
326
|
+
client: options?.client,
|
|
327
|
+
signal: extra.signal,
|
|
328
|
+
throwOnError: false
|
|
329
|
+
})
|
|
330
|
+
);
|
|
331
|
+
return {
|
|
332
|
+
name: "cart_checkout_order_get_cart_items",
|
|
333
|
+
config: {
|
|
334
|
+
title: "Get Cart Items",
|
|
335
|
+
description: "Lists the items in a cart, with each item's discounts broken down by promotion and any shipping group IDs. Can include tax items, custom discounts or promotions. Use it when you need the items rather than the cart's own details.",
|
|
336
|
+
inputSchema: getCartItemsInput,
|
|
337
|
+
annotations: {
|
|
338
|
+
readOnlyHint: true,
|
|
339
|
+
destructiveHint: false,
|
|
340
|
+
idempotentHint: true,
|
|
341
|
+
openWorldHint: true
|
|
342
|
+
},
|
|
343
|
+
_meta: {
|
|
344
|
+
"com.elasticpath/operation": {
|
|
345
|
+
id: "cart_checkout_order.getCartItems",
|
|
346
|
+
method: "GET",
|
|
347
|
+
path: "/v2/carts/{cartID}/items",
|
|
348
|
+
risk: "read"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
handler
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
const manageCartsInput = z.object({
|
|
356
|
+
path: import_zod.zManageCartsPath.strict(),
|
|
357
|
+
body: (0, import_mcp_support.loose)(import_zod.zManageCartsBody).optional()
|
|
358
|
+
}).strict();
|
|
359
|
+
const manageCartsTool = (options) => {
|
|
360
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
361
|
+
(0, import_sdk.manageCarts)({
|
|
362
|
+
...args,
|
|
363
|
+
client: options?.client,
|
|
364
|
+
signal: extra.signal,
|
|
365
|
+
throwOnError: false
|
|
366
|
+
})
|
|
367
|
+
);
|
|
368
|
+
return {
|
|
369
|
+
name: "cart_checkout_order_manage_carts",
|
|
370
|
+
config: {
|
|
371
|
+
title: "Add Items to Cart",
|
|
372
|
+
description: "Adds to a cart: catalog products or bundles by product ID, custom items, subscription items, promotion codes, the items of a previous order (re-order), or the items of another cart (merge). Use it for every kind of addition. To change items already in the cart, update them instead.",
|
|
373
|
+
inputSchema: manageCartsInput,
|
|
374
|
+
annotations: {
|
|
375
|
+
readOnlyHint: false,
|
|
376
|
+
destructiveHint: false,
|
|
377
|
+
idempotentHint: false,
|
|
378
|
+
openWorldHint: true
|
|
379
|
+
},
|
|
380
|
+
_meta: {
|
|
381
|
+
"com.elasticpath/operation": {
|
|
382
|
+
id: "cart_checkout_order.manageCarts",
|
|
383
|
+
method: "POST",
|
|
384
|
+
path: "/v2/carts/{cartID}/items",
|
|
385
|
+
risk: "create"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
handler
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
const bulkUpdateItemsInCartInput = z.object({
|
|
393
|
+
path: import_zod.zBulkUpdateItemsInCartPath.strict(),
|
|
394
|
+
body: (0, import_mcp_support.loose)(import_zod.zBulkUpdateItemsInCartBody).optional()
|
|
395
|
+
}).strict();
|
|
396
|
+
const bulkUpdateItemsInCartTool = (options) => {
|
|
397
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
398
|
+
(0, import_sdk.bulkUpdateItemsInCart)({
|
|
399
|
+
...args,
|
|
400
|
+
client: options?.client,
|
|
401
|
+
signal: extra.signal,
|
|
402
|
+
throwOnError: false
|
|
403
|
+
})
|
|
404
|
+
);
|
|
405
|
+
return {
|
|
406
|
+
name: "cart_checkout_order_bulk_update_items_in_cart",
|
|
407
|
+
config: {
|
|
408
|
+
title: "Bulk Update Items in Cart",
|
|
409
|
+
description: "Updates several existing cart items in one request: their quantity, shipping group or custom inputs. Free gifts for eligible products update automatically. To change a single item, update that item instead.",
|
|
410
|
+
inputSchema: bulkUpdateItemsInCartInput,
|
|
411
|
+
annotations: {
|
|
412
|
+
readOnlyHint: false,
|
|
413
|
+
destructiveHint: true,
|
|
414
|
+
idempotentHint: true,
|
|
415
|
+
openWorldHint: true
|
|
416
|
+
},
|
|
417
|
+
_meta: {
|
|
418
|
+
"com.elasticpath/operation": {
|
|
419
|
+
id: "cart_checkout_order.bulkUpdateItemsInCart",
|
|
420
|
+
method: "PUT",
|
|
421
|
+
path: "/v2/carts/{cartID}/items",
|
|
422
|
+
risk: "update"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
handler
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
const deleteACartItemInput = z.object({
|
|
430
|
+
path: import_zod.zDeleteACartItemPath.strict()
|
|
431
|
+
}).strict();
|
|
432
|
+
const deleteACartItemTool = (options) => {
|
|
433
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
434
|
+
(0, import_sdk.deleteACartItem)({
|
|
435
|
+
...args,
|
|
436
|
+
client: options?.client,
|
|
437
|
+
signal: extra.signal,
|
|
438
|
+
throwOnError: false
|
|
439
|
+
})
|
|
440
|
+
);
|
|
441
|
+
return {
|
|
442
|
+
name: "cart_checkout_order_delete_a_cart_item",
|
|
443
|
+
config: {
|
|
444
|
+
title: "Delete a Cart Item",
|
|
445
|
+
description: "Removes one item from a cart, by cart ID and cart item ID; the rest of the cart stays. To empty the whole cart, delete all its items instead.",
|
|
446
|
+
inputSchema: deleteACartItemInput,
|
|
447
|
+
annotations: {
|
|
448
|
+
readOnlyHint: false,
|
|
449
|
+
destructiveHint: true,
|
|
450
|
+
idempotentHint: true,
|
|
451
|
+
openWorldHint: true
|
|
452
|
+
},
|
|
453
|
+
_meta: {
|
|
454
|
+
"com.elasticpath/operation": {
|
|
455
|
+
id: "cart_checkout_order.deleteACartItem",
|
|
456
|
+
method: "DELETE",
|
|
457
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}",
|
|
458
|
+
risk: "delete"
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
handler
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
const updateACartItemInput = z.object({
|
|
466
|
+
path: import_zod.zUpdateACartItemPath.strict(),
|
|
467
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateACartItemBody).optional()
|
|
468
|
+
}).strict();
|
|
469
|
+
const updateACartItemTool = (options) => {
|
|
470
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
471
|
+
(0, import_sdk.updateACartItem)({
|
|
472
|
+
...args,
|
|
473
|
+
client: options?.client,
|
|
474
|
+
signal: extra.signal,
|
|
475
|
+
throwOnError: false
|
|
476
|
+
})
|
|
477
|
+
);
|
|
478
|
+
return {
|
|
479
|
+
name: "cart_checkout_order_update_a_cart_item",
|
|
480
|
+
config: {
|
|
481
|
+
title: "Update a Cart Item",
|
|
482
|
+
description: "Updates one item in a cart, such as its quantity or custom inputs, by cart ID and cart item ID, and returns the cart's items. To update several items in one request, update them in bulk instead.",
|
|
483
|
+
inputSchema: updateACartItemInput,
|
|
484
|
+
annotations: {
|
|
485
|
+
readOnlyHint: false,
|
|
486
|
+
destructiveHint: true,
|
|
487
|
+
idempotentHint: true,
|
|
488
|
+
openWorldHint: true
|
|
489
|
+
},
|
|
490
|
+
_meta: {
|
|
491
|
+
"com.elasticpath/operation": {
|
|
492
|
+
id: "cart_checkout_order.updateACartItem",
|
|
493
|
+
method: "PUT",
|
|
494
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}",
|
|
495
|
+
risk: "update"
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
handler
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
const deleteAccountCartAssociationInput = z.object({
|
|
503
|
+
path: import_zod.zDeleteAccountCartAssociationPath.strict(),
|
|
504
|
+
headers: import_zod.zDeleteAccountCartAssociationHeaders.strict().optional(),
|
|
505
|
+
body: (0, import_mcp_support.loose)(import_zod.zDeleteAccountCartAssociationBody).optional()
|
|
506
|
+
}).strict();
|
|
507
|
+
const deleteAccountCartAssociationTool = (options) => {
|
|
508
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
509
|
+
(0, import_sdk.deleteAccountCartAssociation)({
|
|
510
|
+
...args,
|
|
511
|
+
client: options?.client,
|
|
512
|
+
signal: extra.signal,
|
|
513
|
+
throwOnError: false
|
|
514
|
+
})
|
|
515
|
+
);
|
|
516
|
+
return {
|
|
517
|
+
name: "cart_checkout_order_delete_account_cart_association",
|
|
518
|
+
config: {
|
|
519
|
+
title: "Delete Account Cart Association",
|
|
520
|
+
description: "Removes the association between a cart and an account, so the account no longer reaches the cart through it. The cart itself is not deleted.",
|
|
521
|
+
inputSchema: deleteAccountCartAssociationInput,
|
|
522
|
+
annotations: {
|
|
523
|
+
readOnlyHint: false,
|
|
524
|
+
destructiveHint: true,
|
|
525
|
+
idempotentHint: true,
|
|
526
|
+
openWorldHint: true
|
|
527
|
+
},
|
|
528
|
+
_meta: {
|
|
529
|
+
"com.elasticpath/operation": {
|
|
530
|
+
id: "cart_checkout_order.deleteAccountCartAssociation",
|
|
531
|
+
method: "DELETE",
|
|
532
|
+
path: "/v2/carts/{cartID}/relationships/accounts",
|
|
533
|
+
risk: "delete"
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
handler
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
const createAccountCartAssociationInput = z.object({
|
|
541
|
+
path: import_zod.zCreateAccountCartAssociationPath.strict(),
|
|
542
|
+
headers: import_zod.zCreateAccountCartAssociationHeaders.strict().optional(),
|
|
543
|
+
body: (0, import_mcp_support.loose)(import_zod.zCreateAccountCartAssociationBody).optional()
|
|
544
|
+
}).strict();
|
|
545
|
+
const createAccountCartAssociationTool = (options) => {
|
|
546
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
547
|
+
(0, import_sdk.createAccountCartAssociation)({
|
|
548
|
+
...args,
|
|
549
|
+
client: options?.client,
|
|
550
|
+
signal: extra.signal,
|
|
551
|
+
throwOnError: false
|
|
552
|
+
})
|
|
553
|
+
);
|
|
554
|
+
return {
|
|
555
|
+
name: "cart_checkout_order_create_account_cart_association",
|
|
556
|
+
config: {
|
|
557
|
+
title: "Create an Account Cart Association",
|
|
558
|
+
description: "Associates a cart with an account, so the account can reach the cart from any device. Use it for an account; for an individual customer, associate the cart with the customer instead.",
|
|
559
|
+
inputSchema: createAccountCartAssociationInput,
|
|
560
|
+
annotations: {
|
|
561
|
+
readOnlyHint: false,
|
|
562
|
+
destructiveHint: false,
|
|
563
|
+
idempotentHint: false,
|
|
564
|
+
openWorldHint: true
|
|
565
|
+
},
|
|
566
|
+
_meta: {
|
|
567
|
+
"com.elasticpath/operation": {
|
|
568
|
+
id: "cart_checkout_order.createAccountCartAssociation",
|
|
569
|
+
method: "POST",
|
|
570
|
+
path: "/v2/carts/{cartID}/relationships/accounts",
|
|
571
|
+
risk: "create"
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
handler
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
const deleteCustomerCartAssociationInput = z.object({
|
|
579
|
+
path: import_zod.zDeleteCustomerCartAssociationPath.strict(),
|
|
580
|
+
headers: import_zod.zDeleteCustomerCartAssociationHeaders.strict().optional(),
|
|
581
|
+
body: (0, import_mcp_support.loose)(import_zod.zDeleteCustomerCartAssociationBody).optional()
|
|
582
|
+
}).strict();
|
|
583
|
+
const deleteCustomerCartAssociationTool = (options) => {
|
|
584
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
585
|
+
(0, import_sdk.deleteCustomerCartAssociation)({
|
|
586
|
+
...args,
|
|
587
|
+
client: options?.client,
|
|
588
|
+
signal: extra.signal,
|
|
589
|
+
throwOnError: false
|
|
590
|
+
})
|
|
591
|
+
);
|
|
592
|
+
return {
|
|
593
|
+
name: "cart_checkout_order_delete_customer_cart_association",
|
|
594
|
+
config: {
|
|
595
|
+
title: "Delete Customer Cart Association",
|
|
596
|
+
description: "Removes the association between a cart and a customer, so the customer no longer reaches the cart through it. The cart itself is not deleted.",
|
|
597
|
+
inputSchema: deleteCustomerCartAssociationInput,
|
|
598
|
+
annotations: {
|
|
599
|
+
readOnlyHint: false,
|
|
600
|
+
destructiveHint: true,
|
|
601
|
+
idempotentHint: true,
|
|
602
|
+
openWorldHint: true
|
|
603
|
+
},
|
|
604
|
+
_meta: {
|
|
605
|
+
"com.elasticpath/operation": {
|
|
606
|
+
id: "cart_checkout_order.deleteCustomerCartAssociation",
|
|
607
|
+
method: "DELETE",
|
|
608
|
+
path: "/v2/carts/{cartID}/relationships/customers",
|
|
609
|
+
risk: "delete"
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
handler
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
const createCustomerCartAssociationInput = z.object({
|
|
617
|
+
path: import_zod.zCreateCustomerCartAssociationPath.strict(),
|
|
618
|
+
headers: import_zod.zCreateCustomerCartAssociationHeaders.strict().optional(),
|
|
619
|
+
body: (0, import_mcp_support.loose)(import_zod.zCreateCustomerCartAssociationBody).optional()
|
|
620
|
+
}).strict();
|
|
621
|
+
const createCustomerCartAssociationTool = (options) => {
|
|
622
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
623
|
+
(0, import_sdk.createCustomerCartAssociation)({
|
|
624
|
+
...args,
|
|
625
|
+
client: options?.client,
|
|
626
|
+
signal: extra.signal,
|
|
627
|
+
throwOnError: false
|
|
628
|
+
})
|
|
629
|
+
);
|
|
630
|
+
return {
|
|
631
|
+
name: "cart_checkout_order_create_customer_cart_association",
|
|
632
|
+
config: {
|
|
633
|
+
title: "Create a Customer Cart Association",
|
|
634
|
+
description: "Associates a cart with a customer, so the customer can reach the cart from any device. Use it for an individual customer; for an account, associate the cart with the account instead.",
|
|
635
|
+
inputSchema: createCustomerCartAssociationInput,
|
|
636
|
+
annotations: {
|
|
637
|
+
readOnlyHint: false,
|
|
638
|
+
destructiveHint: false,
|
|
639
|
+
idempotentHint: false,
|
|
640
|
+
openWorldHint: true
|
|
641
|
+
},
|
|
642
|
+
_meta: {
|
|
643
|
+
"com.elasticpath/operation": {
|
|
644
|
+
id: "cart_checkout_order.createCustomerCartAssociation",
|
|
645
|
+
method: "POST",
|
|
646
|
+
path: "/v2/carts/{cartID}/relationships/customers",
|
|
647
|
+
risk: "create"
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
handler
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
const deleteAPromotionViaPromotionCodeInput = z.object({
|
|
655
|
+
path: import_zod.zDeleteAPromotionViaPromotionCodePath.strict()
|
|
656
|
+
}).strict();
|
|
657
|
+
const deleteAPromotionViaPromotionCodeTool = (options) => {
|
|
658
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
659
|
+
(0, import_sdk.deleteAPromotionViaPromotionCode)({
|
|
660
|
+
...args,
|
|
661
|
+
client: options?.client,
|
|
662
|
+
signal: extra.signal,
|
|
663
|
+
throwOnError: false
|
|
664
|
+
})
|
|
665
|
+
);
|
|
666
|
+
return {
|
|
667
|
+
name: "cart_checkout_order_delete_a_promotion_via_promotion_code",
|
|
668
|
+
config: {
|
|
669
|
+
title: "Delete a Promotion via Promotion Code",
|
|
670
|
+
description: "Removes a promotion code from a cart. Works only for codes applied manually; promotions applied automatically cannot be removed this way.",
|
|
671
|
+
inputSchema: deleteAPromotionViaPromotionCodeInput,
|
|
672
|
+
annotations: {
|
|
673
|
+
readOnlyHint: false,
|
|
674
|
+
destructiveHint: true,
|
|
675
|
+
idempotentHint: true,
|
|
676
|
+
openWorldHint: true
|
|
677
|
+
},
|
|
678
|
+
_meta: {
|
|
679
|
+
"com.elasticpath/operation": {
|
|
680
|
+
id: "cart_checkout_order.deleteAPromotionViaPromotionCode",
|
|
681
|
+
method: "DELETE",
|
|
682
|
+
path: "/v2/carts/{cartID}/discounts/{promoCode}",
|
|
683
|
+
risk: "delete"
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
handler
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
const addTaxItemToCartInput = z.object({
|
|
691
|
+
path: import_zod.zAddTaxItemToCartPath.strict(),
|
|
692
|
+
body: (0, import_mcp_support.loose)(import_zod.zAddTaxItemToCartBody)
|
|
693
|
+
}).strict();
|
|
694
|
+
const addTaxItemToCartTool = (options) => {
|
|
695
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
696
|
+
(0, import_sdk.addTaxItemToCart)({
|
|
697
|
+
...args,
|
|
698
|
+
client: options?.client,
|
|
699
|
+
signal: extra.signal,
|
|
700
|
+
throwOnError: false
|
|
701
|
+
})
|
|
702
|
+
);
|
|
703
|
+
return {
|
|
704
|
+
name: "cart_checkout_order_add_tax_item_to_cart",
|
|
705
|
+
config: {
|
|
706
|
+
title: "Add Tax Item to Cart Item",
|
|
707
|
+
description: "Adds a tax item to one cart item. Use it for a single cart item, not a bundle component or many items at once. A cart item can have up to 5 unique tax items.",
|
|
708
|
+
inputSchema: addTaxItemToCartInput,
|
|
709
|
+
annotations: {
|
|
710
|
+
readOnlyHint: false,
|
|
711
|
+
destructiveHint: false,
|
|
712
|
+
idempotentHint: false,
|
|
713
|
+
openWorldHint: true
|
|
714
|
+
},
|
|
715
|
+
_meta: {
|
|
716
|
+
"com.elasticpath/operation": {
|
|
717
|
+
id: "cart_checkout_order.addTaxItemToCart",
|
|
718
|
+
method: "POST",
|
|
719
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/taxes",
|
|
720
|
+
risk: "create"
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
handler
|
|
725
|
+
};
|
|
726
|
+
};
|
|
727
|
+
const addTaxItemToCartItemComponentInput = z.object({
|
|
728
|
+
path: import_zod.zAddTaxItemToCartItemComponentPath.strict(),
|
|
729
|
+
body: (0, import_mcp_support.loose)(import_zod.zAddTaxItemToCartItemComponentBody)
|
|
730
|
+
}).strict();
|
|
731
|
+
const addTaxItemToCartItemComponentTool = (options) => {
|
|
732
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
733
|
+
(0, import_sdk.addTaxItemToCartItemComponent)({
|
|
734
|
+
...args,
|
|
735
|
+
client: options?.client,
|
|
736
|
+
signal: extra.signal,
|
|
737
|
+
throwOnError: false
|
|
738
|
+
})
|
|
739
|
+
);
|
|
740
|
+
return {
|
|
741
|
+
name: "cart_checkout_order_add_tax_item_to_cart_item_component",
|
|
742
|
+
config: {
|
|
743
|
+
title: "Add Tax Item to Bundle Component",
|
|
744
|
+
description: "Adds a tax item to one bundle component product inside a cart item. Use it only for bundle components; for a whole cart item, add the tax to the item. A component product can have up to 5 unique tax items.",
|
|
745
|
+
inputSchema: addTaxItemToCartItemComponentInput,
|
|
746
|
+
annotations: {
|
|
747
|
+
readOnlyHint: false,
|
|
748
|
+
destructiveHint: false,
|
|
749
|
+
idempotentHint: false,
|
|
750
|
+
openWorldHint: true
|
|
751
|
+
},
|
|
752
|
+
_meta: {
|
|
753
|
+
"com.elasticpath/operation": {
|
|
754
|
+
id: "cart_checkout_order.addTaxItemToCartItemComponent",
|
|
755
|
+
method: "POST",
|
|
756
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes",
|
|
757
|
+
risk: "create"
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
handler
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
const deleteTaxItemFromCartItemComponentInput = z.object({
|
|
765
|
+
path: import_zod.zDeleteTaxItemFromCartItemComponentPath.strict()
|
|
766
|
+
}).strict();
|
|
767
|
+
const deleteTaxItemFromCartItemComponentTool = (options) => {
|
|
768
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
769
|
+
(0, import_sdk.deleteTaxItemFromCartItemComponent)({
|
|
770
|
+
...args,
|
|
771
|
+
client: options?.client,
|
|
772
|
+
signal: extra.signal,
|
|
773
|
+
throwOnError: false
|
|
774
|
+
})
|
|
775
|
+
);
|
|
776
|
+
return {
|
|
777
|
+
name: "cart_checkout_order_delete_tax_item_from_cart_item_component",
|
|
778
|
+
config: {
|
|
779
|
+
title: "Delete Tax Item from Bundle Component",
|
|
780
|
+
description: "Deletes a tax item from one bundle component product inside a cart item. For a tax item on the cart item itself, delete that instead.",
|
|
781
|
+
inputSchema: deleteTaxItemFromCartItemComponentInput,
|
|
782
|
+
annotations: {
|
|
783
|
+
readOnlyHint: false,
|
|
784
|
+
destructiveHint: true,
|
|
785
|
+
idempotentHint: true,
|
|
786
|
+
openWorldHint: true
|
|
787
|
+
},
|
|
788
|
+
_meta: {
|
|
789
|
+
"com.elasticpath/operation": {
|
|
790
|
+
id: "cart_checkout_order.deleteTaxItemFromCartItemComponent",
|
|
791
|
+
method: "DELETE",
|
|
792
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}",
|
|
793
|
+
risk: "delete"
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
handler
|
|
798
|
+
};
|
|
799
|
+
};
|
|
800
|
+
const updateTaxItemFromCartItemComponentInput = z.object({
|
|
801
|
+
path: import_zod.zUpdateTaxItemFromCartItemComponentPath.strict(),
|
|
802
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateTaxItemFromCartItemComponentBody).optional()
|
|
803
|
+
}).strict();
|
|
804
|
+
const updateTaxItemFromCartItemComponentTool = (options) => {
|
|
805
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
806
|
+
(0, import_sdk.updateTaxItemFromCartItemComponent)({
|
|
807
|
+
...args,
|
|
808
|
+
client: options?.client,
|
|
809
|
+
signal: extra.signal,
|
|
810
|
+
throwOnError: false
|
|
811
|
+
})
|
|
812
|
+
);
|
|
813
|
+
return {
|
|
814
|
+
name: "cart_checkout_order_update_tax_item_from_cart_item_component",
|
|
815
|
+
config: {
|
|
816
|
+
title: "Update Tax Item on Bundle Component",
|
|
817
|
+
description: "Updates a tax item on one bundle component product inside a cart item. To switch between rate and amount, set the current one to null and then set the other. For a tax item on the cart item itself, update that instead.",
|
|
818
|
+
inputSchema: updateTaxItemFromCartItemComponentInput,
|
|
819
|
+
annotations: {
|
|
820
|
+
readOnlyHint: false,
|
|
821
|
+
destructiveHint: true,
|
|
822
|
+
idempotentHint: true,
|
|
823
|
+
openWorldHint: true
|
|
824
|
+
},
|
|
825
|
+
_meta: {
|
|
826
|
+
"com.elasticpath/operation": {
|
|
827
|
+
id: "cart_checkout_order.updateTaxItemFromCartItemComponent",
|
|
828
|
+
method: "PUT",
|
|
829
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}",
|
|
830
|
+
risk: "update"
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
handler
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
const bulkDeleteTaxItemsFromCartInput = z.object({
|
|
838
|
+
path: import_zod.zBulkDeleteTaxItemsFromCartPath.strict()
|
|
839
|
+
}).strict();
|
|
840
|
+
const bulkDeleteTaxItemsFromCartTool = (options) => {
|
|
841
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
842
|
+
(0, import_sdk.bulkDeleteTaxItemsFromCart)({
|
|
843
|
+
...args,
|
|
844
|
+
client: options?.client,
|
|
845
|
+
signal: extra.signal,
|
|
846
|
+
throwOnError: false
|
|
847
|
+
})
|
|
848
|
+
);
|
|
849
|
+
return {
|
|
850
|
+
name: "cart_checkout_order_bulk_delete_tax_items_from_cart",
|
|
851
|
+
config: {
|
|
852
|
+
title: "Bulk Delete Tax Items from Cart",
|
|
853
|
+
description: "Deletes every tax item in a cart, from all cart items and all bundle component products. Returns 404 if the cart has no tax items. To remove a single tax item, delete it on its item or component.",
|
|
854
|
+
inputSchema: bulkDeleteTaxItemsFromCartInput,
|
|
855
|
+
annotations: {
|
|
856
|
+
readOnlyHint: false,
|
|
857
|
+
destructiveHint: true,
|
|
858
|
+
idempotentHint: true,
|
|
859
|
+
openWorldHint: true
|
|
860
|
+
},
|
|
861
|
+
_meta: {
|
|
862
|
+
"com.elasticpath/operation": {
|
|
863
|
+
id: "cart_checkout_order.bulkDeleteTaxItemsFromCart",
|
|
864
|
+
method: "DELETE",
|
|
865
|
+
path: "/v2/carts/{cartID}/taxes",
|
|
866
|
+
risk: "delete"
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
handler
|
|
871
|
+
};
|
|
872
|
+
};
|
|
873
|
+
const bulkAddTaxItemsToCartInput = z.object({
|
|
874
|
+
path: import_zod.zBulkAddTaxItemsToCartPath.strict(),
|
|
875
|
+
body: (0, import_mcp_support.loose)(import_zod.zBulkAddTaxItemsToCartBody).optional()
|
|
876
|
+
}).strict();
|
|
877
|
+
const bulkAddTaxItemsToCartTool = (options) => {
|
|
878
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
879
|
+
(0, import_sdk.bulkAddTaxItemsToCart)({
|
|
880
|
+
...args,
|
|
881
|
+
client: options?.client,
|
|
882
|
+
signal: extra.signal,
|
|
883
|
+
throwOnError: false
|
|
884
|
+
})
|
|
885
|
+
);
|
|
886
|
+
return {
|
|
887
|
+
name: "cart_checkout_order_bulk_add_tax_items_to_cart",
|
|
888
|
+
config: {
|
|
889
|
+
title: "Bulk Add Tax Items to Cart",
|
|
890
|
+
description: "Adds tax items to many cart items and bundle component products in one request; a tax item with meta.component_product_id targets a bundle component. Each cart item and each component product can have at most 5 tax items. With add_all_or_nothing set, one failure stops the whole request.",
|
|
891
|
+
inputSchema: bulkAddTaxItemsToCartInput,
|
|
892
|
+
annotations: {
|
|
893
|
+
readOnlyHint: false,
|
|
894
|
+
destructiveHint: false,
|
|
895
|
+
idempotentHint: false,
|
|
896
|
+
openWorldHint: true
|
|
897
|
+
},
|
|
898
|
+
_meta: {
|
|
899
|
+
"com.elasticpath/operation": {
|
|
900
|
+
id: "cart_checkout_order.bulkAddTaxItemsToCart",
|
|
901
|
+
method: "POST",
|
|
902
|
+
path: "/v2/carts/{cartID}/taxes",
|
|
903
|
+
risk: "create"
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
handler
|
|
908
|
+
};
|
|
909
|
+
};
|
|
910
|
+
const deleteATaxItemInput = z.object({
|
|
911
|
+
path: import_zod.zDeleteATaxItemPath.strict()
|
|
912
|
+
}).strict();
|
|
913
|
+
const deleteATaxItemTool = (options) => {
|
|
914
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
915
|
+
(0, import_sdk.deleteATaxItem)({
|
|
916
|
+
...args,
|
|
917
|
+
client: options?.client,
|
|
918
|
+
signal: extra.signal,
|
|
919
|
+
throwOnError: false
|
|
920
|
+
})
|
|
921
|
+
);
|
|
922
|
+
return {
|
|
923
|
+
name: "cart_checkout_order_delete_a_tax_item",
|
|
924
|
+
config: {
|
|
925
|
+
title: "Delete Tax Item from Cart Item",
|
|
926
|
+
description: "Deletes one tax item from a cart item, by tax item ID. For a tax item on a bundle component, delete the component's tax item instead; to remove every tax item in the cart, delete them in bulk.",
|
|
927
|
+
inputSchema: deleteATaxItemInput,
|
|
928
|
+
annotations: {
|
|
929
|
+
readOnlyHint: false,
|
|
930
|
+
destructiveHint: true,
|
|
931
|
+
idempotentHint: true,
|
|
932
|
+
openWorldHint: true
|
|
933
|
+
},
|
|
934
|
+
_meta: {
|
|
935
|
+
"com.elasticpath/operation": {
|
|
936
|
+
id: "cart_checkout_order.deleteATaxItem",
|
|
937
|
+
method: "DELETE",
|
|
938
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}",
|
|
939
|
+
risk: "delete"
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
handler
|
|
944
|
+
};
|
|
945
|
+
};
|
|
946
|
+
const updateATaxItemInput = z.object({
|
|
947
|
+
path: import_zod.zUpdateATaxItemPath.strict(),
|
|
948
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateATaxItemBody).optional()
|
|
949
|
+
}).strict();
|
|
950
|
+
const updateATaxItemTool = (options) => {
|
|
951
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
952
|
+
(0, import_sdk.updateATaxItem)({
|
|
953
|
+
...args,
|
|
954
|
+
client: options?.client,
|
|
955
|
+
signal: extra.signal,
|
|
956
|
+
throwOnError: false
|
|
957
|
+
})
|
|
958
|
+
);
|
|
959
|
+
return {
|
|
960
|
+
name: "cart_checkout_order_update_a_tax_item",
|
|
961
|
+
config: {
|
|
962
|
+
title: "Update Tax Item on Cart Item",
|
|
963
|
+
description: "Updates a tax item on a cart item. To switch between rate and amount, set the current one to null and then set the other. For a tax item on a bundle component, update the component's tax item instead.",
|
|
964
|
+
inputSchema: updateATaxItemInput,
|
|
965
|
+
annotations: {
|
|
966
|
+
readOnlyHint: false,
|
|
967
|
+
destructiveHint: true,
|
|
968
|
+
idempotentHint: true,
|
|
969
|
+
openWorldHint: true
|
|
970
|
+
},
|
|
971
|
+
_meta: {
|
|
972
|
+
"com.elasticpath/operation": {
|
|
973
|
+
id: "cart_checkout_order.updateATaxItem",
|
|
974
|
+
method: "PUT",
|
|
975
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}",
|
|
976
|
+
risk: "update"
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
},
|
|
980
|
+
handler
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
const bulkDeleteCustomDiscountsFromCartInput = z.object({
|
|
984
|
+
path: import_zod.zBulkDeleteCustomDiscountsFromCartPath.strict()
|
|
985
|
+
}).strict();
|
|
986
|
+
const bulkDeleteCustomDiscountsFromCartTool = (options) => {
|
|
987
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
988
|
+
(0, import_sdk.bulkDeleteCustomDiscountsFromCart)({
|
|
989
|
+
...args,
|
|
990
|
+
client: options?.client,
|
|
991
|
+
signal: extra.signal,
|
|
992
|
+
throwOnError: false
|
|
993
|
+
})
|
|
994
|
+
);
|
|
995
|
+
return {
|
|
996
|
+
name: "cart_checkout_order_bulk_delete_custom_discounts_from_cart",
|
|
997
|
+
config: {
|
|
998
|
+
title: "Bulk Delete Custom Discounts From Cart",
|
|
999
|
+
description: "Deletes the custom discounts on a cart in one request. To delete a single custom discount, delete it by ID on the cart or the cart item.",
|
|
1000
|
+
inputSchema: bulkDeleteCustomDiscountsFromCartInput,
|
|
1001
|
+
annotations: {
|
|
1002
|
+
readOnlyHint: false,
|
|
1003
|
+
destructiveHint: true,
|
|
1004
|
+
idempotentHint: true,
|
|
1005
|
+
openWorldHint: true
|
|
1006
|
+
},
|
|
1007
|
+
_meta: {
|
|
1008
|
+
"com.elasticpath/operation": {
|
|
1009
|
+
id: "cart_checkout_order.bulkDeleteCustomDiscountsFromCart",
|
|
1010
|
+
method: "DELETE",
|
|
1011
|
+
path: "/v2/carts/{cartID}/custom-discounts",
|
|
1012
|
+
risk: "delete"
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
handler
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
|
+
const bulkAddCustomDiscountsToCartInput = z.object({
|
|
1020
|
+
path: import_zod.zBulkAddCustomDiscountsToCartPath.strict(),
|
|
1021
|
+
body: (0, import_mcp_support.loose)(import_zod.zBulkAddCustomDiscountsToCartBody).optional()
|
|
1022
|
+
}).strict();
|
|
1023
|
+
const bulkAddCustomDiscountsToCartTool = (options) => {
|
|
1024
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1025
|
+
(0, import_sdk.bulkAddCustomDiscountsToCart)({
|
|
1026
|
+
...args,
|
|
1027
|
+
client: options?.client,
|
|
1028
|
+
signal: extra.signal,
|
|
1029
|
+
throwOnError: false
|
|
1030
|
+
})
|
|
1031
|
+
);
|
|
1032
|
+
return {
|
|
1033
|
+
name: "cart_checkout_order_bulk_add_custom_discounts_to_cart",
|
|
1034
|
+
config: {
|
|
1035
|
+
title: "Bulk Add Custom Discounts to Cart",
|
|
1036
|
+
description: "Adds several custom discounts to a cart in one request. Custom discounts cannot be combined with Elastic Path promotions in the same cart. Unless the store sets another limit, the cart and each cart item can hold at most 5 custom discounts.",
|
|
1037
|
+
inputSchema: bulkAddCustomDiscountsToCartInput,
|
|
1038
|
+
annotations: {
|
|
1039
|
+
readOnlyHint: false,
|
|
1040
|
+
destructiveHint: false,
|
|
1041
|
+
idempotentHint: false,
|
|
1042
|
+
openWorldHint: true
|
|
1043
|
+
},
|
|
1044
|
+
_meta: {
|
|
1045
|
+
"com.elasticpath/operation": {
|
|
1046
|
+
id: "cart_checkout_order.bulkAddCustomDiscountsToCart",
|
|
1047
|
+
method: "POST",
|
|
1048
|
+
path: "/v2/carts/{cartID}/custom-discounts",
|
|
1049
|
+
risk: "create"
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
handler
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
const deleteCustomDiscountFromCartInput = z.object({
|
|
1057
|
+
path: import_zod.zDeleteCustomDiscountFromCartPath.strict()
|
|
1058
|
+
}).strict();
|
|
1059
|
+
const deleteCustomDiscountFromCartTool = (options) => {
|
|
1060
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1061
|
+
(0, import_sdk.deleteCustomDiscountFromCart)({
|
|
1062
|
+
...args,
|
|
1063
|
+
client: options?.client,
|
|
1064
|
+
signal: extra.signal,
|
|
1065
|
+
throwOnError: false
|
|
1066
|
+
})
|
|
1067
|
+
);
|
|
1068
|
+
return {
|
|
1069
|
+
name: "cart_checkout_order_delete_custom_discount_from_cart",
|
|
1070
|
+
config: {
|
|
1071
|
+
title: "Delete Custom Discount From Cart",
|
|
1072
|
+
description: "Deletes one custom discount that applies to the whole cart, by custom discount ID. For a discount on a single cart item, delete the cart item's discount instead.",
|
|
1073
|
+
inputSchema: deleteCustomDiscountFromCartInput,
|
|
1074
|
+
annotations: {
|
|
1075
|
+
readOnlyHint: false,
|
|
1076
|
+
destructiveHint: true,
|
|
1077
|
+
idempotentHint: true,
|
|
1078
|
+
openWorldHint: true
|
|
1079
|
+
},
|
|
1080
|
+
_meta: {
|
|
1081
|
+
"com.elasticpath/operation": {
|
|
1082
|
+
id: "cart_checkout_order.deleteCustomDiscountFromCart",
|
|
1083
|
+
method: "DELETE",
|
|
1084
|
+
path: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}",
|
|
1085
|
+
risk: "delete"
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
},
|
|
1089
|
+
handler
|
|
1090
|
+
};
|
|
1091
|
+
};
|
|
1092
|
+
const updateCustomDiscountForCartInput = z.object({
|
|
1093
|
+
path: import_zod.zUpdateCustomDiscountForCartPath.strict(),
|
|
1094
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateCustomDiscountForCartBody).optional()
|
|
1095
|
+
}).strict();
|
|
1096
|
+
const updateCustomDiscountForCartTool = (options) => {
|
|
1097
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1098
|
+
(0, import_sdk.updateCustomDiscountForCart)({
|
|
1099
|
+
...args,
|
|
1100
|
+
client: options?.client,
|
|
1101
|
+
signal: extra.signal,
|
|
1102
|
+
throwOnError: false
|
|
1103
|
+
})
|
|
1104
|
+
);
|
|
1105
|
+
return {
|
|
1106
|
+
name: "cart_checkout_order_update_custom_discount_for_cart",
|
|
1107
|
+
config: {
|
|
1108
|
+
title: "Update Custom Discount For Cart",
|
|
1109
|
+
description: "Updates one custom discount that applies to the whole cart, by custom discount ID. For a discount on a single cart item, update the cart item's discount instead.",
|
|
1110
|
+
inputSchema: updateCustomDiscountForCartInput,
|
|
1111
|
+
annotations: {
|
|
1112
|
+
readOnlyHint: false,
|
|
1113
|
+
destructiveHint: true,
|
|
1114
|
+
idempotentHint: true,
|
|
1115
|
+
openWorldHint: true
|
|
1116
|
+
},
|
|
1117
|
+
_meta: {
|
|
1118
|
+
"com.elasticpath/operation": {
|
|
1119
|
+
id: "cart_checkout_order.updateCustomDiscountForCart",
|
|
1120
|
+
method: "PUT",
|
|
1121
|
+
path: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}",
|
|
1122
|
+
risk: "update"
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
},
|
|
1126
|
+
handler
|
|
1127
|
+
};
|
|
1128
|
+
};
|
|
1129
|
+
const addCustomDiscountToCartItemInput = z.object({
|
|
1130
|
+
path: import_zod.zAddCustomDiscountToCartItemPath.strict(),
|
|
1131
|
+
body: (0, import_mcp_support.loose)(import_zod.zAddCustomDiscountToCartItemBody).optional()
|
|
1132
|
+
}).strict();
|
|
1133
|
+
const addCustomDiscountToCartItemTool = (options) => {
|
|
1134
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1135
|
+
(0, import_sdk.addCustomDiscountToCartItem)({
|
|
1136
|
+
...args,
|
|
1137
|
+
client: options?.client,
|
|
1138
|
+
signal: extra.signal,
|
|
1139
|
+
throwOnError: false
|
|
1140
|
+
})
|
|
1141
|
+
);
|
|
1142
|
+
return {
|
|
1143
|
+
name: "cart_checkout_order_add_custom_discount_to_cart_item",
|
|
1144
|
+
config: {
|
|
1145
|
+
title: "Add Custom Discount To Cart Item",
|
|
1146
|
+
description: "Adds a custom discount to one cart item. Custom discounts cannot be combined with Elastic Path promotions, so remove any promotions from the cart first. To add several discounts at once, add them to the cart in bulk.",
|
|
1147
|
+
inputSchema: addCustomDiscountToCartItemInput,
|
|
1148
|
+
annotations: {
|
|
1149
|
+
readOnlyHint: false,
|
|
1150
|
+
destructiveHint: false,
|
|
1151
|
+
idempotentHint: false,
|
|
1152
|
+
openWorldHint: true
|
|
1153
|
+
},
|
|
1154
|
+
_meta: {
|
|
1155
|
+
"com.elasticpath/operation": {
|
|
1156
|
+
id: "cart_checkout_order.addCustomDiscountToCartItem",
|
|
1157
|
+
method: "POST",
|
|
1158
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts",
|
|
1159
|
+
risk: "create"
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
handler
|
|
1164
|
+
};
|
|
1165
|
+
};
|
|
1166
|
+
const deleteCustomDiscountFromCartItemInput = z.object({
|
|
1167
|
+
path: import_zod.zDeleteCustomDiscountFromCartItemPath.strict()
|
|
1168
|
+
}).strict();
|
|
1169
|
+
const deleteCustomDiscountFromCartItemTool = (options) => {
|
|
1170
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1171
|
+
(0, import_sdk.deleteCustomDiscountFromCartItem)({
|
|
1172
|
+
...args,
|
|
1173
|
+
client: options?.client,
|
|
1174
|
+
signal: extra.signal,
|
|
1175
|
+
throwOnError: false
|
|
1176
|
+
})
|
|
1177
|
+
);
|
|
1178
|
+
return {
|
|
1179
|
+
name: "cart_checkout_order_delete_custom_discount_from_cart_item",
|
|
1180
|
+
config: {
|
|
1181
|
+
title: "Delete Custom Discount From Cart Item",
|
|
1182
|
+
description: "Deletes one custom discount from a cart item, by custom discount ID. For a discount that applies to the whole cart, delete the cart's discount instead.",
|
|
1183
|
+
inputSchema: deleteCustomDiscountFromCartItemInput,
|
|
1184
|
+
annotations: {
|
|
1185
|
+
readOnlyHint: false,
|
|
1186
|
+
destructiveHint: true,
|
|
1187
|
+
idempotentHint: true,
|
|
1188
|
+
openWorldHint: true
|
|
1189
|
+
},
|
|
1190
|
+
_meta: {
|
|
1191
|
+
"com.elasticpath/operation": {
|
|
1192
|
+
id: "cart_checkout_order.deleteCustomDiscountFromCartItem",
|
|
1193
|
+
method: "DELETE",
|
|
1194
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}",
|
|
1195
|
+
risk: "delete"
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
},
|
|
1199
|
+
handler
|
|
1200
|
+
};
|
|
1201
|
+
};
|
|
1202
|
+
const updateCustomDiscountForCartItemInput = z.object({
|
|
1203
|
+
path: import_zod.zUpdateCustomDiscountForCartItemPath.strict(),
|
|
1204
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateCustomDiscountForCartItemBody).optional()
|
|
1205
|
+
}).strict();
|
|
1206
|
+
const updateCustomDiscountForCartItemTool = (options) => {
|
|
1207
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1208
|
+
(0, import_sdk.updateCustomDiscountForCartItem)({
|
|
1209
|
+
...args,
|
|
1210
|
+
client: options?.client,
|
|
1211
|
+
signal: extra.signal,
|
|
1212
|
+
throwOnError: false
|
|
1213
|
+
})
|
|
1214
|
+
);
|
|
1215
|
+
return {
|
|
1216
|
+
name: "cart_checkout_order_update_custom_discount_for_cart_item",
|
|
1217
|
+
config: {
|
|
1218
|
+
title: "Update Custom Discount For Cart Item",
|
|
1219
|
+
description: "Updates one custom discount on a cart item, by custom discount ID. For a discount that applies to the whole cart, update the cart's discount instead.",
|
|
1220
|
+
inputSchema: updateCustomDiscountForCartItemInput,
|
|
1221
|
+
annotations: {
|
|
1222
|
+
readOnlyHint: false,
|
|
1223
|
+
destructiveHint: true,
|
|
1224
|
+
idempotentHint: true,
|
|
1225
|
+
openWorldHint: true
|
|
1226
|
+
},
|
|
1227
|
+
_meta: {
|
|
1228
|
+
"com.elasticpath/operation": {
|
|
1229
|
+
id: "cart_checkout_order.updateCustomDiscountForCartItem",
|
|
1230
|
+
method: "PUT",
|
|
1231
|
+
path: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}",
|
|
1232
|
+
risk: "update"
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
handler
|
|
1237
|
+
};
|
|
1238
|
+
};
|
|
1239
|
+
const getShippingGroupsInput = z.object({
|
|
1240
|
+
path: import_zod.zGetShippingGroupsPath.strict()
|
|
1241
|
+
}).strict();
|
|
1242
|
+
const getShippingGroupsTool = (options) => {
|
|
1243
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1244
|
+
(0, import_sdk.getShippingGroups)({
|
|
1245
|
+
...args,
|
|
1246
|
+
client: options?.client,
|
|
1247
|
+
signal: extra.signal,
|
|
1248
|
+
throwOnError: false
|
|
1249
|
+
})
|
|
1250
|
+
);
|
|
1251
|
+
return {
|
|
1252
|
+
name: "cart_checkout_order_get_shipping_groups",
|
|
1253
|
+
config: {
|
|
1254
|
+
title: "Retrieve all shipping groups for a cart",
|
|
1255
|
+
description: "Lists the shipping groups on a cart. This is for carts before checkout; an order's shipping groups are read from the order.",
|
|
1256
|
+
inputSchema: getShippingGroupsInput,
|
|
1257
|
+
annotations: {
|
|
1258
|
+
readOnlyHint: true,
|
|
1259
|
+
destructiveHint: false,
|
|
1260
|
+
idempotentHint: true,
|
|
1261
|
+
openWorldHint: true
|
|
1262
|
+
},
|
|
1263
|
+
_meta: {
|
|
1264
|
+
"com.elasticpath/operation": {
|
|
1265
|
+
id: "cart_checkout_order.getShippingGroups",
|
|
1266
|
+
method: "GET",
|
|
1267
|
+
path: "/v2/carts/{cartID}/shipping-groups",
|
|
1268
|
+
risk: "read"
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
},
|
|
1272
|
+
handler
|
|
1273
|
+
};
|
|
1274
|
+
};
|
|
1275
|
+
const createShippingGroupInput = z.object({
|
|
1276
|
+
path: import_zod.zCreateShippingGroupPath.strict(),
|
|
1277
|
+
body: (0, import_mcp_support.loose)(import_zod.zCreateShippingGroupBody)
|
|
1278
|
+
}).strict();
|
|
1279
|
+
const createShippingGroupTool = (options) => {
|
|
1280
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1281
|
+
(0, import_sdk.createShippingGroup)({
|
|
1282
|
+
...args,
|
|
1283
|
+
client: options?.client,
|
|
1284
|
+
signal: extra.signal,
|
|
1285
|
+
throwOnError: false
|
|
1286
|
+
})
|
|
1287
|
+
);
|
|
1288
|
+
return {
|
|
1289
|
+
name: "cart_checkout_order_create_shipping_group",
|
|
1290
|
+
config: {
|
|
1291
|
+
title: "Create a new shipping group for a cart",
|
|
1292
|
+
description: "Creates a shipping group on a cart, which cart items can then be assigned to. This is for carts before checkout; an order has its own shipping groups.",
|
|
1293
|
+
inputSchema: createShippingGroupInput,
|
|
1294
|
+
annotations: {
|
|
1295
|
+
readOnlyHint: false,
|
|
1296
|
+
destructiveHint: false,
|
|
1297
|
+
idempotentHint: false,
|
|
1298
|
+
openWorldHint: true
|
|
1299
|
+
},
|
|
1300
|
+
_meta: {
|
|
1301
|
+
"com.elasticpath/operation": {
|
|
1302
|
+
id: "cart_checkout_order.createShippingGroup",
|
|
1303
|
+
method: "POST",
|
|
1304
|
+
path: "/v2/carts/{cartID}/shipping-groups",
|
|
1305
|
+
risk: "create"
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
},
|
|
1309
|
+
handler
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
const deleteCartShippingGroupInput = z.object({
|
|
1313
|
+
path: import_zod.zDeleteCartShippingGroupPath.strict()
|
|
1314
|
+
}).strict();
|
|
1315
|
+
const deleteCartShippingGroupTool = (options) => {
|
|
1316
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1317
|
+
(0, import_sdk.deleteCartShippingGroup)({
|
|
1318
|
+
...args,
|
|
1319
|
+
client: options?.client,
|
|
1320
|
+
signal: extra.signal,
|
|
1321
|
+
throwOnError: false
|
|
1322
|
+
})
|
|
1323
|
+
);
|
|
1324
|
+
return {
|
|
1325
|
+
name: "cart_checkout_order_delete_cart_shipping_group",
|
|
1326
|
+
config: {
|
|
1327
|
+
title: "Delete Cart Shipping Group",
|
|
1328
|
+
description: "Deletes a shipping group from a cart. It fails while any cart item is attached to the group, so remove the group from those items first. This is for carts only, not orders.",
|
|
1329
|
+
inputSchema: deleteCartShippingGroupInput,
|
|
1330
|
+
annotations: {
|
|
1331
|
+
readOnlyHint: false,
|
|
1332
|
+
destructiveHint: true,
|
|
1333
|
+
idempotentHint: true,
|
|
1334
|
+
openWorldHint: true
|
|
1335
|
+
},
|
|
1336
|
+
_meta: {
|
|
1337
|
+
"com.elasticpath/operation": {
|
|
1338
|
+
id: "cart_checkout_order.deleteCartShippingGroup",
|
|
1339
|
+
method: "DELETE",
|
|
1340
|
+
path: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}",
|
|
1341
|
+
risk: "delete"
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
handler
|
|
1346
|
+
};
|
|
1347
|
+
};
|
|
1348
|
+
const getShippingGroupByIdInput = z.object({
|
|
1349
|
+
path: import_zod.zGetShippingGroupByIdPath.strict()
|
|
1350
|
+
}).strict();
|
|
1351
|
+
const getShippingGroupByIdTool = (options) => {
|
|
1352
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1353
|
+
(0, import_sdk.getShippingGroupById)({
|
|
1354
|
+
...args,
|
|
1355
|
+
client: options?.client,
|
|
1356
|
+
signal: extra.signal,
|
|
1357
|
+
throwOnError: false
|
|
1358
|
+
})
|
|
1359
|
+
);
|
|
1360
|
+
return {
|
|
1361
|
+
name: "cart_checkout_order_get_shipping_group_by_id",
|
|
1362
|
+
config: {
|
|
1363
|
+
title: "Retrieve a specific shipping group for a cart",
|
|
1364
|
+
description: "Gets one shipping group on a cart by its ID. This is for carts before checkout; an order's shipping groups are read from the order.",
|
|
1365
|
+
inputSchema: getShippingGroupByIdInput,
|
|
1366
|
+
annotations: {
|
|
1367
|
+
readOnlyHint: true,
|
|
1368
|
+
destructiveHint: false,
|
|
1369
|
+
idempotentHint: true,
|
|
1370
|
+
openWorldHint: true
|
|
1371
|
+
},
|
|
1372
|
+
_meta: {
|
|
1373
|
+
"com.elasticpath/operation": {
|
|
1374
|
+
id: "cart_checkout_order.getShippingGroupById",
|
|
1375
|
+
method: "GET",
|
|
1376
|
+
path: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}",
|
|
1377
|
+
risk: "read"
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
handler
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
const updateShippingGroupInput = z.object({
|
|
1385
|
+
path: import_zod.zUpdateShippingGroupPath.strict(),
|
|
1386
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateShippingGroupBody)
|
|
1387
|
+
}).strict();
|
|
1388
|
+
const updateShippingGroupTool = (options) => {
|
|
1389
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1390
|
+
(0, import_sdk.updateShippingGroup)({
|
|
1391
|
+
...args,
|
|
1392
|
+
client: options?.client,
|
|
1393
|
+
signal: extra.signal,
|
|
1394
|
+
throwOnError: false
|
|
1395
|
+
})
|
|
1396
|
+
);
|
|
1397
|
+
return {
|
|
1398
|
+
name: "cart_checkout_order_update_shipping_group",
|
|
1399
|
+
config: {
|
|
1400
|
+
title: "Update a shipping group for a cart",
|
|
1401
|
+
description: "Updates one shipping group on a cart. This is for carts before checkout; after checkout, update the shipping group on the order.",
|
|
1402
|
+
inputSchema: updateShippingGroupInput,
|
|
1403
|
+
annotations: {
|
|
1404
|
+
readOnlyHint: false,
|
|
1405
|
+
destructiveHint: true,
|
|
1406
|
+
idempotentHint: true,
|
|
1407
|
+
openWorldHint: true
|
|
1408
|
+
},
|
|
1409
|
+
_meta: {
|
|
1410
|
+
"com.elasticpath/operation": {
|
|
1411
|
+
id: "cart_checkout_order.updateShippingGroup",
|
|
1412
|
+
method: "PUT",
|
|
1413
|
+
path: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}",
|
|
1414
|
+
risk: "update"
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
handler
|
|
1419
|
+
};
|
|
1420
|
+
};
|
|
1421
|
+
const createCartPaymentIntentInput = z.object({
|
|
1422
|
+
path: import_zod.zCreateCartPaymentIntentPath.strict(),
|
|
1423
|
+
body: (0, import_mcp_support.loose)(import_zod.zCreateCartPaymentIntentBody).optional()
|
|
1424
|
+
}).strict();
|
|
1425
|
+
const createCartPaymentIntentTool = (options) => {
|
|
1426
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1427
|
+
(0, import_sdk.createCartPaymentIntent)({
|
|
1428
|
+
...args,
|
|
1429
|
+
client: options?.client,
|
|
1430
|
+
signal: extra.signal,
|
|
1431
|
+
throwOnError: false
|
|
1432
|
+
})
|
|
1433
|
+
);
|
|
1434
|
+
return {
|
|
1435
|
+
name: "cart_checkout_order_create_cart_payment_intent",
|
|
1436
|
+
config: {
|
|
1437
|
+
title: "Create Stripe Payment Intent for a Cart",
|
|
1438
|
+
description: "Creates a Stripe Payment Intent for a cart, linked to the cart and, at checkout, to the order. Use it before checkout when paying through Stripe Payment Intents; after checkout, confirm the order to sync the payment into a transaction. To change an existing intent, update it instead.",
|
|
1439
|
+
inputSchema: createCartPaymentIntentInput,
|
|
1440
|
+
annotations: {
|
|
1441
|
+
readOnlyHint: false,
|
|
1442
|
+
destructiveHint: false,
|
|
1443
|
+
idempotentHint: false,
|
|
1444
|
+
openWorldHint: true
|
|
1445
|
+
},
|
|
1446
|
+
_meta: {
|
|
1447
|
+
"com.elasticpath/operation": {
|
|
1448
|
+
id: "cart_checkout_order.createCartPaymentIntent",
|
|
1449
|
+
method: "POST",
|
|
1450
|
+
path: "/v2/carts/{cartID}/payments",
|
|
1451
|
+
risk: "create"
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
handler
|
|
1456
|
+
};
|
|
1457
|
+
};
|
|
1458
|
+
const updateCartPaymentIntentInput = z.object({
|
|
1459
|
+
path: import_zod.zUpdateCartPaymentIntentPath.strict(),
|
|
1460
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateCartPaymentIntentBody)
|
|
1461
|
+
}).strict();
|
|
1462
|
+
const updateCartPaymentIntentTool = (options) => {
|
|
1463
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1464
|
+
(0, import_sdk.updateCartPaymentIntent)({
|
|
1465
|
+
...args,
|
|
1466
|
+
client: options?.client,
|
|
1467
|
+
signal: extra.signal,
|
|
1468
|
+
throwOnError: false
|
|
1469
|
+
})
|
|
1470
|
+
);
|
|
1471
|
+
return {
|
|
1472
|
+
name: "cart_checkout_order_update_cart_payment_intent",
|
|
1473
|
+
config: {
|
|
1474
|
+
title: "Update a Payment Intent on a Cart",
|
|
1475
|
+
description: "Updates the Stripe Payment Intent on a cart so it matches the final cart details. Call it once when ready to take payment, not after every cart change.",
|
|
1476
|
+
inputSchema: updateCartPaymentIntentInput,
|
|
1477
|
+
annotations: {
|
|
1478
|
+
readOnlyHint: false,
|
|
1479
|
+
destructiveHint: true,
|
|
1480
|
+
idempotentHint: true,
|
|
1481
|
+
openWorldHint: true
|
|
1482
|
+
},
|
|
1483
|
+
_meta: {
|
|
1484
|
+
"com.elasticpath/operation": {
|
|
1485
|
+
id: "cart_checkout_order.updateCartPaymentIntent",
|
|
1486
|
+
method: "PUT",
|
|
1487
|
+
path: "/v2/carts/{cartID}/payments/{paymentIntentID}",
|
|
1488
|
+
risk: "update"
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1492
|
+
handler
|
|
1493
|
+
};
|
|
1494
|
+
};
|
|
1495
|
+
const checkoutApiInput = z.object({
|
|
1496
|
+
path: import_zod.zCheckoutApiPath.strict(),
|
|
1497
|
+
headers: import_zod.zCheckoutApiHeaders.strict().optional(),
|
|
1498
|
+
body: (0, import_mcp_support.loose)(import_zod.zCheckoutApiBody).optional()
|
|
1499
|
+
}).strict();
|
|
1500
|
+
const checkoutApiTool = (options) => {
|
|
1501
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1502
|
+
(0, import_sdk.checkoutApi)({
|
|
1503
|
+
...args,
|
|
1504
|
+
client: options?.client,
|
|
1505
|
+
signal: extra.signal,
|
|
1506
|
+
throwOnError: false
|
|
1507
|
+
})
|
|
1508
|
+
);
|
|
1509
|
+
return {
|
|
1510
|
+
name: "cart_checkout_order_checkout_api",
|
|
1511
|
+
config: {
|
|
1512
|
+
title: "Check Out a Cart",
|
|
1513
|
+
description: "Converts a cart to an unpaid order and returns the order. Check out with a customer ID, a guest customer's name and email, or an account; billing and shipping addresses are optional. The cart remains and can be checked out again. Pay for the order afterwards.",
|
|
1514
|
+
inputSchema: checkoutApiInput,
|
|
1515
|
+
annotations: {
|
|
1516
|
+
readOnlyHint: false,
|
|
1517
|
+
destructiveHint: false,
|
|
1518
|
+
idempotentHint: false,
|
|
1519
|
+
openWorldHint: true
|
|
1520
|
+
},
|
|
1521
|
+
_meta: {
|
|
1522
|
+
"com.elasticpath/operation": {
|
|
1523
|
+
id: "cart_checkout_order.checkoutApi",
|
|
1524
|
+
method: "POST",
|
|
1525
|
+
path: "/v2/carts/{cartID}/checkout",
|
|
1526
|
+
risk: "create"
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
handler
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
const getCustomerOrdersInput = z.object({
|
|
1534
|
+
query: import_zod.zGetCustomerOrdersQuery.strict().optional(),
|
|
1535
|
+
headers: import_zod.zGetCustomerOrdersHeaders.strict().optional()
|
|
1536
|
+
}).strict();
|
|
1537
|
+
const getCustomerOrdersTool = (options) => {
|
|
1538
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1539
|
+
(0, import_sdk.getCustomerOrders)({
|
|
1540
|
+
...args,
|
|
1541
|
+
client: options?.client,
|
|
1542
|
+
signal: extra.signal,
|
|
1543
|
+
throwOnError: false
|
|
1544
|
+
})
|
|
1545
|
+
);
|
|
1546
|
+
return {
|
|
1547
|
+
name: "cart_checkout_order_get_customer_orders",
|
|
1548
|
+
config: {
|
|
1549
|
+
title: "Get all Orders",
|
|
1550
|
+
description: "Lists orders, with optional filters. Paging reaches at most 10,000 orders, so filter to reach orders beyond that. A customer or account token header limits the results to that customer's or account's orders.",
|
|
1551
|
+
inputSchema: getCustomerOrdersInput,
|
|
1552
|
+
annotations: {
|
|
1553
|
+
readOnlyHint: true,
|
|
1554
|
+
destructiveHint: false,
|
|
1555
|
+
idempotentHint: true,
|
|
1556
|
+
openWorldHint: true
|
|
1557
|
+
},
|
|
1558
|
+
_meta: {
|
|
1559
|
+
"com.elasticpath/operation": {
|
|
1560
|
+
id: "cart_checkout_order.getCustomerOrders",
|
|
1561
|
+
method: "GET",
|
|
1562
|
+
path: "/v2/orders",
|
|
1563
|
+
risk: "read"
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
},
|
|
1567
|
+
handler
|
|
1568
|
+
};
|
|
1569
|
+
};
|
|
1570
|
+
const getAnOrderInput = z.object({
|
|
1571
|
+
path: import_zod.zGetAnOrderPath.strict(),
|
|
1572
|
+
query: import_zod.zGetAnOrderQuery.strict().optional()
|
|
1573
|
+
}).strict();
|
|
1574
|
+
const getAnOrderTool = (options) => {
|
|
1575
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1576
|
+
(0, import_sdk.getAnOrder)({
|
|
1577
|
+
...args,
|
|
1578
|
+
client: options?.client,
|
|
1579
|
+
signal: extra.signal,
|
|
1580
|
+
throwOnError: false
|
|
1581
|
+
})
|
|
1582
|
+
);
|
|
1583
|
+
return {
|
|
1584
|
+
name: "cart_checkout_order_get_an_order",
|
|
1585
|
+
config: {
|
|
1586
|
+
title: "Get an Order",
|
|
1587
|
+
description: "Gets one order by ID, optionally including its items, tax items, custom discounts or promotions. To list only the order's items, get the order items.",
|
|
1588
|
+
inputSchema: getAnOrderInput,
|
|
1589
|
+
annotations: {
|
|
1590
|
+
readOnlyHint: true,
|
|
1591
|
+
destructiveHint: false,
|
|
1592
|
+
idempotentHint: true,
|
|
1593
|
+
openWorldHint: true
|
|
1594
|
+
},
|
|
1595
|
+
_meta: {
|
|
1596
|
+
"com.elasticpath/operation": {
|
|
1597
|
+
id: "cart_checkout_order.getAnOrder",
|
|
1598
|
+
method: "GET",
|
|
1599
|
+
path: "/v2/orders/{orderID}",
|
|
1600
|
+
risk: "read"
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
handler
|
|
1605
|
+
};
|
|
1606
|
+
};
|
|
1607
|
+
const updateAnOrderInput = z.object({
|
|
1608
|
+
path: import_zod.zUpdateAnOrderPath.strict(),
|
|
1609
|
+
body: (0, import_mcp_support.loose)(import_zod.zUpdateAnOrderBody).optional()
|
|
1610
|
+
}).strict();
|
|
1611
|
+
const updateAnOrderTool = (options) => {
|
|
1612
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1613
|
+
(0, import_sdk.updateAnOrder)({
|
|
1614
|
+
...args,
|
|
1615
|
+
client: options?.client,
|
|
1616
|
+
signal: extra.signal,
|
|
1617
|
+
throwOnError: false
|
|
1618
|
+
})
|
|
1619
|
+
);
|
|
1620
|
+
return {
|
|
1621
|
+
name: "cart_checkout_order_update_an_order",
|
|
1622
|
+
config: {
|
|
1623
|
+
title: "Update an Order",
|
|
1624
|
+
description: "Updates an order's custom data, shipping, shipping address, status, order number or external reference; everything else on an order is immutable. It can cancel an order that is not fulfilled, or fulfill a paid one. Canceling does not refund.",
|
|
1625
|
+
inputSchema: updateAnOrderInput,
|
|
1626
|
+
annotations: {
|
|
1627
|
+
readOnlyHint: false,
|
|
1628
|
+
destructiveHint: true,
|
|
1629
|
+
idempotentHint: true,
|
|
1630
|
+
openWorldHint: true
|
|
1631
|
+
},
|
|
1632
|
+
_meta: {
|
|
1633
|
+
"com.elasticpath/operation": {
|
|
1634
|
+
id: "cart_checkout_order.updateAnOrder",
|
|
1635
|
+
method: "PUT",
|
|
1636
|
+
path: "/v2/orders/{orderID}",
|
|
1637
|
+
risk: "update"
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
handler
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
1644
|
+
const getOrderItemsInput = z.object({
|
|
1645
|
+
path: import_zod.zGetOrderItemsPath.strict(),
|
|
1646
|
+
query: import_zod.zGetOrderItemsQuery.strict().optional()
|
|
1647
|
+
}).strict();
|
|
1648
|
+
const getOrderItemsTool = (options) => {
|
|
1649
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1650
|
+
(0, import_sdk.getOrderItems)({
|
|
1651
|
+
...args,
|
|
1652
|
+
client: options?.client,
|
|
1653
|
+
signal: extra.signal,
|
|
1654
|
+
throwOnError: false
|
|
1655
|
+
})
|
|
1656
|
+
);
|
|
1657
|
+
return {
|
|
1658
|
+
name: "cart_checkout_order_get_order_items",
|
|
1659
|
+
config: {
|
|
1660
|
+
title: "Get Order Items",
|
|
1661
|
+
description: "Lists the items of one order, optionally including their tax items, custom discounts or promotions. Use it for an order's items; a cart's items are read from the cart.",
|
|
1662
|
+
inputSchema: getOrderItemsInput,
|
|
1663
|
+
annotations: {
|
|
1664
|
+
readOnlyHint: true,
|
|
1665
|
+
destructiveHint: false,
|
|
1666
|
+
idempotentHint: true,
|
|
1667
|
+
openWorldHint: true
|
|
1668
|
+
},
|
|
1669
|
+
_meta: {
|
|
1670
|
+
"com.elasticpath/operation": {
|
|
1671
|
+
id: "cart_checkout_order.getOrderItems",
|
|
1672
|
+
method: "GET",
|
|
1673
|
+
path: "/v2/orders/{orderID}/items",
|
|
1674
|
+
risk: "read"
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
},
|
|
1678
|
+
handler
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
const anonymizeOrdersInput = z.object({
|
|
1682
|
+
body: (0, import_mcp_support.loose)(import_zod.zAnonymizeOrdersBody).optional()
|
|
1683
|
+
}).strict();
|
|
1684
|
+
const anonymizeOrdersTool = (options) => {
|
|
1685
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1686
|
+
(0, import_sdk.anonymizeOrders)({
|
|
1687
|
+
...args,
|
|
1688
|
+
client: options?.client,
|
|
1689
|
+
signal: extra.signal,
|
|
1690
|
+
throwOnError: false
|
|
1691
|
+
})
|
|
1692
|
+
);
|
|
1693
|
+
return {
|
|
1694
|
+
name: "cart_checkout_order_anonymize_orders",
|
|
1695
|
+
config: {
|
|
1696
|
+
title: "Anonymize Orders",
|
|
1697
|
+
description: "Anonymizes orders that are fulfilled, canceled or fully refunded, replacing the customer details and the shipping and billing addresses with *. Orders in other states cannot be anonymized.",
|
|
1698
|
+
inputSchema: anonymizeOrdersInput,
|
|
1699
|
+
annotations: {
|
|
1700
|
+
readOnlyHint: false,
|
|
1701
|
+
destructiveHint: true,
|
|
1702
|
+
idempotentHint: false,
|
|
1703
|
+
openWorldHint: true
|
|
1704
|
+
},
|
|
1705
|
+
_meta: {
|
|
1706
|
+
"com.elasticpath/operation": {
|
|
1707
|
+
id: "cart_checkout_order.anonymizeOrders",
|
|
1708
|
+
method: "POST",
|
|
1709
|
+
path: "/v2/orders/anonymize",
|
|
1710
|
+
risk: "update"
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
handler
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
const confirmOrderInput = z.object({
|
|
1718
|
+
path: import_zod.zConfirmOrderPath.strict()
|
|
1719
|
+
}).strict();
|
|
1720
|
+
const confirmOrderTool = (options) => {
|
|
1721
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1722
|
+
(0, import_sdk.confirmOrder)({
|
|
1723
|
+
...args,
|
|
1724
|
+
client: options?.client,
|
|
1725
|
+
signal: extra.signal,
|
|
1726
|
+
throwOnError: false
|
|
1727
|
+
})
|
|
1728
|
+
);
|
|
1729
|
+
return {
|
|
1730
|
+
name: "cart_checkout_order_confirm_order",
|
|
1731
|
+
config: {
|
|
1732
|
+
title: "Confirm Order",
|
|
1733
|
+
description: "Confirms an order, finalizing it and making it ready for processing. For an order paid through a cart's Stripe Payment Intent, confirming after checkout syncs the intent into a transaction and updates the order's statuses.",
|
|
1734
|
+
inputSchema: confirmOrderInput,
|
|
1735
|
+
annotations: {
|
|
1736
|
+
readOnlyHint: false,
|
|
1737
|
+
destructiveHint: false,
|
|
1738
|
+
idempotentHint: false,
|
|
1739
|
+
openWorldHint: true
|
|
1740
|
+
},
|
|
1741
|
+
_meta: {
|
|
1742
|
+
"com.elasticpath/operation": {
|
|
1743
|
+
id: "cart_checkout_order.confirmOrder",
|
|
1744
|
+
method: "POST",
|
|
1745
|
+
path: "/v2/orders/{orderID}/confirm",
|
|
1746
|
+
risk: "create"
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
handler
|
|
1751
|
+
};
|
|
1752
|
+
};
|
|
1753
|
+
const paymentSetupInput = z.object({
|
|
1754
|
+
path: import_zod.zPaymentSetupPath.strict(),
|
|
1755
|
+
body: (0, import_mcp_support.loose)(import_zod.zPaymentSetupBody).optional()
|
|
1756
|
+
}).strict();
|
|
1757
|
+
const paymentSetupTool = (options) => {
|
|
1758
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1759
|
+
(0, import_sdk.paymentSetup)({
|
|
1760
|
+
...args,
|
|
1761
|
+
client: options?.client,
|
|
1762
|
+
signal: extra.signal,
|
|
1763
|
+
throwOnError: false
|
|
1764
|
+
})
|
|
1765
|
+
);
|
|
1766
|
+
return {
|
|
1767
|
+
name: "cart_checkout_order_payment_setup",
|
|
1768
|
+
config: {
|
|
1769
|
+
title: "Pay for an Order",
|
|
1770
|
+
description: "Starts a payment on an order through a payment gateway. The transaction type depends on the gateway: purchase charges now, authorize holds funds for a later capture, and purchase_setup or authorize_setup only verify the payment method. Split payments are supported.",
|
|
1771
|
+
inputSchema: paymentSetupInput,
|
|
1772
|
+
annotations: {
|
|
1773
|
+
readOnlyHint: false,
|
|
1774
|
+
destructiveHint: false,
|
|
1775
|
+
idempotentHint: false,
|
|
1776
|
+
openWorldHint: true
|
|
1777
|
+
},
|
|
1778
|
+
_meta: {
|
|
1779
|
+
"com.elasticpath/operation": {
|
|
1780
|
+
id: "cart_checkout_order.paymentSetup",
|
|
1781
|
+
method: "POST",
|
|
1782
|
+
path: "/v2/orders/{orderID}/payments",
|
|
1783
|
+
risk: "create"
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
},
|
|
1787
|
+
handler
|
|
1788
|
+
};
|
|
1789
|
+
};
|
|
1790
|
+
const confirmPaymentInput = z.object({
|
|
1791
|
+
path: import_zod.zConfirmPaymentPath.strict(),
|
|
1792
|
+
body: (0, import_mcp_support.loose)(import_zod.zConfirmPaymentBody).optional()
|
|
1793
|
+
}).strict();
|
|
1794
|
+
const confirmPaymentTool = (options) => {
|
|
1795
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1796
|
+
(0, import_sdk.confirmPayment)({
|
|
1797
|
+
...args,
|
|
1798
|
+
client: options?.client,
|
|
1799
|
+
signal: extra.signal,
|
|
1800
|
+
throwOnError: false
|
|
1801
|
+
})
|
|
1802
|
+
);
|
|
1803
|
+
return {
|
|
1804
|
+
name: "cart_checkout_order_confirm_payment",
|
|
1805
|
+
config: {
|
|
1806
|
+
title: "Confirm a Transaction",
|
|
1807
|
+
description: "Confirms a transaction on an order by syncing its details from the third-party payment provider, so Elastic Path reflects the provider's values. For Stripe 3D Secure, call it after the shopper's client-side authentication succeeds.",
|
|
1808
|
+
inputSchema: confirmPaymentInput,
|
|
1809
|
+
annotations: {
|
|
1810
|
+
readOnlyHint: false,
|
|
1811
|
+
destructiveHint: false,
|
|
1812
|
+
idempotentHint: false,
|
|
1813
|
+
openWorldHint: true
|
|
1814
|
+
},
|
|
1815
|
+
_meta: {
|
|
1816
|
+
"com.elasticpath/operation": {
|
|
1817
|
+
id: "cart_checkout_order.confirmPayment",
|
|
1818
|
+
method: "POST",
|
|
1819
|
+
path: "/v2/orders/{orderID}/transactions/{transactionID}/confirm",
|
|
1820
|
+
risk: "create"
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
},
|
|
1824
|
+
handler
|
|
1825
|
+
};
|
|
1826
|
+
};
|
|
1827
|
+
const captureATransactionInput = z.object({
|
|
1828
|
+
path: import_zod.zCaptureATransactionPath.strict(),
|
|
1829
|
+
body: (0, import_mcp_support.loose)(import_zod.zCaptureATransactionBody).optional()
|
|
1830
|
+
}).strict();
|
|
1831
|
+
const captureATransactionTool = (options) => {
|
|
1832
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1833
|
+
(0, import_sdk.captureATransaction)({
|
|
1834
|
+
...args,
|
|
1835
|
+
client: options?.client,
|
|
1836
|
+
signal: extra.signal,
|
|
1837
|
+
throwOnError: false
|
|
1838
|
+
})
|
|
1839
|
+
);
|
|
1840
|
+
return {
|
|
1841
|
+
name: "cart_checkout_order_capture_a_transaction",
|
|
1842
|
+
config: {
|
|
1843
|
+
title: "Capture a Transaction",
|
|
1844
|
+
description: "Captures a payment that was previously authorized on an order transaction. Optionally pass a custom reference, such as the gateway's payment reference. Use it after an authorize payment.",
|
|
1845
|
+
inputSchema: captureATransactionInput,
|
|
1846
|
+
annotations: {
|
|
1847
|
+
readOnlyHint: false,
|
|
1848
|
+
destructiveHint: false,
|
|
1849
|
+
idempotentHint: false,
|
|
1850
|
+
openWorldHint: true
|
|
1851
|
+
},
|
|
1852
|
+
_meta: {
|
|
1853
|
+
"com.elasticpath/operation": {
|
|
1854
|
+
id: "cart_checkout_order.captureATransaction",
|
|
1855
|
+
method: "POST",
|
|
1856
|
+
path: "/v2/orders/{orderID}/transactions/{transactionID}/capture",
|
|
1857
|
+
risk: "create"
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
},
|
|
1861
|
+
handler
|
|
1862
|
+
};
|
|
1863
|
+
};
|
|
1864
|
+
const refundATransactionInput = z.object({
|
|
1865
|
+
path: import_zod.zRefundATransactionPath.strict(),
|
|
1866
|
+
body: (0, import_mcp_support.loose)(import_zod.zRefundATransactionBody).optional()
|
|
1867
|
+
}).strict();
|
|
1868
|
+
const refundATransactionTool = (options) => {
|
|
1869
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1870
|
+
(0, import_sdk.refundATransaction)({
|
|
1871
|
+
...args,
|
|
1872
|
+
client: options?.client,
|
|
1873
|
+
signal: extra.signal,
|
|
1874
|
+
throwOnError: false
|
|
1875
|
+
})
|
|
1876
|
+
);
|
|
1877
|
+
return {
|
|
1878
|
+
name: "cart_checkout_order_refund_a_transaction",
|
|
1879
|
+
config: {
|
|
1880
|
+
title: "Refund a Transaction",
|
|
1881
|
+
description: "Refunds an order transaction. Either mark it refunded after refunding through your own payment provider, which is a full refund, or send a full or partial refund amount to a supported gateway.",
|
|
1882
|
+
inputSchema: refundATransactionInput,
|
|
1883
|
+
annotations: {
|
|
1884
|
+
readOnlyHint: false,
|
|
1885
|
+
destructiveHint: false,
|
|
1886
|
+
idempotentHint: false,
|
|
1887
|
+
openWorldHint: true
|
|
1888
|
+
},
|
|
1889
|
+
_meta: {
|
|
1890
|
+
"com.elasticpath/operation": {
|
|
1891
|
+
id: "cart_checkout_order.refundATransaction",
|
|
1892
|
+
method: "POST",
|
|
1893
|
+
path: "/v2/orders/{orderID}/transactions/{transactionID}/refund",
|
|
1894
|
+
risk: "create"
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
},
|
|
1898
|
+
handler
|
|
1899
|
+
};
|
|
1900
|
+
};
|
|
1901
|
+
const getOrderTransactionsInput = z.object({
|
|
1902
|
+
path: import_zod.zGetOrderTransactionsPath.strict()
|
|
1903
|
+
}).strict();
|
|
1904
|
+
const getOrderTransactionsTool = (options) => {
|
|
1905
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1906
|
+
(0, import_sdk.getOrderTransactions)({
|
|
1907
|
+
...args,
|
|
1908
|
+
client: options?.client,
|
|
1909
|
+
signal: extra.signal,
|
|
1910
|
+
throwOnError: false
|
|
1911
|
+
})
|
|
1912
|
+
);
|
|
1913
|
+
return {
|
|
1914
|
+
name: "cart_checkout_order_get_order_transactions",
|
|
1915
|
+
config: {
|
|
1916
|
+
title: "Get Order Transactions",
|
|
1917
|
+
description: "Lists all payment transactions on one order. Use it to find a transaction ID before confirming, capturing, refunding or canceling it.",
|
|
1918
|
+
inputSchema: getOrderTransactionsInput,
|
|
1919
|
+
annotations: {
|
|
1920
|
+
readOnlyHint: true,
|
|
1921
|
+
destructiveHint: false,
|
|
1922
|
+
idempotentHint: true,
|
|
1923
|
+
openWorldHint: true
|
|
1924
|
+
},
|
|
1925
|
+
_meta: {
|
|
1926
|
+
"com.elasticpath/operation": {
|
|
1927
|
+
id: "cart_checkout_order.getOrderTransactions",
|
|
1928
|
+
method: "GET",
|
|
1929
|
+
path: "/v2/orders/{orderID}/transactions",
|
|
1930
|
+
risk: "read"
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
handler
|
|
1935
|
+
};
|
|
1936
|
+
};
|
|
1937
|
+
const getATransactionInput = z.object({
|
|
1938
|
+
path: import_zod.zGetATransactionPath.strict()
|
|
1939
|
+
}).strict();
|
|
1940
|
+
const getATransactionTool = (options) => {
|
|
1941
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1942
|
+
(0, import_sdk.getATransaction)({
|
|
1943
|
+
...args,
|
|
1944
|
+
client: options?.client,
|
|
1945
|
+
signal: extra.signal,
|
|
1946
|
+
throwOnError: false
|
|
1947
|
+
})
|
|
1948
|
+
);
|
|
1949
|
+
return {
|
|
1950
|
+
name: "cart_checkout_order_get_a_transaction",
|
|
1951
|
+
config: {
|
|
1952
|
+
title: "Get a Transaction",
|
|
1953
|
+
description: "Gets one transaction on an order by its transaction ID. Use it to check a single transaction's status.",
|
|
1954
|
+
inputSchema: getATransactionInput,
|
|
1955
|
+
annotations: {
|
|
1956
|
+
readOnlyHint: true,
|
|
1957
|
+
destructiveHint: false,
|
|
1958
|
+
idempotentHint: true,
|
|
1959
|
+
openWorldHint: true
|
|
1960
|
+
},
|
|
1961
|
+
_meta: {
|
|
1962
|
+
"com.elasticpath/operation": {
|
|
1963
|
+
id: "cart_checkout_order.getATransaction",
|
|
1964
|
+
method: "GET",
|
|
1965
|
+
path: "/v2/orders/{orderID}/transactions/{transactionID}",
|
|
1966
|
+
risk: "read"
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
},
|
|
1970
|
+
handler
|
|
1971
|
+
};
|
|
1972
|
+
};
|
|
1973
|
+
const cancelATransactionInput = z.object({
|
|
1974
|
+
path: import_zod.zCancelATransactionPath.strict(),
|
|
1975
|
+
body: (0, import_mcp_support.loose)(import_zod.zCancelATransactionBody).optional()
|
|
1976
|
+
}).strict();
|
|
1977
|
+
const cancelATransactionTool = (options) => {
|
|
1978
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
1979
|
+
(0, import_sdk.cancelATransaction)({
|
|
1980
|
+
...args,
|
|
1981
|
+
client: options?.client,
|
|
1982
|
+
signal: extra.signal,
|
|
1983
|
+
throwOnError: false
|
|
1984
|
+
})
|
|
1985
|
+
);
|
|
1986
|
+
return {
|
|
1987
|
+
name: "cart_checkout_order_cancel_a_transaction",
|
|
1988
|
+
config: {
|
|
1989
|
+
title: "Cancel a Transaction",
|
|
1990
|
+
description: "Cancels or voids a pending or authorized transaction on an order. Works only with the Stripe and PayPal gateways, not the manual gateway. To return funds already taken, refund the transaction instead.",
|
|
1991
|
+
inputSchema: cancelATransactionInput,
|
|
1992
|
+
annotations: {
|
|
1993
|
+
readOnlyHint: false,
|
|
1994
|
+
destructiveHint: false,
|
|
1995
|
+
idempotentHint: false,
|
|
1996
|
+
openWorldHint: true
|
|
1997
|
+
},
|
|
1998
|
+
_meta: {
|
|
1999
|
+
"com.elasticpath/operation": {
|
|
2000
|
+
id: "cart_checkout_order.cancelATransaction",
|
|
2001
|
+
method: "POST",
|
|
2002
|
+
path: "/v2/orders/{orderID}/transactions/{transactionID}/cancel",
|
|
2003
|
+
risk: "create"
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
},
|
|
2007
|
+
handler
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
const getOrderShippingGroupsInput = z.object({
|
|
2011
|
+
path: import_zod.zGetOrderShippingGroupsPath.strict()
|
|
2012
|
+
}).strict();
|
|
2013
|
+
const getOrderShippingGroupsTool = (options) => {
|
|
2014
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2015
|
+
(0, import_sdk.getOrderShippingGroups)({
|
|
2016
|
+
...args,
|
|
2017
|
+
client: options?.client,
|
|
2018
|
+
signal: extra.signal,
|
|
2019
|
+
throwOnError: false
|
|
2020
|
+
})
|
|
2021
|
+
);
|
|
2022
|
+
return {
|
|
2023
|
+
name: "cart_checkout_order_get_order_shipping_groups",
|
|
2024
|
+
config: {
|
|
2025
|
+
title: "Retrieve all shipping groups for an order",
|
|
2026
|
+
description: "Lists the shipping groups on an order. This is for orders after checkout; a cart's shipping groups are read from the cart.",
|
|
2027
|
+
inputSchema: getOrderShippingGroupsInput,
|
|
2028
|
+
annotations: {
|
|
2029
|
+
readOnlyHint: true,
|
|
2030
|
+
destructiveHint: false,
|
|
2031
|
+
idempotentHint: true,
|
|
2032
|
+
openWorldHint: true
|
|
2033
|
+
},
|
|
2034
|
+
_meta: {
|
|
2035
|
+
"com.elasticpath/operation": {
|
|
2036
|
+
id: "cart_checkout_order.getOrderShippingGroups",
|
|
2037
|
+
method: "GET",
|
|
2038
|
+
path: "/v2/orders/{orderID}/shipping-groups",
|
|
2039
|
+
risk: "read"
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
},
|
|
2043
|
+
handler
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
const createOrderShippingGroupInput = z.object({
|
|
2047
|
+
path: import_zod.zCreateOrderShippingGroupPath.strict(),
|
|
2048
|
+
body: (0, import_mcp_support.loose)(import_zod.zCreateOrderShippingGroupBody).optional()
|
|
2049
|
+
}).strict();
|
|
2050
|
+
const createOrderShippingGroupTool = (options) => {
|
|
2051
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2052
|
+
(0, import_sdk.createOrderShippingGroup)({
|
|
2053
|
+
...args,
|
|
2054
|
+
client: options?.client,
|
|
2055
|
+
signal: extra.signal,
|
|
2056
|
+
throwOnError: false
|
|
2057
|
+
})
|
|
2058
|
+
);
|
|
2059
|
+
return {
|
|
2060
|
+
name: "cart_checkout_order_create_order_shipping_group",
|
|
2061
|
+
config: {
|
|
2062
|
+
title: "Create a shipping group for an order",
|
|
2063
|
+
description: "Creates a shipping group on an order. This is for orders after checkout; before checkout, create the shipping group on the cart.",
|
|
2064
|
+
inputSchema: createOrderShippingGroupInput,
|
|
2065
|
+
annotations: {
|
|
2066
|
+
readOnlyHint: false,
|
|
2067
|
+
destructiveHint: false,
|
|
2068
|
+
idempotentHint: false,
|
|
2069
|
+
openWorldHint: true
|
|
2070
|
+
},
|
|
2071
|
+
_meta: {
|
|
2072
|
+
"com.elasticpath/operation": {
|
|
2073
|
+
id: "cart_checkout_order.createOrderShippingGroup",
|
|
2074
|
+
method: "POST",
|
|
2075
|
+
path: "/v2/orders/{orderID}/shipping-groups",
|
|
2076
|
+
risk: "create"
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
handler
|
|
2081
|
+
};
|
|
2082
|
+
};
|
|
2083
|
+
const getShippingGroupsByIdInput = z.object({
|
|
2084
|
+
path: import_zod.zGetShippingGroupsByIdPath.strict(),
|
|
2085
|
+
query: import_zod.zGetShippingGroupsByIdQuery.strict().optional()
|
|
2086
|
+
}).strict();
|
|
2087
|
+
const getShippingGroupsByIdTool = (options) => {
|
|
2088
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2089
|
+
(0, import_sdk.getShippingGroupsById)({
|
|
2090
|
+
...args,
|
|
2091
|
+
client: options?.client,
|
|
2092
|
+
signal: extra.signal,
|
|
2093
|
+
throwOnError: false
|
|
2094
|
+
})
|
|
2095
|
+
);
|
|
2096
|
+
return {
|
|
2097
|
+
name: "cart_checkout_order_get_shipping_groups_by_id",
|
|
2098
|
+
config: {
|
|
2099
|
+
title: "Retrieve a specific shipping group for an order",
|
|
2100
|
+
description: "Gets one shipping group on an order by its ID. This is for orders after checkout; a cart's shipping groups are read from the cart.",
|
|
2101
|
+
inputSchema: getShippingGroupsByIdInput,
|
|
2102
|
+
annotations: {
|
|
2103
|
+
readOnlyHint: true,
|
|
2104
|
+
destructiveHint: false,
|
|
2105
|
+
idempotentHint: true,
|
|
2106
|
+
openWorldHint: true
|
|
2107
|
+
},
|
|
2108
|
+
_meta: {
|
|
2109
|
+
"com.elasticpath/operation": {
|
|
2110
|
+
id: "cart_checkout_order.getShippingGroupsById",
|
|
2111
|
+
method: "GET",
|
|
2112
|
+
path: "/v2/orders/{orderID}/shipping-groups/{shippingGroupID}",
|
|
2113
|
+
risk: "read"
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
},
|
|
2117
|
+
handler
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
const putShippingGroupByIdInput = z.object({
|
|
2121
|
+
path: import_zod.zPutShippingGroupByIdPath.strict(),
|
|
2122
|
+
body: (0, import_mcp_support.loose)(import_zod.zPutShippingGroupByIdBody)
|
|
2123
|
+
}).strict();
|
|
2124
|
+
const putShippingGroupByIdTool = (options) => {
|
|
2125
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2126
|
+
(0, import_sdk.putShippingGroupById)({
|
|
2127
|
+
...args,
|
|
2128
|
+
client: options?.client,
|
|
2129
|
+
signal: extra.signal,
|
|
2130
|
+
throwOnError: false
|
|
2131
|
+
})
|
|
2132
|
+
);
|
|
2133
|
+
return {
|
|
2134
|
+
name: "cart_checkout_order_put_shipping_group_by_id",
|
|
2135
|
+
config: {
|
|
2136
|
+
title: "Update a shipping group for an order",
|
|
2137
|
+
description: "Updates one shipping group on an order. This is for orders after checkout; before checkout, update the shipping group on the cart.",
|
|
2138
|
+
inputSchema: putShippingGroupByIdInput,
|
|
2139
|
+
annotations: {
|
|
2140
|
+
readOnlyHint: false,
|
|
2141
|
+
destructiveHint: true,
|
|
2142
|
+
idempotentHint: true,
|
|
2143
|
+
openWorldHint: true
|
|
2144
|
+
},
|
|
2145
|
+
_meta: {
|
|
2146
|
+
"com.elasticpath/operation": {
|
|
2147
|
+
id: "cart_checkout_order.putShippingGroupById",
|
|
2148
|
+
method: "PUT",
|
|
2149
|
+
path: "/v2/orders/{orderID}/shipping-groups/{shippingGroupID}",
|
|
2150
|
+
risk: "update"
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
},
|
|
2154
|
+
handler
|
|
2155
|
+
};
|
|
2156
|
+
};
|
|
2157
|
+
const getV2SettingsCartInput = z.object({}).strict();
|
|
2158
|
+
const getV2SettingsCartTool = (options) => {
|
|
2159
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2160
|
+
(0, import_sdk.getV2SettingsCart)({
|
|
2161
|
+
...args,
|
|
2162
|
+
client: options?.client,
|
|
2163
|
+
signal: extra.signal,
|
|
2164
|
+
throwOnError: false
|
|
2165
|
+
})
|
|
2166
|
+
);
|
|
2167
|
+
return {
|
|
2168
|
+
name: "cart_checkout_order_get_v2_settings_cart",
|
|
2169
|
+
config: {
|
|
2170
|
+
title: "Get Cart Settings",
|
|
2171
|
+
description: "Gets the store's cart settings, such as cart expiry, custom discounts, deferred inventory checks and show_all_carts. Read them before changing a setting.",
|
|
2172
|
+
inputSchema: getV2SettingsCartInput,
|
|
2173
|
+
annotations: {
|
|
2174
|
+
readOnlyHint: true,
|
|
2175
|
+
destructiveHint: false,
|
|
2176
|
+
idempotentHint: true,
|
|
2177
|
+
openWorldHint: true
|
|
2178
|
+
},
|
|
2179
|
+
_meta: {
|
|
2180
|
+
"com.elasticpath/operation": {
|
|
2181
|
+
id: "cart_checkout_order.getV2SettingsCart",
|
|
2182
|
+
method: "GET",
|
|
2183
|
+
path: "/v2/settings/cart",
|
|
2184
|
+
risk: "read"
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
},
|
|
2188
|
+
handler
|
|
2189
|
+
};
|
|
2190
|
+
};
|
|
2191
|
+
const putV2SettingsCartInput = z.object({
|
|
2192
|
+
body: (0, import_mcp_support.loose)(import_zod.zPutV2SettingsCartBody).optional()
|
|
2193
|
+
}).strict();
|
|
2194
|
+
const putV2SettingsCartTool = (options) => {
|
|
2195
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2196
|
+
(0, import_sdk.putV2SettingsCart)({
|
|
2197
|
+
...args,
|
|
2198
|
+
client: options?.client,
|
|
2199
|
+
signal: extra.signal,
|
|
2200
|
+
throwOnError: false
|
|
2201
|
+
})
|
|
2202
|
+
);
|
|
2203
|
+
return {
|
|
2204
|
+
name: "cart_checkout_order_put_v2_settings_cart",
|
|
2205
|
+
config: {
|
|
2206
|
+
title: "Update Cart Settings",
|
|
2207
|
+
description: "Updates the store's cart settings: cart expiry in days (up to 365), custom discounts, rule promotions, deferred inventory checks, show_all_carts and separating items by location. The settings are the defaults for every cart in the store; one cart's custom discount and inventory check settings can be changed on that cart instead.",
|
|
2208
|
+
inputSchema: putV2SettingsCartInput,
|
|
2209
|
+
annotations: {
|
|
2210
|
+
readOnlyHint: false,
|
|
2211
|
+
destructiveHint: true,
|
|
2212
|
+
idempotentHint: true,
|
|
2213
|
+
openWorldHint: true
|
|
2214
|
+
},
|
|
2215
|
+
_meta: {
|
|
2216
|
+
"com.elasticpath/operation": {
|
|
2217
|
+
id: "cart_checkout_order.putV2SettingsCart",
|
|
2218
|
+
method: "PUT",
|
|
2219
|
+
path: "/v2/settings/cart",
|
|
2220
|
+
risk: "update"
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
},
|
|
2224
|
+
handler
|
|
2225
|
+
};
|
|
2226
|
+
};
|
|
2227
|
+
const getV2SettingsCartStoreIdInput = z.object({
|
|
2228
|
+
path: import_zod.zGetV2SettingsCartStoreIdPath.strict()
|
|
2229
|
+
}).strict();
|
|
2230
|
+
const getV2SettingsCartStoreIdTool = (options) => {
|
|
2231
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2232
|
+
(0, import_sdk.getV2SettingsCartStoreId)({
|
|
2233
|
+
...args,
|
|
2234
|
+
client: options?.client,
|
|
2235
|
+
signal: extra.signal,
|
|
2236
|
+
throwOnError: false
|
|
2237
|
+
})
|
|
2238
|
+
);
|
|
2239
|
+
return {
|
|
2240
|
+
name: "cart_checkout_order_get_v2_settings_cart_store_id",
|
|
2241
|
+
config: {
|
|
2242
|
+
title: "Get Cart Settings by Store ID",
|
|
2243
|
+
description: "Gets the cart settings of the store with the given store ID, such as cart expiry, custom discounts, deferred inventory checks and show_all_carts. Read them before changing a setting.",
|
|
2244
|
+
inputSchema: getV2SettingsCartStoreIdInput,
|
|
2245
|
+
annotations: {
|
|
2246
|
+
readOnlyHint: true,
|
|
2247
|
+
destructiveHint: false,
|
|
2248
|
+
idempotentHint: true,
|
|
2249
|
+
openWorldHint: true
|
|
2250
|
+
},
|
|
2251
|
+
_meta: {
|
|
2252
|
+
"com.elasticpath/operation": {
|
|
2253
|
+
id: "cart_checkout_order.getV2SettingsCartStoreId",
|
|
2254
|
+
method: "GET",
|
|
2255
|
+
path: "/v2/settings/cart/{storeID}",
|
|
2256
|
+
risk: "read"
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
},
|
|
2260
|
+
handler
|
|
2261
|
+
};
|
|
2262
|
+
};
|
|
2263
|
+
const putV2SettingsCartStoreIdInput = z.object({
|
|
2264
|
+
path: import_zod.zPutV2SettingsCartStoreIdPath.strict(),
|
|
2265
|
+
body: (0, import_mcp_support.loose)(import_zod.zPutV2SettingsCartStoreIdBody).optional()
|
|
2266
|
+
}).strict();
|
|
2267
|
+
const putV2SettingsCartStoreIdTool = (options) => {
|
|
2268
|
+
const handler = (args, extra) => (0, import_mcp_support.toToolResult)(
|
|
2269
|
+
(0, import_sdk.putV2SettingsCartStoreId)({
|
|
2270
|
+
...args,
|
|
2271
|
+
client: options?.client,
|
|
2272
|
+
signal: extra.signal,
|
|
2273
|
+
throwOnError: false
|
|
2274
|
+
})
|
|
2275
|
+
);
|
|
2276
|
+
return {
|
|
2277
|
+
name: "cart_checkout_order_put_v2_settings_cart_store_id",
|
|
2278
|
+
config: {
|
|
2279
|
+
title: "Update Cart Settings by Store ID",
|
|
2280
|
+
description: "Updates the cart settings of the store with the given store ID: cart expiry in days (up to 365), custom discounts, rule promotions, deferred inventory checks, show_all_carts and separating items by location. The settings are the defaults for every cart in that store; one cart's custom discount and inventory check settings can be changed on that cart instead.",
|
|
2281
|
+
inputSchema: putV2SettingsCartStoreIdInput,
|
|
2282
|
+
annotations: {
|
|
2283
|
+
readOnlyHint: false,
|
|
2284
|
+
destructiveHint: true,
|
|
2285
|
+
idempotentHint: true,
|
|
2286
|
+
openWorldHint: true
|
|
2287
|
+
},
|
|
2288
|
+
_meta: {
|
|
2289
|
+
"com.elasticpath/operation": {
|
|
2290
|
+
id: "cart_checkout_order.putV2SettingsCartStoreId",
|
|
2291
|
+
method: "PUT",
|
|
2292
|
+
path: "/v2/settings/cart/{storeID}",
|
|
2293
|
+
risk: "update"
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
},
|
|
2297
|
+
handler
|
|
2298
|
+
};
|
|
2299
|
+
};
|
|
2300
|
+
const tools = (options) => [
|
|
2301
|
+
getCartsTool(options),
|
|
2302
|
+
createACartTool(options),
|
|
2303
|
+
deleteACartTool(options),
|
|
2304
|
+
getACartTool(options),
|
|
2305
|
+
updateACartTool(options),
|
|
2306
|
+
deleteAllCartItemsTool(options),
|
|
2307
|
+
getCartItemsTool(options),
|
|
2308
|
+
manageCartsTool(options),
|
|
2309
|
+
bulkUpdateItemsInCartTool(options),
|
|
2310
|
+
deleteACartItemTool(options),
|
|
2311
|
+
updateACartItemTool(options),
|
|
2312
|
+
deleteAccountCartAssociationTool(options),
|
|
2313
|
+
createAccountCartAssociationTool(options),
|
|
2314
|
+
deleteCustomerCartAssociationTool(options),
|
|
2315
|
+
createCustomerCartAssociationTool(options),
|
|
2316
|
+
deleteAPromotionViaPromotionCodeTool(options),
|
|
2317
|
+
addTaxItemToCartTool(options),
|
|
2318
|
+
addTaxItemToCartItemComponentTool(options),
|
|
2319
|
+
deleteTaxItemFromCartItemComponentTool(options),
|
|
2320
|
+
updateTaxItemFromCartItemComponentTool(options),
|
|
2321
|
+
bulkDeleteTaxItemsFromCartTool(options),
|
|
2322
|
+
bulkAddTaxItemsToCartTool(options),
|
|
2323
|
+
deleteATaxItemTool(options),
|
|
2324
|
+
updateATaxItemTool(options),
|
|
2325
|
+
bulkDeleteCustomDiscountsFromCartTool(options),
|
|
2326
|
+
bulkAddCustomDiscountsToCartTool(options),
|
|
2327
|
+
deleteCustomDiscountFromCartTool(options),
|
|
2328
|
+
updateCustomDiscountForCartTool(options),
|
|
2329
|
+
addCustomDiscountToCartItemTool(options),
|
|
2330
|
+
deleteCustomDiscountFromCartItemTool(options),
|
|
2331
|
+
updateCustomDiscountForCartItemTool(options),
|
|
2332
|
+
getShippingGroupsTool(options),
|
|
2333
|
+
createShippingGroupTool(options),
|
|
2334
|
+
deleteCartShippingGroupTool(options),
|
|
2335
|
+
getShippingGroupByIdTool(options),
|
|
2336
|
+
updateShippingGroupTool(options),
|
|
2337
|
+
createCartPaymentIntentTool(options),
|
|
2338
|
+
updateCartPaymentIntentTool(options),
|
|
2339
|
+
checkoutApiTool(options),
|
|
2340
|
+
getCustomerOrdersTool(options),
|
|
2341
|
+
getAnOrderTool(options),
|
|
2342
|
+
updateAnOrderTool(options),
|
|
2343
|
+
getOrderItemsTool(options),
|
|
2344
|
+
anonymizeOrdersTool(options),
|
|
2345
|
+
confirmOrderTool(options),
|
|
2346
|
+
paymentSetupTool(options),
|
|
2347
|
+
confirmPaymentTool(options),
|
|
2348
|
+
captureATransactionTool(options),
|
|
2349
|
+
refundATransactionTool(options),
|
|
2350
|
+
getOrderTransactionsTool(options),
|
|
2351
|
+
getATransactionTool(options),
|
|
2352
|
+
cancelATransactionTool(options),
|
|
2353
|
+
getOrderShippingGroupsTool(options),
|
|
2354
|
+
createOrderShippingGroupTool(options),
|
|
2355
|
+
getShippingGroupsByIdTool(options),
|
|
2356
|
+
putShippingGroupByIdTool(options),
|
|
2357
|
+
getV2SettingsCartTool(options),
|
|
2358
|
+
putV2SettingsCartTool(options),
|
|
2359
|
+
getV2SettingsCartStoreIdTool(options),
|
|
2360
|
+
putV2SettingsCartStoreIdTool(options)
|
|
2361
|
+
];
|
|
2362
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2363
|
+
0 && (module.exports = {
|
|
2364
|
+
addCustomDiscountToCartItemTool,
|
|
2365
|
+
addTaxItemToCartItemComponentTool,
|
|
2366
|
+
addTaxItemToCartTool,
|
|
2367
|
+
anonymizeOrdersTool,
|
|
2368
|
+
bulkAddCustomDiscountsToCartTool,
|
|
2369
|
+
bulkAddTaxItemsToCartTool,
|
|
2370
|
+
bulkDeleteCustomDiscountsFromCartTool,
|
|
2371
|
+
bulkDeleteTaxItemsFromCartTool,
|
|
2372
|
+
bulkUpdateItemsInCartTool,
|
|
2373
|
+
cancelATransactionTool,
|
|
2374
|
+
captureATransactionTool,
|
|
2375
|
+
checkoutApiTool,
|
|
2376
|
+
confirmOrderTool,
|
|
2377
|
+
confirmPaymentTool,
|
|
2378
|
+
createACartTool,
|
|
2379
|
+
createAccountCartAssociationTool,
|
|
2380
|
+
createCartPaymentIntentTool,
|
|
2381
|
+
createCustomerCartAssociationTool,
|
|
2382
|
+
createOrderShippingGroupTool,
|
|
2383
|
+
createShippingGroupTool,
|
|
2384
|
+
deleteACartItemTool,
|
|
2385
|
+
deleteACartTool,
|
|
2386
|
+
deleteAPromotionViaPromotionCodeTool,
|
|
2387
|
+
deleteATaxItemTool,
|
|
2388
|
+
deleteAccountCartAssociationTool,
|
|
2389
|
+
deleteAllCartItemsTool,
|
|
2390
|
+
deleteCartShippingGroupTool,
|
|
2391
|
+
deleteCustomDiscountFromCartItemTool,
|
|
2392
|
+
deleteCustomDiscountFromCartTool,
|
|
2393
|
+
deleteCustomerCartAssociationTool,
|
|
2394
|
+
deleteTaxItemFromCartItemComponentTool,
|
|
2395
|
+
getACartTool,
|
|
2396
|
+
getATransactionTool,
|
|
2397
|
+
getAnOrderTool,
|
|
2398
|
+
getCartItemsTool,
|
|
2399
|
+
getCartsTool,
|
|
2400
|
+
getCustomerOrdersTool,
|
|
2401
|
+
getOrderItemsTool,
|
|
2402
|
+
getOrderShippingGroupsTool,
|
|
2403
|
+
getOrderTransactionsTool,
|
|
2404
|
+
getShippingGroupByIdTool,
|
|
2405
|
+
getShippingGroupsByIdTool,
|
|
2406
|
+
getShippingGroupsTool,
|
|
2407
|
+
getV2SettingsCartStoreIdTool,
|
|
2408
|
+
getV2SettingsCartTool,
|
|
2409
|
+
manageCartsTool,
|
|
2410
|
+
paymentSetupTool,
|
|
2411
|
+
putShippingGroupByIdTool,
|
|
2412
|
+
putV2SettingsCartStoreIdTool,
|
|
2413
|
+
putV2SettingsCartTool,
|
|
2414
|
+
refundATransactionTool,
|
|
2415
|
+
tools,
|
|
2416
|
+
updateACartItemTool,
|
|
2417
|
+
updateACartTool,
|
|
2418
|
+
updateATaxItemTool,
|
|
2419
|
+
updateAnOrderTool,
|
|
2420
|
+
updateCartPaymentIntentTool,
|
|
2421
|
+
updateCustomDiscountForCartItemTool,
|
|
2422
|
+
updateCustomDiscountForCartTool,
|
|
2423
|
+
updateShippingGroupTool,
|
|
2424
|
+
updateTaxItemFromCartItemComponentTool
|
|
2425
|
+
});
|
|
2426
|
+
//# sourceMappingURL=mcp.gen.cjs.map
|