@solidcommerce/mcp-server 2.0.0-alpha.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 +74 -0
- package/bin/solidcommerce-mcp.js +8 -0
- package/dist/audit/auditClient.d.ts +51 -0
- package/dist/audit/auditClient.d.ts.map +1 -0
- package/dist/audit/auditClient.js +93 -0
- package/dist/audit/auditClient.js.map +1 -0
- package/dist/auth/apiKey.d.ts +44 -0
- package/dist/auth/apiKey.d.ts.map +1 -0
- package/dist/auth/apiKey.js +80 -0
- package/dist/auth/apiKey.js.map +1 -0
- package/dist/auth/oauth.d.ts +108 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/auth/oauth.js +300 -0
- package/dist/auth/oauth.js.map +1 -0
- package/dist/generator/fromOpenApi.d.ts +54 -0
- package/dist/generator/fromOpenApi.d.ts.map +1 -0
- package/dist/generator/fromOpenApi.js +411 -0
- package/dist/generator/fromOpenApi.js.map +1 -0
- package/dist/generator/schemaToZod.d.ts +81 -0
- package/dist/generator/schemaToZod.d.ts.map +1 -0
- package/dist/generator/schemaToZod.js +277 -0
- package/dist/generator/schemaToZod.js.map +1 -0
- package/dist/generator/scopeInference.d.ts +26 -0
- package/dist/generator/scopeInference.d.ts.map +1 -0
- package/dist/generator/scopeInference.js +91 -0
- package/dist/generator/scopeInference.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/server/buildServer.d.ts +35 -0
- package/dist/server/buildServer.d.ts.map +1 -0
- package/dist/server/buildServer.js +104 -0
- package/dist/server/buildServer.js.map +1 -0
- package/dist/server/dispatcher.d.ts +14 -0
- package/dist/server/dispatcher.d.ts.map +1 -0
- package/dist/server/dispatcher.js +190 -0
- package/dist/server/dispatcher.js.map +1 -0
- package/dist/session.d.ts +9 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +11 -0
- package/dist/session.js.map +1 -0
- package/dist/telemetry/hostName.d.ts +26 -0
- package/dist/telemetry/hostName.d.ts.map +1 -0
- package/dist/telemetry/hostName.js +80 -0
- package/dist/telemetry/hostName.js.map +1 -0
- package/dist/tools/contract.d.ts +125 -0
- package/dist/tools/contract.d.ts.map +1 -0
- package/dist/tools/contract.js +101 -0
- package/dist/tools/contract.js.map +1 -0
- package/dist/tools/foundation/catalog_amazon_items_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_amazon_items_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_amazon_items_list.js +47 -0
- package/dist/tools/foundation/catalog_amazon_items_list.js.map +1 -0
- package/dist/tools/foundation/catalog_attribute_filters_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_attribute_filters_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_attribute_filters_list.js +47 -0
- package/dist/tools/foundation/catalog_attribute_filters_list.js.map +1 -0
- package/dist/tools/foundation/catalog_attribute_tags_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_attribute_tags_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_attribute_tags_list.js +47 -0
- package/dist/tools/foundation/catalog_attribute_tags_list.js.map +1 -0
- package/dist/tools/foundation/catalog_attributes_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_attributes_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_attributes_list.js +57 -0
- package/dist/tools/foundation/catalog_attributes_list.js.map +1 -0
- package/dist/tools/foundation/catalog_column_views_default_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_column_views_default_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_column_views_default_list.js +47 -0
- package/dist/tools/foundation/catalog_column_views_default_list.js.map +1 -0
- package/dist/tools/foundation/catalog_column_views_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_column_views_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_column_views_list.js +47 -0
- package/dist/tools/foundation/catalog_column_views_list.js.map +1 -0
- package/dist/tools/foundation/catalog_ebay_categories_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_ebay_categories_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_ebay_categories_list.js +56 -0
- package/dist/tools/foundation/catalog_ebay_categories_list.js.map +1 -0
- package/dist/tools/foundation/catalog_ebay_category_specifics_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_ebay_category_specifics_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_ebay_category_specifics_list.js +56 -0
- package/dist/tools/foundation/catalog_ebay_category_specifics_list.js.map +1 -0
- package/dist/tools/foundation/catalog_ebay_listing_templates_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_ebay_listing_templates_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_ebay_listing_templates_list.js +47 -0
- package/dist/tools/foundation/catalog_ebay_listing_templates_list.js.map +1 -0
- package/dist/tools/foundation/catalog_ebay_product_search_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_ebay_product_search_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_ebay_product_search_list.js +56 -0
- package/dist/tools/foundation/catalog_ebay_product_search_list.js.map +1 -0
- package/dist/tools/foundation/catalog_ebay_template_fields_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_ebay_template_fields_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_ebay_template_fields_list.js +47 -0
- package/dist/tools/foundation/catalog_ebay_template_fields_list.js.map +1 -0
- package/dist/tools/foundation/catalog_ebay_variation_groups_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_ebay_variation_groups_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_ebay_variation_groups_list.js +56 -0
- package/dist/tools/foundation/catalog_ebay_variation_groups_list.js.map +1 -0
- package/dist/tools/foundation/catalog_inventory_sources_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_inventory_sources_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_inventory_sources_list.js +47 -0
- package/dist/tools/foundation/catalog_inventory_sources_list.js.map +1 -0
- package/dist/tools/foundation/catalog_listing_rules_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_listing_rules_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_listing_rules_list.js +47 -0
- package/dist/tools/foundation/catalog_listing_rules_list.js.map +1 -0
- package/dist/tools/foundation/catalog_listing_templates_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_listing_templates_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_listing_templates_list.js +47 -0
- package/dist/tools/foundation/catalog_listing_templates_list.js.map +1 -0
- package/dist/tools/foundation/catalog_manufacturers_all_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_manufacturers_all_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_manufacturers_all_list.js +47 -0
- package/dist/tools/foundation/catalog_manufacturers_all_list.js.map +1 -0
- package/dist/tools/foundation/catalog_manufacturers_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_manufacturers_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_manufacturers_list.js +47 -0
- package/dist/tools/foundation/catalog_manufacturers_list.js.map +1 -0
- package/dist/tools/foundation/catalog_market_lists_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_market_lists_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_market_lists_list.js +47 -0
- package/dist/tools/foundation/catalog_market_lists_list.js.map +1 -0
- package/dist/tools/foundation/catalog_product_usage_filters_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_product_usage_filters_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_product_usage_filters_list.js +47 -0
- package/dist/tools/foundation/catalog_product_usage_filters_list.js.map +1 -0
- package/dist/tools/foundation/catalog_product_usage_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_product_usage_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_product_usage_list.js +61 -0
- package/dist/tools/foundation/catalog_product_usage_list.js.map +1 -0
- package/dist/tools/foundation/catalog_product_usage_totals_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_product_usage_totals_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_product_usage_totals_list.js +58 -0
- package/dist/tools/foundation/catalog_product_usage_totals_list.js.map +1 -0
- package/dist/tools/foundation/catalog_products_generate_sku_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_products_generate_sku_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_products_generate_sku_list.js +47 -0
- package/dist/tools/foundation/catalog_products_generate_sku_list.js.map +1 -0
- package/dist/tools/foundation/catalog_products_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_products_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_products_list.js +60 -0
- package/dist/tools/foundation/catalog_products_list.js.map +1 -0
- package/dist/tools/foundation/catalog_taxonomy_channels_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_taxonomy_channels_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_taxonomy_channels_list.js +47 -0
- package/dist/tools/foundation/catalog_taxonomy_channels_list.js.map +1 -0
- package/dist/tools/foundation/catalog_taxonomy_mappings_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_taxonomy_mappings_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_taxonomy_mappings_list.js +56 -0
- package/dist/tools/foundation/catalog_taxonomy_mappings_list.js.map +1 -0
- package/dist/tools/foundation/catalog_taxonomy_product_values_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_taxonomy_product_values_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_taxonomy_product_values_list.js +57 -0
- package/dist/tools/foundation/catalog_taxonomy_product_values_list.js.map +1 -0
- package/dist/tools/foundation/catalog_tree_list.d.ts +4 -0
- package/dist/tools/foundation/catalog_tree_list.d.ts.map +1 -0
- package/dist/tools/foundation/catalog_tree_list.js +47 -0
- package/dist/tools/foundation/catalog_tree_list.js.map +1 -0
- package/dist/tools/foundation/crm_customers_list.d.ts +4 -0
- package/dist/tools/foundation/crm_customers_list.d.ts.map +1 -0
- package/dist/tools/foundation/crm_customers_list.js +59 -0
- package/dist/tools/foundation/crm_customers_list.js.map +1 -0
- package/dist/tools/foundation/fulfillment_manifests_list.d.ts +4 -0
- package/dist/tools/foundation/fulfillment_manifests_list.d.ts.map +1 -0
- package/dist/tools/foundation/fulfillment_manifests_list.js +47 -0
- package/dist/tools/foundation/fulfillment_manifests_list.js.map +1 -0
- package/dist/tools/foundation/fulfillment_ship_now_addresses_list.d.ts +4 -0
- package/dist/tools/foundation/fulfillment_ship_now_addresses_list.d.ts.map +1 -0
- package/dist/tools/foundation/fulfillment_ship_now_addresses_list.js +47 -0
- package/dist/tools/foundation/fulfillment_ship_now_addresses_list.js.map +1 -0
- package/dist/tools/foundation/fulfillment_ship_now_dictionaries_list.d.ts +4 -0
- package/dist/tools/foundation/fulfillment_ship_now_dictionaries_list.d.ts.map +1 -0
- package/dist/tools/foundation/fulfillment_ship_now_dictionaries_list.js +56 -0
- package/dist/tools/foundation/fulfillment_ship_now_dictionaries_list.js.map +1 -0
- package/dist/tools/foundation/index.d.ts +8 -0
- package/dist/tools/foundation/index.d.ts.map +1 -0
- package/dist/tools/foundation/index.js +93 -0
- package/dist/tools/foundation/index.js.map +1 -0
- package/dist/tools/foundation/inventory_alert_rules_list.d.ts +4 -0
- package/dist/tools/foundation/inventory_alert_rules_list.d.ts.map +1 -0
- package/dist/tools/foundation/inventory_alert_rules_list.js +47 -0
- package/dist/tools/foundation/inventory_alert_rules_list.js.map +1 -0
- package/dist/tools/foundation/inventory_alert_settings_list.d.ts +4 -0
- package/dist/tools/foundation/inventory_alert_settings_list.d.ts.map +1 -0
- package/dist/tools/foundation/inventory_alert_settings_list.js +47 -0
- package/dist/tools/foundation/inventory_alert_settings_list.js.map +1 -0
- package/dist/tools/foundation/inventory_analytics_alert_count_list.d.ts +4 -0
- package/dist/tools/foundation/inventory_analytics_alert_count_list.d.ts.map +1 -0
- package/dist/tools/foundation/inventory_analytics_alert_count_list.js +47 -0
- package/dist/tools/foundation/inventory_analytics_alert_count_list.js.map +1 -0
- package/dist/tools/foundation/inventory_rules_list.d.ts +4 -0
- package/dist/tools/foundation/inventory_rules_list.d.ts.map +1 -0
- package/dist/tools/foundation/inventory_rules_list.js +47 -0
- package/dist/tools/foundation/inventory_rules_list.js.map +1 -0
- package/dist/tools/foundation/inventory_rules_periods_list.d.ts +4 -0
- package/dist/tools/foundation/inventory_rules_periods_list.d.ts.map +1 -0
- package/dist/tools/foundation/inventory_rules_periods_list.js +47 -0
- package/dist/tools/foundation/inventory_rules_periods_list.js.map +1 -0
- package/dist/tools/foundation/inventory_seasonal_factors_list.d.ts +4 -0
- package/dist/tools/foundation/inventory_seasonal_factors_list.d.ts.map +1 -0
- package/dist/tools/foundation/inventory_seasonal_factors_list.js +47 -0
- package/dist/tools/foundation/inventory_seasonal_factors_list.js.map +1 -0
- package/dist/tools/foundation/inventory_warehouses_list.d.ts +4 -0
- package/dist/tools/foundation/inventory_warehouses_list.d.ts.map +1 -0
- package/dist/tools/foundation/inventory_warehouses_list.js +47 -0
- package/dist/tools/foundation/inventory_warehouses_list.js.map +1 -0
- package/dist/tools/foundation/listings_dictionary_marketplace_locales_list.d.ts +4 -0
- package/dist/tools/foundation/listings_dictionary_marketplace_locales_list.d.ts.map +1 -0
- package/dist/tools/foundation/listings_dictionary_marketplace_locales_list.js +56 -0
- package/dist/tools/foundation/listings_dictionary_marketplace_locales_list.js.map +1 -0
- package/dist/tools/foundation/listings_dictionary_marketplaces_list.d.ts +4 -0
- package/dist/tools/foundation/listings_dictionary_marketplaces_list.d.ts.map +1 -0
- package/dist/tools/foundation/listings_dictionary_marketplaces_list.js +47 -0
- package/dist/tools/foundation/listings_dictionary_marketplaces_list.js.map +1 -0
- package/dist/tools/tasks/bulk_update_prices.d.ts +4 -0
- package/dist/tools/tasks/bulk_update_prices.d.ts.map +1 -0
- package/dist/tools/tasks/bulk_update_prices.js +96 -0
- package/dist/tools/tasks/bulk_update_prices.js.map +1 -0
- package/dist/tools/tasks/cancel_order_with_reason.d.ts +4 -0
- package/dist/tools/tasks/cancel_order_with_reason.d.ts.map +1 -0
- package/dist/tools/tasks/cancel_order_with_reason.js +117 -0
- package/dist/tools/tasks/cancel_order_with_reason.js.map +1 -0
- package/dist/tools/tasks/check_listing_health.d.ts +4 -0
- package/dist/tools/tasks/check_listing_health.d.ts.map +1 -0
- package/dist/tools/tasks/check_listing_health.js +123 -0
- package/dist/tools/tasks/check_listing_health.js.map +1 -0
- package/dist/tools/tasks/create_and_submit_purchase_order.d.ts +4 -0
- package/dist/tools/tasks/create_and_submit_purchase_order.d.ts.map +1 -0
- package/dist/tools/tasks/create_and_submit_purchase_order.js +142 -0
- package/dist/tools/tasks/create_and_submit_purchase_order.js.map +1 -0
- package/dist/tools/tasks/find_product_by_sku.d.ts +4 -0
- package/dist/tools/tasks/find_product_by_sku.d.ts.map +1 -0
- package/dist/tools/tasks/find_product_by_sku.js +68 -0
- package/dist/tools/tasks/find_product_by_sku.js.map +1 -0
- package/dist/tools/tasks/fulfill_order.d.ts +4 -0
- package/dist/tools/tasks/fulfill_order.d.ts.map +1 -0
- package/dist/tools/tasks/fulfill_order.js +121 -0
- package/dist/tools/tasks/fulfill_order.js.map +1 -0
- package/dist/tools/tasks/get_inventory_across_warehouses.d.ts +4 -0
- package/dist/tools/tasks/get_inventory_across_warehouses.d.ts.map +1 -0
- package/dist/tools/tasks/get_inventory_across_warehouses.js +118 -0
- package/dist/tools/tasks/get_inventory_across_warehouses.js.map +1 -0
- package/dist/tools/tasks/index.d.ts +14 -0
- package/dist/tools/tasks/index.d.ts.map +1 -0
- package/dist/tools/tasks/index.js +32 -0
- package/dist/tools/tasks/index.js.map +1 -0
- package/dist/tools/tasks/publish_product_to_channels.d.ts +4 -0
- package/dist/tools/tasks/publish_product_to_channels.d.ts.map +1 -0
- package/dist/tools/tasks/publish_product_to_channels.js +109 -0
- package/dist/tools/tasks/publish_product_to_channels.js.map +1 -0
- package/dist/tools/tasks/reply_to_buyer_message.d.ts +4 -0
- package/dist/tools/tasks/reply_to_buyer_message.d.ts.map +1 -0
- package/dist/tools/tasks/reply_to_buyer_message.js +72 -0
- package/dist/tools/tasks/reply_to_buyer_message.js.map +1 -0
- package/dist/tools/tasks/reprice_listing.d.ts +4 -0
- package/dist/tools/tasks/reprice_listing.d.ts.map +1 -0
- package/dist/tools/tasks/reprice_listing.js +74 -0
- package/dist/tools/tasks/reprice_listing.js.map +1 -0
- package/dist/transports/stdio.d.ts +12 -0
- package/dist/transports/stdio.d.ts.map +1 -0
- package/dist/transports/stdio.js +30 -0
- package/dist/transports/stdio.js.map +1 -0
- package/dist/transports/streamableHttp.d.ts +33 -0
- package/dist/transports/streamableHttp.d.ts.map +1 -0
- package/dist/transports/streamableHttp.js +237 -0
- package/dist/transports/streamableHttp.js.map +1 -0
- package/package.json +47 -0
- package/vendor/openapi.snapshot.json +19887 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// src/tools/contract.ts
|
|
3
|
+
// Wave: W6 — Shared tool contract.
|
|
4
|
+
//
|
|
5
|
+
// Streams A (foundation), B (tasks), and C (server core / dispatcher) all
|
|
6
|
+
// agree on these types. A & B export ToolModule instances; C imports them and
|
|
7
|
+
// exposes them over the MCP wire protocol.
|
|
8
|
+
//
|
|
9
|
+
// Why this exists: streams run in parallel via worktree-isolated sub-agents.
|
|
10
|
+
// Pinning the interface here lets each stream work without blocking on the
|
|
11
|
+
// others' implementation details.
|
|
12
|
+
// =============================================================================
|
|
13
|
+
/**
|
|
14
|
+
* Map a thrown SDK error into a structured ToolResult. Used by the
|
|
15
|
+
* dispatcher (Stream C) AND by task tools (Stream B) when they catch
|
|
16
|
+
* partial failures and want to fold them into the result.
|
|
17
|
+
*
|
|
18
|
+
* Accepts three input shapes:
|
|
19
|
+
*
|
|
20
|
+
* 1. A typed `ApiError` (or duck-typed equivalent) with camelCase fields
|
|
21
|
+
* (`requiredScope`, `requestId`, `retryAfter`). This is what the SDK's
|
|
22
|
+
* `unwrap()` / `mapErrorEnvelope()` produces.
|
|
23
|
+
*
|
|
24
|
+
* 2. The raw openapi-fetch `result.error` — the *parsed JSON body* of a
|
|
25
|
+
* 4xx/5xx response. Foundation tools call `client.raw.<METHOD>(...)`
|
|
26
|
+
* directly and forward `result.error` here without going through
|
|
27
|
+
* `unwrap()`. The body is shaped `{ error: { type, code, message,
|
|
28
|
+
* required_scope, retry_after, request_id, ... } }` (snake_case wire
|
|
29
|
+
* fields). We unwrap one layer if present.
|
|
30
|
+
*
|
|
31
|
+
* 3. Anything else (network-level errors, plain `Error`, etc.) — wrapped
|
|
32
|
+
* as `type: "transport"` so the LLM doesn't try to interpret a
|
|
33
|
+
* missing `required_scope`.
|
|
34
|
+
*
|
|
35
|
+
* Why the unwrap matters for W6 acceptance: §4 requires that scope-denied
|
|
36
|
+
* tool calls surface the `required_scope` field on the wire. Without the
|
|
37
|
+
* unwrap, foundation tools (which forward `result.error` from openapi-fetch)
|
|
38
|
+
* would emit `type: "transport"` and lose `required_scope` entirely. See
|
|
39
|
+
* test/e2e/inspector.test.ts and scripts/w6_smoke.sh probe A6.
|
|
40
|
+
*/
|
|
41
|
+
export function mapSdkErrorToToolResult(err) {
|
|
42
|
+
// Shape 2: openapi-fetch wrapped envelope. Detect by the presence of an
|
|
43
|
+
// `error` sub-object whose `type` is a string. We do this BEFORE the
|
|
44
|
+
// typed-ApiError path because an `ApiError` instance never has its own
|
|
45
|
+
// nested `.error` field.
|
|
46
|
+
if (err !== null &&
|
|
47
|
+
typeof err === "object" &&
|
|
48
|
+
"error" in err &&
|
|
49
|
+
err.error !== null &&
|
|
50
|
+
typeof err.error === "object") {
|
|
51
|
+
const envelope = err.error;
|
|
52
|
+
if (typeof envelope["type"] === "string") {
|
|
53
|
+
const structured = {
|
|
54
|
+
type: envelope["type"],
|
|
55
|
+
...(typeof envelope["code"] === "string" ? { code: envelope["code"] } : {}),
|
|
56
|
+
...(typeof envelope["required_scope"] === "string"
|
|
57
|
+
? { required_scope: envelope["required_scope"] }
|
|
58
|
+
: {}),
|
|
59
|
+
...(typeof envelope["retry_after"] === "number"
|
|
60
|
+
? { retry_after: envelope["retry_after"] }
|
|
61
|
+
: {}),
|
|
62
|
+
...(typeof envelope["request_id"] === "string"
|
|
63
|
+
? { request_id: envelope["request_id"] }
|
|
64
|
+
: {}),
|
|
65
|
+
...(typeof envelope["message"] === "string" ? { message: envelope["message"] } : {}),
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
content: [{ type: "json", json: { error: structured } }],
|
|
69
|
+
isError: true,
|
|
70
|
+
structuredError: structured,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Shape 1: typed ApiError (or duck-typed equivalent with camelCase fields).
|
|
75
|
+
// Soft duck-type: avoid an `instanceof` import cycle from "@solidcommerce/sdk".
|
|
76
|
+
const e = err;
|
|
77
|
+
if (e && typeof e === "object" && typeof e.type === "string") {
|
|
78
|
+
const structured = {
|
|
79
|
+
type: e.type,
|
|
80
|
+
...(e.code ? { code: e.code } : {}),
|
|
81
|
+
...(e.requiredScope ? { required_scope: e.requiredScope } : {}),
|
|
82
|
+
...(e.retryAfter !== null && e.retryAfter !== undefined ? { retry_after: e.retryAfter } : {}),
|
|
83
|
+
...(e.requestId ? { request_id: e.requestId } : {}),
|
|
84
|
+
...(e.message ? { message: e.message } : {}),
|
|
85
|
+
};
|
|
86
|
+
return {
|
|
87
|
+
content: [{ type: "json", json: { error: structured } }],
|
|
88
|
+
isError: true,
|
|
89
|
+
structuredError: structured,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
// Shape 3: anything else.
|
|
93
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
94
|
+
const structured = { type: "transport", message };
|
|
95
|
+
return {
|
|
96
|
+
content: [{ type: "json", json: { error: structured } }],
|
|
97
|
+
isError: true,
|
|
98
|
+
structuredError: structured,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=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AAC,CAAC,EAAE,CAAC;YAC7F,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnD,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC7C,CAAC;QACF,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC;YACxD,OAAO,EAAE,IAAI;YACb,eAAe,EAAE,UAAU;SAC5B,CAAC;IACJ,CAAC;IAED,0BAA0B;IAC1B,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,MAAM,UAAU,GAAoB,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;IACnE,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC;QACxD,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,UAAU;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_amazon_items_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_amazon_items_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAuCxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/amazon/items
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({});
|
|
10
|
+
async function handle(args, ctx) {
|
|
11
|
+
let parsed;
|
|
12
|
+
try {
|
|
13
|
+
parsed = inputSchema.parse(args);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
return mapSdkErrorToToolResult(err);
|
|
17
|
+
}
|
|
18
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
19
|
+
try {
|
|
20
|
+
const raw = ctx.client.raw;
|
|
21
|
+
const fn = raw["GET"];
|
|
22
|
+
if (typeof fn !== "function") {
|
|
23
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
24
|
+
}
|
|
25
|
+
const result = await fn("/v1/catalog/amazon/items", {});
|
|
26
|
+
if (result.error !== undefined && result.error !== null) {
|
|
27
|
+
return mapSdkErrorToToolResult(result.error);
|
|
28
|
+
}
|
|
29
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
return mapSdkErrorToToolResult(err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const tool = {
|
|
36
|
+
name: "catalog_amazon_items_list",
|
|
37
|
+
kind: "foundation",
|
|
38
|
+
description: "Requires scope: catalog:amazon_items:read.",
|
|
39
|
+
required_scope: "catalog:amazon_items:read",
|
|
40
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
41
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
42
|
+
readOnlyHint: true,
|
|
43
|
+
inputSchema,
|
|
44
|
+
handle,
|
|
45
|
+
};
|
|
46
|
+
export default tool;
|
|
47
|
+
//# sourceMappingURL=catalog_amazon_items_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_amazon_items_list.js","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_amazon_items_list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wCAAwC;AACxC,iDAAiD;AACjD,oDAAoD;AACpD,gFAAgF;AAEhF,kDAAkD;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,GAIxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAIjC,KAAK,UAAU,MAAM,CAAC,IAAa,EAAE,GAAgB;IACnD,IAAI,MAAY,CAAC;IACjB,IAAI,CAAC;QACH,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAS,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,4DAA4D;IACzE,IAAI,CAAC;QAQH,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,GAAyC,CAAC;QACjE,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,uBAAuB,CAC5B,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAC3C,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,0BAA0B,EAAE,EAAE,CAAC,CAAC;QACxD,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACxD,OAAO,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;IACpE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED,MAAM,IAAI,GAAe;IACvB,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,4CAA4C;IACzD,cAAc,EAAE,2BAA2B;IAC3C,sEAAsE;IACtE,+DAA+D;IAC/D,YAAY,EAAE,IAAI;IAClB,WAAW;IACX,MAAM;CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_attribute_filters_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_attribute_filters_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAuCxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/attribute-filters
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({});
|
|
10
|
+
async function handle(args, ctx) {
|
|
11
|
+
let parsed;
|
|
12
|
+
try {
|
|
13
|
+
parsed = inputSchema.parse(args);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
return mapSdkErrorToToolResult(err);
|
|
17
|
+
}
|
|
18
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
19
|
+
try {
|
|
20
|
+
const raw = ctx.client.raw;
|
|
21
|
+
const fn = raw["GET"];
|
|
22
|
+
if (typeof fn !== "function") {
|
|
23
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
24
|
+
}
|
|
25
|
+
const result = await fn("/v1/catalog/attribute-filters", {});
|
|
26
|
+
if (result.error !== undefined && result.error !== null) {
|
|
27
|
+
return mapSdkErrorToToolResult(result.error);
|
|
28
|
+
}
|
|
29
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
return mapSdkErrorToToolResult(err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const tool = {
|
|
36
|
+
name: "catalog_attribute_filters_list",
|
|
37
|
+
kind: "foundation",
|
|
38
|
+
description: "Requires scope: catalog:attributes:read.",
|
|
39
|
+
required_scope: "catalog:attributes:read",
|
|
40
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
41
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
42
|
+
readOnlyHint: true,
|
|
43
|
+
inputSchema,
|
|
44
|
+
handle,
|
|
45
|
+
};
|
|
46
|
+
export default tool;
|
|
47
|
+
//# sourceMappingURL=catalog_attribute_filters_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_attribute_filters_list.js","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_attribute_filters_list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wCAAwC;AACxC,iDAAiD;AACjD,oDAAoD;AACpD,gFAAgF;AAEhF,uDAAuD;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,GAIxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC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AE,IAAI;IAClB,WAAW;IACX,MAAM;CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_attribute_tags_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_attribute_tags_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAuCxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/attribute-tags
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({});
|
|
10
|
+
async function handle(args, ctx) {
|
|
11
|
+
let parsed;
|
|
12
|
+
try {
|
|
13
|
+
parsed = inputSchema.parse(args);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
return mapSdkErrorToToolResult(err);
|
|
17
|
+
}
|
|
18
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
19
|
+
try {
|
|
20
|
+
const raw = ctx.client.raw;
|
|
21
|
+
const fn = raw["GET"];
|
|
22
|
+
if (typeof fn !== "function") {
|
|
23
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
24
|
+
}
|
|
25
|
+
const result = await fn("/v1/catalog/attribute-tags", {});
|
|
26
|
+
if (result.error !== undefined && result.error !== null) {
|
|
27
|
+
return mapSdkErrorToToolResult(result.error);
|
|
28
|
+
}
|
|
29
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
return mapSdkErrorToToolResult(err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const tool = {
|
|
36
|
+
name: "catalog_attribute_tags_list",
|
|
37
|
+
kind: "foundation",
|
|
38
|
+
description: "Requires scope: catalog:attributes:read.",
|
|
39
|
+
required_scope: "catalog:attributes:read",
|
|
40
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
41
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
42
|
+
readOnlyHint: true,
|
|
43
|
+
inputSchema,
|
|
44
|
+
handle,
|
|
45
|
+
};
|
|
46
|
+
export default tool;
|
|
47
|
+
//# sourceMappingURL=catalog_attribute_tags_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_attribute_tags_list.js","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_attribute_tags_list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wCAAwC;AACxC,iDAAiD;AACjD,oDAAoD;AACpD,gFAAgF;AAEhF,oDAAoD;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,GAIxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAIjC,KAAK,UAAU,MAAM,CAAC,IAAa,EAAE,GAAgB;IACnD,IAAI,MAAY,CAAC;IACjB,IAAI,CAAC;QACH,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAS,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,4DAA4D;IACzE,IAAI,CAAC;QAQH,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,GAAyC,CAAC;QACjE,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,uBAAuB,CAC5B,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAC3C,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,4BAA4B,EAAE,EAAE,CAAC,CAAC;QAC1D,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACxD,OAAO,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;IACpE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED,MAAM,IAAI,GAAe;IACvB,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,0CAA0C;IACvD,cAAc,EAAE,yBAAyB;IACzC,sEAAsE;IACtE,+DAA+D;IAC/D,YAAY,EAAE,IAAI;IAClB,WAAW;IACX,MAAM;CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_attributes_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_attributes_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAiDxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/attributes
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({
|
|
10
|
+
query: z.object({
|
|
11
|
+
limit: z.number().int().optional(),
|
|
12
|
+
starting_after: z.string().optional()
|
|
13
|
+
}).optional()
|
|
14
|
+
});
|
|
15
|
+
async function handle(args, ctx) {
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = inputSchema.parse(args);
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
return mapSdkErrorToToolResult(err);
|
|
22
|
+
}
|
|
23
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
24
|
+
try {
|
|
25
|
+
const requestParams = {
|
|
26
|
+
query: parsed.query,
|
|
27
|
+
};
|
|
28
|
+
const raw = ctx.client.raw;
|
|
29
|
+
const fn = raw["GET"];
|
|
30
|
+
if (typeof fn !== "function") {
|
|
31
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
32
|
+
}
|
|
33
|
+
const result = await fn("/v1/catalog/attributes", {
|
|
34
|
+
params: requestParams,
|
|
35
|
+
});
|
|
36
|
+
if (result.error !== undefined && result.error !== null) {
|
|
37
|
+
return mapSdkErrorToToolResult(result.error);
|
|
38
|
+
}
|
|
39
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
return mapSdkErrorToToolResult(err);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const tool = {
|
|
46
|
+
name: "catalog_attributes_list",
|
|
47
|
+
kind: "foundation",
|
|
48
|
+
description: "Requires scope: catalog:attributes:read.",
|
|
49
|
+
required_scope: "catalog:attributes:read",
|
|
50
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
51
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
52
|
+
readOnlyHint: true,
|
|
53
|
+
inputSchema,
|
|
54
|
+
handle,
|
|
55
|
+
};
|
|
56
|
+
export default tool;
|
|
57
|
+
//# sourceMappingURL=catalog_attributes_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_attributes_list.js","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_attributes_list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wCAAwC;AACxC,iDAAiD;AACjD,oDAAoD;AACpD,gFAAgF;AAEhF,gDAAgD;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,GAIxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAClC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACtC,CAAC,CAAC,QAAQ,EAAE;CACZ,CAAC,CAAC;AAIH,KAAK,UAAU,MAAM,CAAC,IAAa,EAAE,GAAgB;IACnD,IAAI,MAAY,CAAC;IACjB,IAAI,CAAC;QACH,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAS,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,4DAA4D;IACzE,IAAI,CAAC;QACL,MAAM,aAAa,GAAG;YACpB,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC;QAQA,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,GAAyC,CAAC;QACjE,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,uBAAuB,CAC5B,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAC3C,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,wBAAwB,EAAE;YAClD,MAAM,EAAE,aAAa;SACtB,CAAC,CAAC;QACD,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACxD,OAAO,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;IACpE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED,MAAM,IAAI,GAAe;IACvB,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,0CAA0C;IACvD,cAAc,EAAE,yBAAyB;IACzC,sEAAsE;IACtE,+DAA+D;IAC/D,YAAY,EAAE,IAAI;IAClB,WAAW;IACX,MAAM;CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_column_views_default_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_column_views_default_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAuCxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/column-views/default
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({});
|
|
10
|
+
async function handle(args, ctx) {
|
|
11
|
+
let parsed;
|
|
12
|
+
try {
|
|
13
|
+
parsed = inputSchema.parse(args);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
return mapSdkErrorToToolResult(err);
|
|
17
|
+
}
|
|
18
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
19
|
+
try {
|
|
20
|
+
const raw = ctx.client.raw;
|
|
21
|
+
const fn = raw["GET"];
|
|
22
|
+
if (typeof fn !== "function") {
|
|
23
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
24
|
+
}
|
|
25
|
+
const result = await fn("/v1/catalog/column-views/default", {});
|
|
26
|
+
if (result.error !== undefined && result.error !== null) {
|
|
27
|
+
return mapSdkErrorToToolResult(result.error);
|
|
28
|
+
}
|
|
29
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
return mapSdkErrorToToolResult(err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const tool = {
|
|
36
|
+
name: "catalog_column_views_default_list",
|
|
37
|
+
kind: "foundation",
|
|
38
|
+
description: "Requires scope: catalog:column_views:read.",
|
|
39
|
+
required_scope: "catalog:column_views:read",
|
|
40
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
41
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
42
|
+
readOnlyHint: true,
|
|
43
|
+
inputSchema,
|
|
44
|
+
handle,
|
|
45
|
+
};
|
|
46
|
+
export default tool;
|
|
47
|
+
//# sourceMappingURL=catalog_column_views_default_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_column_views_default_list.js","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_column_views_default_list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wCAAwC;AACxC,iDAAiD;AACjD,oDAAoD;AACpD,gFAAgF;AAEhF,0DAA0D;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,GAIxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAIjC,KAAK,UAAU,MAAM,CAAC,IAAa,EAAE,GAAgB;IACnD,IAAI,MAAY,CAAC;IACjB,IAAI,CAAC;QACH,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,CAAS,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACD,KAAK,MAAM,CAAC,CAAC,4DAA4D;IACzE,IAAI,CAAC;QAQH,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,GAAyC,CAAC;QACjE,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;YAC7B,OAAO,uBAAuB,CAC5B,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAC3C,CAAC;QACJ,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,kCAAkC,EAAE,EAAE,CAAC,CAAC;QAChE,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACxD,OAAO,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;IACpE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED,MAAM,IAAI,GAAe;IACvB,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,4CAA4C;IACzD,cAAc,EAAE,2BAA2B;IAC3C,sEAAsE;IACtE,+DAA+D;IAC/D,YAAY,EAAE,IAAI;IAClB,WAAW;IACX,MAAM;CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_column_views_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_column_views_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAuCxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/column-views
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({});
|
|
10
|
+
async function handle(args, ctx) {
|
|
11
|
+
let parsed;
|
|
12
|
+
try {
|
|
13
|
+
parsed = inputSchema.parse(args);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
return mapSdkErrorToToolResult(err);
|
|
17
|
+
}
|
|
18
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
19
|
+
try {
|
|
20
|
+
const raw = ctx.client.raw;
|
|
21
|
+
const fn = raw["GET"];
|
|
22
|
+
if (typeof fn !== "function") {
|
|
23
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
24
|
+
}
|
|
25
|
+
const result = await fn("/v1/catalog/column-views", {});
|
|
26
|
+
if (result.error !== undefined && result.error !== null) {
|
|
27
|
+
return mapSdkErrorToToolResult(result.error);
|
|
28
|
+
}
|
|
29
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
return mapSdkErrorToToolResult(err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const tool = {
|
|
36
|
+
name: "catalog_column_views_list",
|
|
37
|
+
kind: "foundation",
|
|
38
|
+
description: "Requires scope: catalog:column_views:read.",
|
|
39
|
+
required_scope: "catalog:column_views:read",
|
|
40
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
41
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
42
|
+
readOnlyHint: true,
|
|
43
|
+
inputSchema,
|
|
44
|
+
handle,
|
|
45
|
+
};
|
|
46
|
+
export default tool;
|
|
47
|
+
//# sourceMappingURL=catalog_column_views_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_column_views_list.js","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_column_views_list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wCAAwC;AACxC,iDAAiD;AACjD,oDAAoD;AACpD,gFAAgF;AAEhF,kDAAkD;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,GAIxB,MAAM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A2B;IAC3C,sEAAsE;IACtE,+DAA+D;IAC/D,YAAY,EAAE,IAAI;IAClB,WAAW;IACX,MAAM;CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_ebay_categories_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_ebay_categories_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAgDxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/ebay-categories
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({
|
|
10
|
+
query: z.object({
|
|
11
|
+
parent_category_id: z.number().int().optional()
|
|
12
|
+
}).optional()
|
|
13
|
+
});
|
|
14
|
+
async function handle(args, ctx) {
|
|
15
|
+
let parsed;
|
|
16
|
+
try {
|
|
17
|
+
parsed = inputSchema.parse(args);
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
return mapSdkErrorToToolResult(err);
|
|
21
|
+
}
|
|
22
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
23
|
+
try {
|
|
24
|
+
const requestParams = {
|
|
25
|
+
query: parsed.query,
|
|
26
|
+
};
|
|
27
|
+
const raw = ctx.client.raw;
|
|
28
|
+
const fn = raw["GET"];
|
|
29
|
+
if (typeof fn !== "function") {
|
|
30
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
31
|
+
}
|
|
32
|
+
const result = await fn("/v1/catalog/ebay-categories", {
|
|
33
|
+
params: requestParams,
|
|
34
|
+
});
|
|
35
|
+
if (result.error !== undefined && result.error !== null) {
|
|
36
|
+
return mapSdkErrorToToolResult(result.error);
|
|
37
|
+
}
|
|
38
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
return mapSdkErrorToToolResult(err);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const tool = {
|
|
45
|
+
name: "catalog_ebay_categories_list",
|
|
46
|
+
kind: "foundation",
|
|
47
|
+
description: "Requires scope: catalog:ebay_listings:read.",
|
|
48
|
+
required_scope: "catalog:ebay_listings:read",
|
|
49
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
50
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
51
|
+
readOnlyHint: true,
|
|
52
|
+
inputSchema,
|
|
53
|
+
handle,
|
|
54
|
+
};
|
|
55
|
+
export default tool;
|
|
56
|
+
//# sourceMappingURL=catalog_ebay_categories_list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_ebay_categories_list.js","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_ebay_categories_list.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,wCAAwC;AACxC,iDAAiD;AACjD,oDAAoD;AACpD,gFAAgF;AAEhF,qDAAqD;AACrD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,uBAAuB,GAIxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KAChD,CAAC,CAAC,QAAQ,EAAE;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CAA6C;IAC1D,cAAc,EAAE,4BAA4B;IAC5C,sEAAsE;IACtE,+DAA+D;IAC/D,YAAY,EAAE,IAAI;IAClB,WAAW;IACX,MAAM;CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog_ebay_category_specifics_list.d.ts","sourceRoot":"","sources":["../../../src/tools/foundation/catalog_ebay_category_specifics_list.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAgDxB,QAAA,MAAM,IAAI,EAAE,UAUX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// AUTO-GENERATED — DO NOT EDIT BY HAND.
|
|
3
|
+
// Regenerate via: npm run regen-foundation-tools
|
|
4
|
+
// Source: vendor/openapi.snapshot.json (W4 frozen).
|
|
5
|
+
// =============================================================================
|
|
6
|
+
// Tier: tier1 HTTP: GET /v1/catalog/ebay-category-specifics
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { mapSdkErrorToToolResult, } from "../contract.js";
|
|
9
|
+
const inputSchema = z.object({
|
|
10
|
+
query: z.object({
|
|
11
|
+
category_id: z.number().int().optional()
|
|
12
|
+
}).optional()
|
|
13
|
+
});
|
|
14
|
+
async function handle(args, ctx) {
|
|
15
|
+
let parsed;
|
|
16
|
+
try {
|
|
17
|
+
parsed = inputSchema.parse(args);
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
return mapSdkErrorToToolResult(err);
|
|
21
|
+
}
|
|
22
|
+
void parsed; // referenced below when the operation declares params/body.
|
|
23
|
+
try {
|
|
24
|
+
const requestParams = {
|
|
25
|
+
query: parsed.query,
|
|
26
|
+
};
|
|
27
|
+
const raw = ctx.client.raw;
|
|
28
|
+
const fn = raw["GET"];
|
|
29
|
+
if (typeof fn !== "function") {
|
|
30
|
+
return mapSdkErrorToToolResult(new Error("SDK client missing method GET"));
|
|
31
|
+
}
|
|
32
|
+
const result = await fn("/v1/catalog/ebay-category-specifics", {
|
|
33
|
+
params: requestParams,
|
|
34
|
+
});
|
|
35
|
+
if (result.error !== undefined && result.error !== null) {
|
|
36
|
+
return mapSdkErrorToToolResult(result.error);
|
|
37
|
+
}
|
|
38
|
+
return { content: [{ type: "json", json: result.data ?? null }] };
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
return mapSdkErrorToToolResult(err);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const tool = {
|
|
45
|
+
name: "catalog_ebay_category_specifics_list",
|
|
46
|
+
kind: "foundation",
|
|
47
|
+
description: "Requires scope: catalog:ebay_attributes:read.",
|
|
48
|
+
required_scope: "catalog:ebay_attributes:read",
|
|
49
|
+
// HTTP verb → Claude UI annotation. GET → readOnlyHint; write verbs →
|
|
50
|
+
// destructiveHint. Enforced by test/tools/annotations.test.ts.
|
|
51
|
+
readOnlyHint: true,
|
|
52
|
+
inputSchema,
|
|
53
|
+
handle,
|
|
54
|
+
};
|
|
55
|
+
export default tool;
|
|
56
|
+
//# sourceMappingURL=catalog_ebay_category_specifics_list.js.map
|