@henrylabs/mcp 0.2.0 → 0.4.0
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 +13 -40
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +0 -1
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +0 -1
- package/code-tool.mjs.map +1 -1
- package/headers.d.mts.map +1 -1
- package/headers.d.ts.map +1 -1
- package/headers.js +1 -4
- package/headers.js.map +1 -1
- package/headers.mjs +1 -4
- package/headers.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool.ts +0 -1
- package/src/headers.ts +1 -5
- package/src/server.ts +1 -1
- package/src/tools/cart/{create-checkout-cart.ts → create-cart-checkout.ts} +3 -3
- package/src/tools/checkout/session/confirm-checkout-session.ts +101 -0
- package/src/tools/checkout/session/{create-quote-checkout-session.ts → create-checkout-session.ts} +2 -2
- package/src/tools/index.ts +10 -32
- package/src/tools/orders/retrieve-status-orders.ts +1 -1
- package/src/tools/products/retrieve-product-details.ts +48 -0
- package/src/tools/products/search-products.ts +1 -1
- package/src/tools/wallet/{create-card-collection-wallet.ts → collect-payment-details.ts} +3 -3
- package/tools/cart/{create-checkout-cart.d.mts → create-cart-checkout.d.mts} +1 -1
- package/tools/cart/{create-checkout-cart.d.mts.map → create-cart-checkout.d.mts.map} +1 -1
- package/tools/cart/{items/clear-cart-items.d.mts → create-cart-checkout.d.ts} +1 -1
- package/tools/cart/{create-checkout-cart.d.ts.map → create-cart-checkout.d.ts.map} +1 -1
- package/tools/cart/{create-checkout-cart.js → create-cart-checkout.js} +4 -4
- package/tools/cart/create-cart-checkout.js.map +1 -0
- package/tools/cart/{create-checkout-cart.mjs → create-cart-checkout.mjs} +4 -4
- package/tools/cart/create-cart-checkout.mjs.map +1 -0
- package/tools/checkout/session/confirm-checkout-session.d.mts +45 -0
- package/tools/checkout/session/confirm-checkout-session.d.mts.map +1 -0
- package/tools/{cart/create-checkout-cart.d.ts → checkout/session/confirm-checkout-session.d.ts} +1 -1
- package/tools/checkout/session/confirm-checkout-session.d.ts.map +1 -0
- package/tools/checkout/session/confirm-checkout-session.js +94 -0
- package/tools/checkout/session/confirm-checkout-session.js.map +1 -0
- package/tools/checkout/session/confirm-checkout-session.mjs +90 -0
- package/tools/checkout/session/confirm-checkout-session.mjs.map +1 -0
- package/tools/checkout/session/create-checkout-session.d.mts +45 -0
- package/tools/checkout/session/create-checkout-session.d.mts.map +1 -0
- package/tools/{cart/items/add-cart-items.d.mts → checkout/session/create-checkout-session.d.ts} +1 -1
- package/tools/checkout/session/create-checkout-session.d.ts.map +1 -0
- package/tools/checkout/session/{create-quote-checkout-session.js → create-checkout-session.js} +3 -3
- package/tools/checkout/session/create-checkout-session.js.map +1 -0
- package/tools/checkout/session/{create-quote-checkout-session.mjs → create-checkout-session.mjs} +3 -3
- package/tools/checkout/session/create-checkout-session.mjs.map +1 -0
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +10 -32
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +10 -32
- package/tools/index.mjs.map +1 -1
- package/tools/orders/retrieve-status-orders.js +1 -1
- package/tools/orders/retrieve-status-orders.js.map +1 -1
- package/tools/orders/retrieve-status-orders.mjs +1 -1
- package/tools/orders/retrieve-status-orders.mjs.map +1 -1
- package/tools/products/retrieve-product-details.d.mts +45 -0
- package/tools/products/retrieve-product-details.d.mts.map +1 -0
- package/tools/products/retrieve-product-details.d.ts +45 -0
- package/tools/products/retrieve-product-details.d.ts.map +1 -0
- package/tools/products/retrieve-product-details.js +43 -0
- package/tools/products/retrieve-product-details.js.map +1 -0
- package/tools/products/retrieve-product-details.mjs +39 -0
- package/tools/products/retrieve-product-details.mjs.map +1 -0
- package/tools/products/search-products.js +1 -1
- package/tools/products/search-products.js.map +1 -1
- package/tools/products/search-products.mjs +1 -1
- package/tools/products/search-products.mjs.map +1 -1
- package/tools/wallet/collect-payment-details.d.mts +45 -0
- package/tools/wallet/collect-payment-details.d.mts.map +1 -0
- package/tools/{cart/items/add-cart-items.d.ts → wallet/collect-payment-details.d.ts} +1 -1
- package/tools/wallet/collect-payment-details.d.ts.map +1 -0
- package/tools/wallet/{create-card-collection-wallet.js → collect-payment-details.js} +4 -4
- package/tools/wallet/collect-payment-details.js.map +1 -0
- package/tools/wallet/{create-card-collection-wallet.mjs → collect-payment-details.mjs} +4 -4
- package/tools/wallet/collect-payment-details.mjs.map +1 -0
- package/src/tools/cart/items/add-cart-items.ts +0 -93
- package/src/tools/cart/items/clear-cart-items.ts +0 -47
- package/src/tools/cart/items/list-cart-items.ts +0 -47
- package/src/tools/cart/items/remove-cart-items.ts +0 -50
- package/src/tools/checkout/session/confirm-checkout-checkout-session.ts +0 -101
- package/src/tools/checkout/session/list-products-checkout-session.ts +0 -47
- package/src/tools/checkout/session/retrieve-shipping-info-checkout-session.ts +0 -49
- package/src/tools/merchants/check-status-merchants.ts +0 -56
- package/src/tools/merchants/get-shipping-info-merchants.ts +0 -60
- package/src/tools/merchants/list-supported-merchants.ts +0 -52
- package/src/tools/products/retrieve-details-products.ts +0 -48
- package/src/tools/products/variant-check/create-products-variant-check.ts +0 -85
- package/src/tools/products/variant-check/retrieve-status-products-variant-check.ts +0 -50
- package/tools/cart/create-checkout-cart.js.map +0 -1
- package/tools/cart/create-checkout-cart.mjs.map +0 -1
- package/tools/cart/items/add-cart-items.d.mts.map +0 -1
- package/tools/cart/items/add-cart-items.d.ts.map +0 -1
- package/tools/cart/items/add-cart-items.js +0 -86
- package/tools/cart/items/add-cart-items.js.map +0 -1
- package/tools/cart/items/add-cart-items.mjs +0 -82
- package/tools/cart/items/add-cart-items.mjs.map +0 -1
- package/tools/cart/items/clear-cart-items.d.mts.map +0 -1
- package/tools/cart/items/clear-cart-items.d.ts +0 -45
- package/tools/cart/items/clear-cart-items.d.ts.map +0 -1
- package/tools/cart/items/clear-cart-items.js +0 -42
- package/tools/cart/items/clear-cart-items.js.map +0 -1
- package/tools/cart/items/clear-cart-items.mjs +0 -38
- package/tools/cart/items/clear-cart-items.mjs.map +0 -1
- package/tools/cart/items/list-cart-items.d.mts +0 -45
- package/tools/cart/items/list-cart-items.d.mts.map +0 -1
- package/tools/cart/items/list-cart-items.d.ts +0 -45
- package/tools/cart/items/list-cart-items.d.ts.map +0 -1
- package/tools/cart/items/list-cart-items.js +0 -42
- package/tools/cart/items/list-cart-items.js.map +0 -1
- package/tools/cart/items/list-cart-items.mjs +0 -38
- package/tools/cart/items/list-cart-items.mjs.map +0 -1
- package/tools/cart/items/remove-cart-items.d.mts +0 -45
- package/tools/cart/items/remove-cart-items.d.mts.map +0 -1
- package/tools/cart/items/remove-cart-items.d.ts +0 -45
- package/tools/cart/items/remove-cart-items.d.ts.map +0 -1
- package/tools/cart/items/remove-cart-items.js +0 -45
- package/tools/cart/items/remove-cart-items.js.map +0 -1
- package/tools/cart/items/remove-cart-items.mjs +0 -41
- package/tools/cart/items/remove-cart-items.mjs.map +0 -1
- package/tools/checkout/session/confirm-checkout-checkout-session.d.mts +0 -45
- package/tools/checkout/session/confirm-checkout-checkout-session.d.mts.map +0 -1
- package/tools/checkout/session/confirm-checkout-checkout-session.d.ts +0 -45
- package/tools/checkout/session/confirm-checkout-checkout-session.d.ts.map +0 -1
- package/tools/checkout/session/confirm-checkout-checkout-session.js +0 -94
- package/tools/checkout/session/confirm-checkout-checkout-session.js.map +0 -1
- package/tools/checkout/session/confirm-checkout-checkout-session.mjs +0 -90
- package/tools/checkout/session/confirm-checkout-checkout-session.mjs.map +0 -1
- package/tools/checkout/session/create-quote-checkout-session.d.mts +0 -45
- package/tools/checkout/session/create-quote-checkout-session.d.mts.map +0 -1
- package/tools/checkout/session/create-quote-checkout-session.d.ts +0 -45
- package/tools/checkout/session/create-quote-checkout-session.d.ts.map +0 -1
- package/tools/checkout/session/create-quote-checkout-session.js.map +0 -1
- package/tools/checkout/session/create-quote-checkout-session.mjs.map +0 -1
- package/tools/checkout/session/list-products-checkout-session.d.mts +0 -45
- package/tools/checkout/session/list-products-checkout-session.d.mts.map +0 -1
- package/tools/checkout/session/list-products-checkout-session.d.ts +0 -45
- package/tools/checkout/session/list-products-checkout-session.d.ts.map +0 -1
- package/tools/checkout/session/list-products-checkout-session.js +0 -42
- package/tools/checkout/session/list-products-checkout-session.js.map +0 -1
- package/tools/checkout/session/list-products-checkout-session.mjs +0 -38
- package/tools/checkout/session/list-products-checkout-session.mjs.map +0 -1
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.mts +0 -45
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.mts.map +0 -1
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.ts +0 -45
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.ts.map +0 -1
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.js +0 -42
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.js.map +0 -1
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.mjs +0 -38
- package/tools/checkout/session/retrieve-shipping-info-checkout-session.mjs.map +0 -1
- package/tools/merchants/check-status-merchants.d.mts +0 -45
- package/tools/merchants/check-status-merchants.d.mts.map +0 -1
- package/tools/merchants/check-status-merchants.d.ts +0 -45
- package/tools/merchants/check-status-merchants.d.ts.map +0 -1
- package/tools/merchants/check-status-merchants.js +0 -48
- package/tools/merchants/check-status-merchants.js.map +0 -1
- package/tools/merchants/check-status-merchants.mjs +0 -44
- package/tools/merchants/check-status-merchants.mjs.map +0 -1
- package/tools/merchants/get-shipping-info-merchants.d.mts +0 -45
- package/tools/merchants/get-shipping-info-merchants.d.mts.map +0 -1
- package/tools/merchants/get-shipping-info-merchants.d.ts +0 -45
- package/tools/merchants/get-shipping-info-merchants.d.ts.map +0 -1
- package/tools/merchants/get-shipping-info-merchants.js +0 -55
- package/tools/merchants/get-shipping-info-merchants.js.map +0 -1
- package/tools/merchants/get-shipping-info-merchants.mjs +0 -51
- package/tools/merchants/get-shipping-info-merchants.mjs.map +0 -1
- package/tools/merchants/list-supported-merchants.d.mts +0 -45
- package/tools/merchants/list-supported-merchants.d.mts.map +0 -1
- package/tools/merchants/list-supported-merchants.d.ts +0 -45
- package/tools/merchants/list-supported-merchants.d.ts.map +0 -1
- package/tools/merchants/list-supported-merchants.js +0 -47
- package/tools/merchants/list-supported-merchants.js.map +0 -1
- package/tools/merchants/list-supported-merchants.mjs +0 -43
- package/tools/merchants/list-supported-merchants.mjs.map +0 -1
- package/tools/products/retrieve-details-products.d.mts +0 -45
- package/tools/products/retrieve-details-products.d.mts.map +0 -1
- package/tools/products/retrieve-details-products.d.ts +0 -45
- package/tools/products/retrieve-details-products.d.ts.map +0 -1
- package/tools/products/retrieve-details-products.js +0 -43
- package/tools/products/retrieve-details-products.js.map +0 -1
- package/tools/products/retrieve-details-products.mjs +0 -39
- package/tools/products/retrieve-details-products.mjs.map +0 -1
- package/tools/products/variant-check/create-products-variant-check.d.mts +0 -45
- package/tools/products/variant-check/create-products-variant-check.d.mts.map +0 -1
- package/tools/products/variant-check/create-products-variant-check.d.ts +0 -45
- package/tools/products/variant-check/create-products-variant-check.d.ts.map +0 -1
- package/tools/products/variant-check/create-products-variant-check.js +0 -79
- package/tools/products/variant-check/create-products-variant-check.js.map +0 -1
- package/tools/products/variant-check/create-products-variant-check.mjs +0 -75
- package/tools/products/variant-check/create-products-variant-check.mjs.map +0 -1
- package/tools/products/variant-check/retrieve-status-products-variant-check.d.mts +0 -45
- package/tools/products/variant-check/retrieve-status-products-variant-check.d.mts.map +0 -1
- package/tools/products/variant-check/retrieve-status-products-variant-check.d.ts +0 -45
- package/tools/products/variant-check/retrieve-status-products-variant-check.d.ts.map +0 -1
- package/tools/products/variant-check/retrieve-status-products-variant-check.js +0 -43
- package/tools/products/variant-check/retrieve-status-products-variant-check.js.map +0 -1
- package/tools/products/variant-check/retrieve-status-products-variant-check.mjs +0 -39
- package/tools/products/variant-check/retrieve-status-products-variant-check.mjs.map +0 -1
- package/tools/wallet/create-card-collection-wallet.d.mts +0 -45
- package/tools/wallet/create-card-collection-wallet.d.mts.map +0 -1
- package/tools/wallet/create-card-collection-wallet.d.ts +0 -45
- package/tools/wallet/create-card-collection-wallet.d.ts.map +0 -1
- package/tools/wallet/create-card-collection-wallet.js.map +0 -1
- package/tools/wallet/create-card-collection-wallet.mjs.map +0 -1
package/tools/index.mjs
CHANGED
|
@@ -1,44 +1,22 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import
|
|
2
|
+
import retrieve_product_details from "./products/retrieve-product-details.mjs";
|
|
3
3
|
import search_products from "./products/search-products.mjs";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import list_cart_items from "./cart/items/list-cart-items.mjs";
|
|
8
|
-
import add_cart_items from "./cart/items/add-cart-items.mjs";
|
|
9
|
-
import clear_cart_items from "./cart/items/clear-cart-items.mjs";
|
|
10
|
-
import remove_cart_items from "./cart/items/remove-cart-items.mjs";
|
|
11
|
-
import confirm_checkout_checkout_session from "./checkout/session/confirm-checkout-checkout-session.mjs";
|
|
12
|
-
import create_quote_checkout_session from "./checkout/session/create-quote-checkout-session.mjs";
|
|
13
|
-
import list_products_checkout_session from "./checkout/session/list-products-checkout-session.mjs";
|
|
14
|
-
import retrieve_shipping_info_checkout_session from "./checkout/session/retrieve-shipping-info-checkout-session.mjs";
|
|
4
|
+
import create_cart_checkout from "./cart/create-cart-checkout.mjs";
|
|
5
|
+
import confirm_checkout_session from "./checkout/session/confirm-checkout-session.mjs";
|
|
6
|
+
import create_checkout_session from "./checkout/session/create-checkout-session.mjs";
|
|
15
7
|
import retrieve_status_orders from "./orders/retrieve-status-orders.mjs";
|
|
16
|
-
import
|
|
17
|
-
import check_status_merchants from "./merchants/check-status-merchants.mjs";
|
|
18
|
-
import get_shipping_info_merchants from "./merchants/get-shipping-info-merchants.mjs";
|
|
19
|
-
import list_supported_merchants from "./merchants/list-supported-merchants.mjs";
|
|
8
|
+
import collect_payment_details from "./wallet/collect-payment-details.mjs";
|
|
20
9
|
export const endpoints = [];
|
|
21
10
|
function addEndpoint(endpoint) {
|
|
22
11
|
endpoints.push(endpoint);
|
|
23
12
|
}
|
|
24
|
-
addEndpoint(
|
|
13
|
+
addEndpoint(retrieve_product_details);
|
|
25
14
|
addEndpoint(search_products);
|
|
26
|
-
addEndpoint(
|
|
27
|
-
addEndpoint(
|
|
28
|
-
addEndpoint(
|
|
29
|
-
addEndpoint(list_cart_items);
|
|
30
|
-
addEndpoint(add_cart_items);
|
|
31
|
-
addEndpoint(clear_cart_items);
|
|
32
|
-
addEndpoint(remove_cart_items);
|
|
33
|
-
addEndpoint(confirm_checkout_checkout_session);
|
|
34
|
-
addEndpoint(create_quote_checkout_session);
|
|
35
|
-
addEndpoint(list_products_checkout_session);
|
|
36
|
-
addEndpoint(retrieve_shipping_info_checkout_session);
|
|
15
|
+
addEndpoint(create_cart_checkout);
|
|
16
|
+
addEndpoint(confirm_checkout_session);
|
|
17
|
+
addEndpoint(create_checkout_session);
|
|
37
18
|
addEndpoint(retrieve_status_orders);
|
|
38
|
-
addEndpoint(
|
|
39
|
-
addEndpoint(check_status_merchants);
|
|
40
|
-
addEndpoint(get_shipping_info_merchants);
|
|
41
|
-
addEndpoint(list_supported_merchants);
|
|
19
|
+
addEndpoint(collect_payment_details);
|
|
42
20
|
export function query(filters, endpoints) {
|
|
43
21
|
const allExcludes = filters.length > 0 && filters.every((filter) => filter.op === 'exclude');
|
|
44
22
|
const unmatchedFilters = new Set(filters);
|
package/tools/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAM/E,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAM/E,wBAAwB;OACxB,eAAe;OACf,oBAAoB;OACpB,wBAAwB;OACxB,uBAAuB;OACvB,sBAAsB;OACtB,uBAAuB;AAE9B,MAAM,CAAC,MAAM,SAAS,GAAe,EAAE,CAAC;AAExC,SAAS,WAAW,CAAC,QAAkB;IACrC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC3B,CAAC;AAED,WAAW,CAAC,wBAAwB,CAAC,CAAC;AACtC,WAAW,CAAC,eAAe,CAAC,CAAC;AAC7B,WAAW,CAAC,oBAAoB,CAAC,CAAC;AAClC,WAAW,CAAC,wBAAwB,CAAC,CAAC;AACtC,WAAW,CAAC,uBAAuB,CAAC,CAAC;AACrC,WAAW,CAAC,sBAAsB,CAAC,CAAC;AACpC,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAQrC,MAAM,UAAU,KAAK,CAAC,OAAiB,EAAE,SAAqB;IAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;IAC7F,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;IAE1C,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,QAAkB,EAAE,EAAE;QACvD,IAAI,QAAQ,GAAG,KAAK,IAAI,WAAW,CAAC;QAEpC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;gBAC5B,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAChC,QAAQ,GAAG,MAAM,CAAC,EAAE,KAAK,SAAS,CAAC;YACrC,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,oCAAoC;IACpC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IACzG,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,sDAAsD,SAAS;aAC5D,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;aAClC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAU,EAAE,QAAkB;IACxD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,UAAU,CAAC,CAAC,CAAC;YAChB,MAAM,QAAQ,GAAG,GAAG,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,GAAG,CAAC;YAC3E,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,CAAC;QACD,KAAK,WAAW;YACd,OAAO,QAAQ,CAAC,QAAQ,CAAC,SAAS,KAAK,KAAK,CAAC;QAC/C,KAAK,KAAK;YACR,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChD,KAAK,MAAM;YACT,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;IACxC,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve-status-orders.js","sourceRoot":"","sources":["../../src/tools/orders/retrieve-status-orders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"retrieve-status-orders.js","sourceRoot":"","sources":["../../src/tools/orders/retrieve-status-orders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,06GAA06G;IAC56G,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACpD,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { asTextContentResult } from '@henrylabs/mcp/tools/types';
|
|
|
4
4
|
export const metadata = {
|
|
5
5
|
resource: 'orders',
|
|
6
6
|
operation: 'read',
|
|
7
|
-
tags: [],
|
|
7
|
+
tags: ['headless', 'hosted'],
|
|
8
8
|
httpMethod: 'get',
|
|
9
9
|
httpPath: '/orders/{orderId}',
|
|
10
10
|
operationId: 'getOrderStatus',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrieve-status-orders.mjs","sourceRoot":"","sources":["../../src/tools/orders/retrieve-status-orders.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"retrieve-status-orders.mjs","sourceRoot":"","sources":["../../src/tools/orders/retrieve-status-orders.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,06GAA06G;IAC56G,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACpD,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Metadata } from '@henrylabs/mcp/tools/types';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import HenrySDK from '@henrylabs/sdk';
|
|
4
|
+
export declare const metadata: Metadata;
|
|
5
|
+
export declare const tool: Tool;
|
|
6
|
+
export declare const handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
tool: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
name: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
type: "object";
|
|
15
|
+
properties?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} | undefined;
|
|
18
|
+
required?: string[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
outputSchema?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
type: "object";
|
|
25
|
+
properties?: {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
} | undefined;
|
|
28
|
+
required?: string[] | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
annotations?: {
|
|
31
|
+
[x: string]: unknown;
|
|
32
|
+
title?: string | undefined;
|
|
33
|
+
readOnlyHint?: boolean | undefined;
|
|
34
|
+
destructiveHint?: boolean | undefined;
|
|
35
|
+
idempotentHint?: boolean | undefined;
|
|
36
|
+
openWorldHint?: boolean | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
_meta?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
} | undefined;
|
|
41
|
+
};
|
|
42
|
+
handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
45
|
+
//# sourceMappingURL=retrieve-product-details.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-product-details.d.mts","sourceRoot":"","sources":["../../src/tools/products/retrieve-product-details.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Metadata } from '@henrylabs/mcp/tools/types';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import HenrySDK from '@henrylabs/sdk';
|
|
4
|
+
export declare const metadata: Metadata;
|
|
5
|
+
export declare const tool: Tool;
|
|
6
|
+
export declare const handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
tool: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
name: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
type: "object";
|
|
15
|
+
properties?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} | undefined;
|
|
18
|
+
required?: string[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
outputSchema?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
type: "object";
|
|
25
|
+
properties?: {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
} | undefined;
|
|
28
|
+
required?: string[] | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
annotations?: {
|
|
31
|
+
[x: string]: unknown;
|
|
32
|
+
title?: string | undefined;
|
|
33
|
+
readOnlyHint?: boolean | undefined;
|
|
34
|
+
destructiveHint?: boolean | undefined;
|
|
35
|
+
idempotentHint?: boolean | undefined;
|
|
36
|
+
openWorldHint?: boolean | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
_meta?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
} | undefined;
|
|
41
|
+
};
|
|
42
|
+
handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
45
|
+
//# sourceMappingURL=retrieve-product-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-product-details.d.ts","sourceRoot":"","sources":["../../src/tools/products/retrieve-product-details.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAuBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const filtering_1 = require("@henrylabs/mcp/filtering");
|
|
6
|
+
const types_1 = require("@henrylabs/mcp/tools/types");
|
|
7
|
+
exports.metadata = {
|
|
8
|
+
resource: 'products',
|
|
9
|
+
operation: 'read',
|
|
10
|
+
tags: ['headless', 'hosted'],
|
|
11
|
+
httpMethod: 'get',
|
|
12
|
+
httpPath: '/products/details',
|
|
13
|
+
operationId: 'getProductDetails',
|
|
14
|
+
};
|
|
15
|
+
exports.tool = {
|
|
16
|
+
name: 'retrieve_product_details',
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve detailed information about a specific product given product ID. Must be called to first get a product link before adding an item to cart\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/product_retrieve_details_response',\n $defs: {\n product_retrieve_details_response: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n productResults: {\n type: 'object',\n properties: {\n brand: {\n type: 'string'\n },\n rating: {\n type: 'number'\n },\n reviews: {\n type: 'number'\n },\n stores: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n link: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n price: {\n type: 'string'\n },\n shipping: {\n type: 'string'\n },\n total: {\n type: 'string'\n }\n },\n required: [ 'link',\n 'name',\n 'price',\n 'shipping',\n 'total'\n ]\n }\n },\n thumbnails: {\n type: 'array',\n items: {\n type: 'string'\n }\n },\n title: {\n type: 'string'\n },\n userReviews: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n rating: {\n type: 'number'\n },\n source: {\n type: 'string'\n },\n text: {\n type: 'string'\n },\n title: {\n type: 'string'\n },\n userName: {\n type: 'string'\n }\n },\n required: [ 'rating',\n 'source',\n 'text',\n 'title',\n 'userName'\n ]\n }\n },\n variants: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n available: {\n type: 'boolean'\n },\n selected: {\n type: 'boolean'\n }\n },\n required: [ 'name'\n ]\n }\n },\n title: {\n type: 'string'\n }\n },\n required: [ 'items',\n 'title'\n ]\n }\n }\n },\n required: [ 'brand',\n 'rating',\n 'reviews',\n 'stores',\n 'thumbnails',\n 'title',\n 'userReviews',\n 'variants'\n ]\n },\n relatedSearches: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n link: {\n type: 'string'\n },\n query: {\n type: 'string'\n },\n image: {\n type: 'string'\n }\n },\n required: [ 'link',\n 'query'\n ]\n }\n }\n },\n required: [ 'productResults',\n 'relatedSearches'\n ]\n },\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n }\n },\n required: [ 'data',\n 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
productId: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Product ID',
|
|
24
|
+
},
|
|
25
|
+
jq_filter: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
title: 'jq Filter',
|
|
28
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ['productId'],
|
|
32
|
+
},
|
|
33
|
+
annotations: {
|
|
34
|
+
readOnlyHint: true,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const handler = async (client, args) => {
|
|
38
|
+
const { jq_filter, ...body } = args;
|
|
39
|
+
return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.products.retrieveDetails(body)));
|
|
40
|
+
};
|
|
41
|
+
exports.handler = handler;
|
|
42
|
+
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
43
|
+
//# sourceMappingURL=retrieve-product-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-product-details.js","sourceRoot":"","sources":["../../src/tools/products/retrieve-product-details.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,mBAAmB;CACjC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EACT,02KAA02K;IAC52K,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,YAAY;aAC1B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { maybeFilter } from '@henrylabs/mcp/filtering';
|
|
3
|
+
import { asTextContentResult } from '@henrylabs/mcp/tools/types';
|
|
4
|
+
export const metadata = {
|
|
5
|
+
resource: 'products',
|
|
6
|
+
operation: 'read',
|
|
7
|
+
tags: ['headless', 'hosted'],
|
|
8
|
+
httpMethod: 'get',
|
|
9
|
+
httpPath: '/products/details',
|
|
10
|
+
operationId: 'getProductDetails',
|
|
11
|
+
};
|
|
12
|
+
export const tool = {
|
|
13
|
+
name: 'retrieve_product_details',
|
|
14
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve detailed information about a specific product given product ID. Must be called to first get a product link before adding an item to cart\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/product_retrieve_details_response',\n $defs: {\n product_retrieve_details_response: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n productResults: {\n type: 'object',\n properties: {\n brand: {\n type: 'string'\n },\n rating: {\n type: 'number'\n },\n reviews: {\n type: 'number'\n },\n stores: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n link: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n price: {\n type: 'string'\n },\n shipping: {\n type: 'string'\n },\n total: {\n type: 'string'\n }\n },\n required: [ 'link',\n 'name',\n 'price',\n 'shipping',\n 'total'\n ]\n }\n },\n thumbnails: {\n type: 'array',\n items: {\n type: 'string'\n }\n },\n title: {\n type: 'string'\n },\n userReviews: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n rating: {\n type: 'number'\n },\n source: {\n type: 'string'\n },\n text: {\n type: 'string'\n },\n title: {\n type: 'string'\n },\n userName: {\n type: 'string'\n }\n },\n required: [ 'rating',\n 'source',\n 'text',\n 'title',\n 'userName'\n ]\n }\n },\n variants: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n available: {\n type: 'boolean'\n },\n selected: {\n type: 'boolean'\n }\n },\n required: [ 'name'\n ]\n }\n },\n title: {\n type: 'string'\n }\n },\n required: [ 'items',\n 'title'\n ]\n }\n }\n },\n required: [ 'brand',\n 'rating',\n 'reviews',\n 'stores',\n 'thumbnails',\n 'title',\n 'userReviews',\n 'variants'\n ]\n },\n relatedSearches: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n link: {\n type: 'string'\n },\n query: {\n type: 'string'\n },\n image: {\n type: 'string'\n }\n },\n required: [ 'link',\n 'query'\n ]\n }\n }\n },\n required: [ 'productResults',\n 'relatedSearches'\n ]\n },\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n }\n },\n required: [ 'data',\n 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
productId: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Product ID',
|
|
21
|
+
},
|
|
22
|
+
jq_filter: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
title: 'jq Filter',
|
|
25
|
+
description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
required: ['productId'],
|
|
29
|
+
},
|
|
30
|
+
annotations: {
|
|
31
|
+
readOnlyHint: true,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export const handler = async (client, args) => {
|
|
35
|
+
const { jq_filter, ...body } = args;
|
|
36
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.products.retrieveDetails(body)));
|
|
37
|
+
};
|
|
38
|
+
export default { metadata, tool, handler };
|
|
39
|
+
//# sourceMappingURL=retrieve-product-details.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieve-product-details.mjs","sourceRoot":"","sources":["../../src/tools/products/retrieve-product-details.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,mBAAmB;IAC7B,WAAW,EAAE,mBAAmB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EACT,02KAA02K;IAC52K,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,YAAY;aAC1B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACxG,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-products.js","sourceRoot":"","sources":["../../src/tools/products/search-products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"search-products.js","sourceRoot":"","sources":["../../src/tools/products/search-products.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,kBAAkB;IAC5B,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,6wDAA6wD;IAC/wD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,cAAc;aAC5B;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,OAAO;aACrB;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,QAAQ;aACtB;YACD,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oBAAoB;aAClC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,6BAA6B;aAC3C;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kBAAkB;aAChC;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,cAAc;aAC5B;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,QAAQ;aACtB;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACpB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { asTextContentResult } from '@henrylabs/mcp/tools/types';
|
|
|
4
4
|
export const metadata = {
|
|
5
5
|
resource: 'products',
|
|
6
6
|
operation: 'write',
|
|
7
|
-
tags: [],
|
|
7
|
+
tags: ['headless', 'hosted'],
|
|
8
8
|
httpMethod: 'post',
|
|
9
9
|
httpPath: '/products/search',
|
|
10
10
|
operationId: 'searchProducts',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-products.mjs","sourceRoot":"","sources":["../../src/tools/products/search-products.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"search-products.mjs","sourceRoot":"","sources":["../../src/tools/products/search-products.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;IAC5B,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,kBAAkB;IAC5B,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,6wDAA6wD;IAC/wD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,cAAc;aAC5B;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,OAAO;aACrB;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,QAAQ;aACtB;YACD,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oBAAoB;aAClC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,6BAA6B;aAC3C;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kBAAkB;aAChC;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,cAAc;aAC5B;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,QAAQ;aACtB;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,MAAM;aACpB;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Metadata } from '@henrylabs/mcp/tools/types';
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import HenrySDK from '@henrylabs/sdk';
|
|
4
|
+
export declare const metadata: Metadata;
|
|
5
|
+
export declare const tool: Tool;
|
|
6
|
+
export declare const handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
metadata: Metadata;
|
|
9
|
+
tool: {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
name: string;
|
|
12
|
+
inputSchema: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
type: "object";
|
|
15
|
+
properties?: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
} | undefined;
|
|
18
|
+
required?: string[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
outputSchema?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
type: "object";
|
|
25
|
+
properties?: {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
} | undefined;
|
|
28
|
+
required?: string[] | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
annotations?: {
|
|
31
|
+
[x: string]: unknown;
|
|
32
|
+
title?: string | undefined;
|
|
33
|
+
readOnlyHint?: boolean | undefined;
|
|
34
|
+
destructiveHint?: boolean | undefined;
|
|
35
|
+
idempotentHint?: boolean | undefined;
|
|
36
|
+
openWorldHint?: boolean | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
_meta?: {
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
} | undefined;
|
|
41
|
+
};
|
|
42
|
+
handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
45
|
+
//# sourceMappingURL=collect-payment-details.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect-payment-details.d.mts","sourceRoot":"","sources":["../../src/tools/wallet/collect-payment-details.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAwBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
|
|
@@ -42,4 +42,4 @@ declare const _default: {
|
|
|
42
42
|
handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
|
|
43
43
|
};
|
|
44
44
|
export default _default;
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=collect-payment-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect-payment-details.d.ts","sourceRoot":"","sources":["../../src/tools/wallet/collect-payment-details.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAwBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
|
|
@@ -7,14 +7,14 @@ const types_1 = require("@henrylabs/mcp/tools/types");
|
|
|
7
7
|
exports.metadata = {
|
|
8
8
|
resource: 'wallet',
|
|
9
9
|
operation: 'write',
|
|
10
|
-
tags: [],
|
|
10
|
+
tags: ['headless'],
|
|
11
11
|
httpMethod: 'post',
|
|
12
12
|
httpPath: '/wallet/card-collect',
|
|
13
13
|
operationId: 'initiateCardCollect',
|
|
14
14
|
};
|
|
15
15
|
exports.tool = {
|
|
16
|
-
name: '
|
|
17
|
-
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nReturns a modal URL for users to save payment cards. Supports both authenticated and guest card collection
|
|
16
|
+
name: 'collect_payment_details',
|
|
17
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nReturns a modal URL for users to save payment cards. Supports both authenticated and guest card collection. Must be called at some point before checkout session is confirmed. After payment details are saved, they can proceed with checkout confirmation.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/wallet_create_card_collection_response',\n $defs: {\n wallet_create_card_collection_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n modal_url: {\n type: 'string'\n }\n },\n required: [ 'modal_url'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
|
|
18
18
|
inputSchema: {
|
|
19
19
|
type: 'object',
|
|
20
20
|
properties: {
|
|
@@ -41,4 +41,4 @@ const handler = async (client, args) => {
|
|
|
41
41
|
};
|
|
42
42
|
exports.handler = handler;
|
|
43
43
|
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
44
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=collect-payment-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect-payment-details.js","sourceRoot":"","sources":["../../src/tools/wallet/collect-payment-details.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,sBAAsB;IAChC,WAAW,EAAE,qBAAqB;CACnC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,ymCAAymC;IAC3mC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,wEAAwE;aACtF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -4,14 +4,14 @@ import { asTextContentResult } from '@henrylabs/mcp/tools/types';
|
|
|
4
4
|
export const metadata = {
|
|
5
5
|
resource: 'wallet',
|
|
6
6
|
operation: 'write',
|
|
7
|
-
tags: [],
|
|
7
|
+
tags: ['headless'],
|
|
8
8
|
httpMethod: 'post',
|
|
9
9
|
httpPath: '/wallet/card-collect',
|
|
10
10
|
operationId: 'initiateCardCollect',
|
|
11
11
|
};
|
|
12
12
|
export const tool = {
|
|
13
|
-
name: '
|
|
14
|
-
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nReturns a modal URL for users to save payment cards. Supports both authenticated and guest card collection
|
|
13
|
+
name: 'collect_payment_details',
|
|
14
|
+
description: "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nReturns a modal URL for users to save payment cards. Supports both authenticated and guest card collection. Must be called at some point before checkout session is confirmed. After payment details are saved, they can proceed with checkout confirmation.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/wallet_create_card_collection_response',\n $defs: {\n wallet_create_card_collection_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n modal_url: {\n type: 'string'\n }\n },\n required: [ 'modal_url'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
|
|
15
15
|
inputSchema: {
|
|
16
16
|
type: 'object',
|
|
17
17
|
properties: {
|
|
@@ -37,4 +37,4 @@ export const handler = async (client, args) => {
|
|
|
37
37
|
return asTextContentResult(await maybeFilter(jq_filter, await client.wallet.createCardCollection(body)));
|
|
38
38
|
};
|
|
39
39
|
export default { metadata, tool, handler };
|
|
40
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=collect-payment-details.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect-payment-details.mjs","sourceRoot":"","sources":["../../src/tools/wallet/collect-payment-details.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,sBAAsB;IAChC,WAAW,EAAE,qBAAqB;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EACT,ymCAAymC;IAC3mC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,wEAAwE;aACtF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { maybeFilter } from '@henrylabs/mcp/filtering';
|
|
4
|
-
import { Metadata, asTextContentResult } from '@henrylabs/mcp/tools/types';
|
|
5
|
-
|
|
6
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
import HenrySDK from '@henrylabs/sdk';
|
|
8
|
-
|
|
9
|
-
export const metadata: Metadata = {
|
|
10
|
-
resource: 'cart.items',
|
|
11
|
-
operation: 'write',
|
|
12
|
-
tags: [],
|
|
13
|
-
httpMethod: 'post',
|
|
14
|
-
httpPath: '/cart/items',
|
|
15
|
-
operationId: 'addCartItems',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const tool: Tool = {
|
|
19
|
-
name: 'add_cart_items',
|
|
20
|
-
description:
|
|
21
|
-
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nAdds product data to existing cart or create a new one.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_add_response',\n $defs: {\n item_add_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n added_products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n price: {\n type: 'string'\n },\n productId: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'name',\n 'price',\n 'productId',\n 'quantity'\n ]\n }\n },\n cart_summary: {\n type: 'object',\n properties: {\n total_items: {\n type: 'number'\n },\n total_unique_products: {\n type: 'number'\n }\n },\n required: [ 'total_items',\n 'total_unique_products'\n ]\n },\n updated_products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n addedQuantity: {\n type: 'number'\n },\n name: {\n type: 'string'\n },\n previousQuantity: {\n type: 'number'\n },\n price: {\n type: 'string'\n },\n productId: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'addedQuantity',\n 'name',\n 'previousQuantity',\n 'price',\n 'productId',\n 'quantity'\n ]\n }\n },\n variant_checks: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n productId: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n variantCheckRequestId: {\n type: 'string'\n }\n },\n required: [ 'productId',\n 'status',\n 'variantCheckRequestId'\n ]\n }\n }\n },\n required: [ 'added_products',\n 'cart_summary',\n 'updated_products'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
productsDetails: {
|
|
26
|
-
type: 'array',
|
|
27
|
-
items: {
|
|
28
|
-
type: 'object',
|
|
29
|
-
properties: {
|
|
30
|
-
name: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
description: 'Product name',
|
|
33
|
-
},
|
|
34
|
-
price: {
|
|
35
|
-
type: 'string',
|
|
36
|
-
description: 'Product price',
|
|
37
|
-
},
|
|
38
|
-
productLink: {
|
|
39
|
-
type: 'string',
|
|
40
|
-
description: 'Product link',
|
|
41
|
-
},
|
|
42
|
-
quantity: {
|
|
43
|
-
type: 'number',
|
|
44
|
-
description: 'Quantity',
|
|
45
|
-
},
|
|
46
|
-
affiliateProductLink: {
|
|
47
|
-
type: 'string',
|
|
48
|
-
description:
|
|
49
|
-
'Affiliate product link (if provided, will be used instead of productLink for order fulfillment)',
|
|
50
|
-
},
|
|
51
|
-
metadata: {
|
|
52
|
-
type: 'object',
|
|
53
|
-
description: 'Product metadata',
|
|
54
|
-
additionalProperties: true,
|
|
55
|
-
},
|
|
56
|
-
productId: {
|
|
57
|
-
type: 'string',
|
|
58
|
-
description: 'Product Id',
|
|
59
|
-
},
|
|
60
|
-
productImageLink: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
description: 'Product image link (thumbnail)',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
required: ['name', 'price', 'productLink', 'quantity'],
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
'x-user-id': {
|
|
69
|
-
type: 'string',
|
|
70
|
-
},
|
|
71
|
-
checkVariantAvailability: {
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
description:
|
|
74
|
-
'Whether to check variant availability after adding to cart. If true, variant check requests will be created for products with metadata and requestIds returned.',
|
|
75
|
-
},
|
|
76
|
-
jq_filter: {
|
|
77
|
-
type: 'string',
|
|
78
|
-
title: 'jq Filter',
|
|
79
|
-
description:
|
|
80
|
-
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
required: ['productsDetails', 'x-user-id'],
|
|
84
|
-
},
|
|
85
|
-
annotations: {},
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export const handler = async (client: HenrySDK, args: Record<string, unknown> | undefined) => {
|
|
89
|
-
const { jq_filter, ...body } = args as any;
|
|
90
|
-
return asTextContentResult(await maybeFilter(jq_filter, await client.cart.items.add(body)));
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export default { metadata, tool, handler };
|