@commercetools/tools-core 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -399,6 +399,9 @@ __export(index_exports, {
399
399
  BaseResourceHandler: function() {
400
400
  return BaseResourceHandler;
401
401
  },
402
+ CartsHandler: function() {
403
+ return CartsHandler;
404
+ },
402
405
  CategoriesHandler: function() {
403
406
  return CategoriesHandler;
404
407
  },
@@ -411,9 +414,18 @@ __export(index_exports, {
411
414
  CustomObjectsHandler: function() {
412
415
  return CustomObjectsHandler;
413
416
  },
417
+ CustomerGroupsHandler: function() {
418
+ return CustomerGroupsHandler;
419
+ },
420
+ CustomerSearchHandler: function() {
421
+ return CustomerSearchHandler;
422
+ },
414
423
  CustomersHandler: function() {
415
424
  return CustomersHandler;
416
425
  },
426
+ DEFAULT_API_URL: function() {
427
+ return DEFAULT_API_URL;
428
+ },
417
429
  DiscountCodesHandler: function() {
418
430
  return DiscountCodesHandler;
419
431
  },
@@ -489,6 +501,9 @@ __export(index_exports, {
489
501
  createAttributeGroups: function() {
490
502
  return createAttributeGroups;
491
503
  },
504
+ createCarts: function() {
505
+ return createCarts;
506
+ },
492
507
  createCategories: function() {
493
508
  return createCategories;
494
509
  },
@@ -498,6 +513,12 @@ __export(index_exports, {
498
513
  createCustomObjects: function() {
499
514
  return createCustomObjects;
500
515
  },
516
+ createCustomerGroups: function() {
517
+ return createCustomerGroups;
518
+ },
519
+ createCustomerSearch: function() {
520
+ return createCustomerSearch;
521
+ },
501
522
  createCustomers: function() {
502
523
  return createCustomers;
503
524
  },
@@ -561,6 +582,9 @@ __export(index_exports, {
561
582
  deleteAttributeGroups: function() {
562
583
  return deleteAttributeGroups;
563
584
  },
585
+ deleteCarts: function() {
586
+ return deleteCarts;
587
+ },
564
588
  deleteCategories: function() {
565
589
  return deleteCategories;
566
590
  },
@@ -570,6 +594,12 @@ __export(index_exports, {
570
594
  deleteCustomObjects: function() {
571
595
  return deleteCustomObjects;
572
596
  },
597
+ deleteCustomerGroups: function() {
598
+ return deleteCustomerGroups;
599
+ },
600
+ deleteCustomerSearch: function() {
601
+ return deleteCustomerSearch;
602
+ },
573
603
  deleteCustomers: function() {
574
604
  return deleteCustomers;
575
605
  },
@@ -636,6 +666,9 @@ __export(index_exports, {
636
666
  readAttributeGroups: function() {
637
667
  return readAttributeGroups;
638
668
  },
669
+ readCarts: function() {
670
+ return readCarts;
671
+ },
639
672
  readCategories: function() {
640
673
  return readCategories;
641
674
  },
@@ -645,6 +678,12 @@ __export(index_exports, {
645
678
  readCustomObjects: function() {
646
679
  return readCustomObjects;
647
680
  },
681
+ readCustomerGroups: function() {
682
+ return readCustomerGroups;
683
+ },
684
+ readCustomerSearch: function() {
685
+ return readCustomerSearch;
686
+ },
648
687
  readCustomers: function() {
649
688
  return readCustomers;
650
689
  },
@@ -711,6 +750,9 @@ __export(index_exports, {
711
750
  updateAttributeGroups: function() {
712
751
  return updateAttributeGroups;
713
752
  },
753
+ updateCarts: function() {
754
+ return updateCarts;
755
+ },
714
756
  updateCategories: function() {
715
757
  return updateCategories;
716
758
  },
@@ -720,6 +762,12 @@ __export(index_exports, {
720
762
  updateCustomObjects: function() {
721
763
  return updateCustomObjects;
722
764
  },
765
+ updateCustomerGroups: function() {
766
+ return updateCustomerGroups;
767
+ },
768
+ updateCustomerSearch: function() {
769
+ return updateCustomerSearch;
770
+ },
723
771
  updateCustomers: function() {
724
772
  return updateCustomers;
725
773
  },
@@ -793,6 +841,7 @@ var OPERATIONS = [
793
841
  "update",
794
842
  "delete"
795
843
  ];
844
+ var DEFAULT_API_URL = "https://api.europe-west1.gcp.commercetools.com";
796
845
  // src/handlers/base.handler.ts
797
846
  var BaseResourceHandler = /*#__PURE__*/ function() {
798
847
  "use strict";
@@ -1024,13 +1073,9 @@ var CommercetoolsAPIClient = /*#__PURE__*/ function() {
1024
1073
  __publicField(this, "apiRoot");
1025
1074
  __publicField(this, "configuration");
1026
1075
  __publicField(this, "authToken");
1027
- this.configuration = _object_spread({
1028
- projectKey: configuration.projectKey,
1029
- allowedTools: [],
1030
- metadata: configuration.metadata
1031
- }, configuration);
1032
1076
  this.authToken = authToken;
1033
1077
  this.client = this.createClient();
1078
+ this.configuration = configuration;
1034
1079
  if (!this.client) {
1035
1080
  throw new Error("Failed to create commercetools client");
1036
1081
  }
@@ -1069,12 +1114,15 @@ var CommercetoolsAPIClient = /*#__PURE__*/ function() {
1069
1114
  * Create commercetools client
1070
1115
  */ key: "createClient",
1071
1116
  value: function createClient() {
1072
- var _this_configuration_metadata;
1073
- var apiUrl = ((_this_configuration_metadata = this.configuration.metadata) === null || _this_configuration_metadata === void 0 ? void 0 : _this_configuration_metadata.apiUrl) || "https://api.europe-west1.gcp.commercetools.com";
1117
+ var _this = this;
1074
1118
  var httpMiddlewareOptions = {
1075
- host: apiUrl
1119
+ host: DEFAULT_API_URL
1076
1120
  };
1077
- var client = new import_ts_client.ClientBuilder().withHttpMiddleware(httpMiddlewareOptions).withConcurrentModificationMiddleware().withCorrelationIdMiddleware().withUserAgentMiddleware({
1121
+ var client = new import_ts_client.ClientBuilder().withHttpMiddleware(httpMiddlewareOptions).withConcurrentModificationMiddleware().withCorrelationIdMiddleware({
1122
+ generate: function() {
1123
+ return _this.configuration.correlationId;
1124
+ }
1125
+ }).withUserAgentMiddleware({
1078
1126
  libraryName: "multitenant-mcp-service",
1079
1127
  libraryVersion: "1.0.0"
1080
1128
  });
@@ -1836,68 +1884,73 @@ function deleteCategories(context, apiClientFactory) {
1836
1884
  });
1837
1885
  })();
1838
1886
  }
1839
- // src/resources/channels/channels.handler.ts
1840
- var import_zod4 = require("zod");
1841
- // src/resources/channels/channels.schema.ts
1887
+ // src/resources/carts/carts.schema.ts
1842
1888
  var import_zod3 = require("zod");
1843
- var readChannelsParameters = import_zod3.z.object({
1844
- id: import_zod3.z.string().optional(),
1845
- key: import_zod3.z.string().optional(),
1846
- where: import_zod3.z.array(import_zod3.z.string()).optional(),
1847
- sort: import_zod3.z.array(import_zod3.z.string()).optional(),
1848
- limit: import_zod3.z.number().int().min(1).max(500).optional(),
1849
- offset: import_zod3.z.number().int().optional(),
1850
- expand: import_zod3.z.array(import_zod3.z.string()).optional()
1889
+ var readCartParameters = import_zod3.z.object({
1890
+ id: import_zod3.z.string().optional().describe("Cart ID"),
1891
+ key: import_zod3.z.string().optional().describe("Cart key (user-defined unique identifier)"),
1892
+ storeKey: import_zod3.z.string().optional().describe("Store key. When provided, the request is executed in the context of that store (store-specific carts). Omit for project-level carts."),
1893
+ where: import_zod3.z.array(import_zod3.z.string()).optional().describe('Query predicates specified as strings. Example: ["customerId = \\"customer-123\\""] or ["key = \\"cart-key-1\\""]'),
1894
+ sort: import_zod3.z.array(import_zod3.z.string()).optional().describe('Sort criteria for the results. Example: ["createdAt desc", "lastModifiedAt desc"]'),
1895
+ limit: import_zod3.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
1896
+ offset: import_zod3.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
1897
+ expand: import_zod3.z.array(import_zod3.z.string()).optional().describe('Fields to expand. Example: ["lineItems[*].variant", "shippingInfo.shippingMethod", "discountCodes[*]"]')
1851
1898
  });
1852
- var createChannelsParameters = import_zod3.z.object({
1853
- body: import_zod3.z.record(import_zod3.z.any())
1899
+ var createCartParameters = import_zod3.z.object({
1900
+ storeKey: import_zod3.z.string().optional().describe("Store key. When provided, the cart is created in the context of that store. Omit for project-level carts."),
1901
+ body: import_zod3.z.record(import_zod3.z.any()).describe("Cart draft (CartDraft). Required fields typically include: currency (string, ISO 4217), and optionally: country (string, ISO 3166-1 alpha-2), key, customerId, customerEmail, inventoryMode (Single|None), lineItems (array), customLineItems (array), shippingAddress (Address), billingAddress (Address), shippingMethod (ResourceIdentifier), store (ResourceIdentifier), locale, taxMode (Platform|External), taxRoundingMode, taxCalculationMode, externalTaxRateForShippingMethod, discountCodes (array of strings), custom (type + fields), deleteDaysAfterLastModification, itemShippingAddresses (array of Address), etc. See commercetools API docs for CartDraft for full structure.")
1854
1902
  });
1855
- var updateChannelsParameters = import_zod3.z.object({
1856
- id: import_zod3.z.string().optional(),
1857
- key: import_zod3.z.string().optional(),
1858
- version: import_zod3.z.number().optional(),
1859
- actions: import_zod3.z.array(import_zod3.z.record(import_zod3.z.any())).optional()
1903
+ var updateCartParameters = import_zod3.z.object({
1904
+ id: import_zod3.z.string().optional().describe("The ID of the cart to update"),
1905
+ key: import_zod3.z.string().optional().describe("The key of the cart to update"),
1906
+ storeKey: import_zod3.z.string().optional().describe("Store key when the cart is store-specific"),
1907
+ version: import_zod3.z.number().int().describe("The current version of the cart (for optimistic locking)"),
1908
+ actions: import_zod3.z.array(import_zod3.z.record(import_zod3.z.any())).optional().describe('Update actions. Each action must have an "action" field (e.g. addLineItem, setShippingAddress, addDiscountCode, recalculate, etc.) and fields specific to that action. See commercetools Cart update actions documentation.')
1860
1909
  });
1861
- var deleteChannelsParameters = import_zod3.z.object({
1862
- id: import_zod3.z.string().optional(),
1863
- key: import_zod3.z.string().optional(),
1864
- version: import_zod3.z.number().optional()
1910
+ var deleteCartParameters = import_zod3.z.object({
1911
+ id: import_zod3.z.string().optional().describe("Cart ID (required if key is not provided)"),
1912
+ key: import_zod3.z.string().optional().describe("Cart key (required if id is not provided)"),
1913
+ storeKey: import_zod3.z.string().optional().describe("Store key when the cart is store-specific"),
1914
+ version: import_zod3.z.number().int().describe("Current version of the cart (for optimistic locking)"),
1915
+ dataErasure: import_zod3.z.boolean().optional().describe("When true, personal data (e.g. email, addresses) associated with the cart is deleted. Default is false.")
1865
1916
  });
1866
- // src/resources/channels/channels.prompt.ts
1867
- var readChannelsPrompt = '\nThis tool will fetch information about commercetools channels.\n\nIt can be used in three ways:\n1. To fetch a single channel by its ID\n2. To fetch a single channel by its key\n3. To query multiple channels based on criteria\n\nIt takes these parameters:\n- id (string, optional): The ID of the channel to fetch\n- key (string, optional): The key of the channel to fetch\n- where (string array, optional): Query predicates for filtering channels. Example: ["roles contains any \\"InventorySupply\\",\\"ProductDistribution\\""]\n- limit (int, optional): The number of channels to return (default: 20, range: 1-500)\n- offset (int, optional): The number of items to skip before starting to collect the result set\n- sort (string array, optional): Sort criteria for the results. Example: ["name.en asc", "createdAt desc"]\n- expand (string array, optional): An array of field paths to expand. Example: ["custom.type"]\n\nIf both id and key are not provided, it will fetch a list of channels using query parameters.\n';
1868
- var createChannelsPrompt = '\nThis tool will create a new Channel in commercetools.\n\nIt takes these required arguments:\n- key (string): User-defined unique identifier for the Channel\n- roles (array): Roles of the Channel. Each channel must have at least one role.\n Available roles: "InventorySupply", "ProductDistribution", "OrderExport", "OrderImport", "Primary"\n\nIt takes these optional arguments:\n- name (object, optional): Localized name of the Channel (record mapping locale to string)\n- description (object, optional): Localized description of the Channel (record mapping locale to string)\n- address (object, optional): Address where the Channel is located\n- geoLocation (object, optional): GeoJSON Point encoding the geo location of the Channel\n- custom (object, optional): Custom fields for the Channel\n\nExample name and description format:\n{\n "en": "Main Warehouse",\n "de": "Hauptlager"\n}\n\nExample geoLocation format:\n{\n "type": "Point",\n "coordinates": [13.377704, 52.516275]\n}\n';
1869
- var updateChannelsPrompt = '\nThis tool will update a Channel in commercetools using update actions from the commercetools API.\n\nIt takes these required arguments:\n- version (integer): The current version of the channel\n- actions (array): An array of update actions to perform on the channel. Each action should have an "action" field indicating the action type\n\nIt also requires ONE of these identifiers:\n- id (string, optional): The ID of the channel to update\n- key (string, optional): The key of the channel to update\n\nExample actions from commercetools API include:\n- changeKey: Change the key of the channel\n- changeName: Change the localized name of the channel\n- changeDescription: Change the localized description of the channel\n- setRoles: Set the roles of the channel\n- addRoles: Add roles to the channel\n- removeRoles: Remove roles from the channel\n- setAddress: Set the address of the channel\n- setGeoLocation: Set the geo location of the channel\n- setCustomType: Set the custom type for the channel\n- setCustomField: Set a custom field for the channel\n\nEach action type requires specific fields according to the commercetools API.\n';
1870
- // src/resources/channels/channels.handler.ts
1871
- var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
1917
+ // src/resources/carts/carts.prompt.ts
1918
+ var readCartPrompt = '\nThis tool will fetch a Cart by ID or key (if provided) from commercetools, optionally in a store context, or query carts in the project (or in a store when storeKey is provided).\n\nCarts hold line items, custom line items, shipping and billing addresses, and can be converted to orders. They can be project-level or store-specific.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the cart to fetch.\n- key (string, optional): The key of the cart to fetch (user-defined unique identifier).\n- storeKey (string, optional): The key of the store. When provided, the request is executed in the context of that store (for store-specific carts). Omit for project-level carts.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["customerId = \\"customer-123\\""] or ["key = \\"cart-key-1\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["createdAt desc", "lastModifiedAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Example: ["lineItems[*].variant", "shippingInfo.shippingMethod", "discountCodes[*]"]\n';
1919
+ var createCartPrompt = '\nThis tool will create a new Cart in commercetools (optionally in a store when storeKey is provided).\n\nA cart requires at least a currency (and often a country for shipping/tax). You can add line items, shipping address, discount codes, and more at creation or in a follow-up update.\n\nIt takes these required arguments:\n- body (object): Cart draft (CartDraft). Must include at least:\n - currency (string): ISO 4217 currency code (e.g. "USD", "EUR").\n\nIt takes these optional arguments:\n- storeKey (string, optional): The key of the store. When provided, the cart is created in the context of that store. Omit for project-level carts.\n- body fields (all optional except currency): country (string, ISO 3166-1 alpha-2), key (string), customerId (string), customerEmail (string), inventoryMode ("Single" or "None"), lineItems (array of LineItemDraft: productId, variantId, quantity, supplyChannel, distributionChannel, custom, etc.), customLineItems (array of CustomLineItemDraft), shippingAddress (Address), billingAddress (Address), shippingMethod (ResourceIdentifier to ShippingMethod), store (ResourceIdentifier to Store), locale (string), taxMode ("Platform" or "External"), taxRoundingMode, taxCalculationMode, externalTaxRateForShippingMethod (ExternalTaxRateDraft), discountCodes (array of discount code strings), custom (type + fields), deleteDaysAfterLastModification (number), itemShippingAddresses (array of Address), origin (Customer or Merchant), etc. See the commercetools API documentation for CartDraft for the complete structure and nested types.\n';
1920
+ var updateCartPrompt = '\nThis tool will update a Cart in commercetools using update actions.\n\nIt takes these required arguments:\n- version (integer): The current version of the cart (for optimistic locking).\n- Either id or key must be provided to identify the cart.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the cart to update (required if key is not provided).\n- key (string, optional): The key of the cart to update (required if id is not provided).\n- storeKey (string, optional): The key of the store when the cart is store-specific.\n- actions (array, optional): An array of update actions. Each action must have an "action" field indicating the action type and any required fields for that action.\n\nExample actions from the commercetools Cart API include:\n- addLineItem: Add a line item. Fields: productId, variantId?, sku?, quantity?, supplyChannel?, distributionChannel?, custom?, addedAt?, shippingDetails?\n- removeLineItem: Remove a line item. Fields: lineItemId, quantity?\n- changeLineItemQuantity: Change line item quantity. Fields: lineItemId, quantity\n- setLineItemShippingDetails: Set shipping details for a line item. Fields: lineItemId, shippingDetails?\n- addCustomLineItem: Add a custom line item. Fields: name (LocalizedString), quantity, money, slug, taxCategory?, externalTaxRate?, custom?\n- removeCustomLineItem: Remove a custom line item. Fields: customLineItemId\n- setShippingAddress: Set shipping address. Fields: address?\n- setBillingAddress: Set billing address. Fields: address?\n- setShippingMethod: Set shipping method. Fields: shippingMethod?, externalTaxRate?\n- addDiscountCode: Add a discount code. Fields: code\n- removeDiscountCode: Remove a discount code. Fields: discountCode (Reference)\n- recalculate: Recalculate cart (prices, taxes, totals). Fields: updateProductData?\n- setKey: Set cart key. Fields: key?\n- setCustomerId: Set customer ID. Fields: customerId?\n- setCustomerEmail: Set customer email. Fields: email?\n- setCustomType: Set custom type. Fields: type?, fields?\n- setCustomField: Set custom field. Fields: name, value?\n- setLocale: Set locale. Fields: locale?\n- setDeleteDaysAfterLastModification: Set delete days. Fields: deleteDaysAfterLastModification?\n- setItemShippingAddress: Set item shipping address. Fields: addressKey, address?\n- addItemShippingAddress: Add item shipping address. Fields: address\n- removeItemShippingAddress: Remove item shipping address. Fields: addressKey\n\nEach action type requires specific fields according to the commercetools API documentation.\n';
1921
+ var deleteCartPrompt = "\nThis tool will delete a Cart from commercetools.\n\nIt takes these required arguments:\n- version (integer): The current version of the cart (for optimistic locking).\n- Either id or key must be provided to identify the cart.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the cart to delete (required if key is not provided).\n- key (string, optional): The key of the cart to delete (required if id is not provided).\n- storeKey (string, optional): The key of the store when the cart is store-specific.\n- dataErasure (boolean, optional): When true, personal data (e.g. email, addresses) associated with the cart is deleted. Default is false.\n";
1922
+ // src/resources/carts/carts.handler.ts
1923
+ var CartsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
1872
1924
  "use strict";
1873
- _inherits(ChannelsHandler, CommercetoolsResourceHandler);
1874
- function ChannelsHandler(apiClientFactory) {
1875
- _class_call_check(this, ChannelsHandler);
1925
+ _inherits(CartsHandler, CommercetoolsResourceHandler);
1926
+ function CartsHandler(apiClientFactory) {
1927
+ _class_call_check(this, CartsHandler);
1876
1928
  var _this;
1877
- _this = _call_super(this, ChannelsHandler, [
1929
+ _this = _call_super(this, CartsHandler, [
1878
1930
  apiClientFactory
1879
1931
  ]);
1880
1932
  __publicField(_this, "metadata", {
1881
- namespace: "channels",
1882
- description: "Manage channels in commercetools",
1933
+ namespace: "carts",
1934
+ description: "Manage carts in commercetools",
1883
1935
  toolNamePrefix: TOOL_NAME_PREFIX,
1884
1936
  schemas: {
1885
- read: readChannelsParameters,
1886
- create: createChannelsParameters,
1887
- update: updateChannelsParameters,
1888
- delete: import_zod4.z.object({})
1937
+ read: readCartParameters,
1938
+ create: createCartParameters,
1939
+ update: updateCartParameters,
1940
+ delete: deleteCartParameters
1889
1941
  }
1890
1942
  });
1891
1943
  return _this;
1892
1944
  }
1893
- _create_class(ChannelsHandler, [
1945
+ _create_class(CartsHandler, [
1894
1946
  {
1895
1947
  key: "getToolDefinition",
1896
1948
  value: function getToolDefinition(operation) {
1897
1949
  var prompts = {
1898
- read: readChannelsPrompt,
1899
- create: createChannelsPrompt,
1900
- update: updateChannelsPrompt
1950
+ read: readCartPrompt,
1951
+ create: createCartPrompt,
1952
+ update: updateCartPrompt,
1953
+ delete: deleteCartPrompt
1901
1954
  };
1902
1955
  return {
1903
1956
  name: this.getToolName(operation),
@@ -1907,16 +1960,18 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
1907
1960
  }
1908
1961
  },
1909
1962
  {
1910
- key: "getChannelsApi",
1911
- value: function getChannelsApi(api) {
1912
- return api.channels();
1963
+ key: "getCartsApi",
1964
+ value: function getCartsApi(api, storeKey) {
1965
+ return storeKey ? api.inStoreKeyWithStoreKeyValue({
1966
+ storeKey: storeKey
1967
+ }).carts() : api.carts();
1913
1968
  }
1914
1969
  },
1915
1970
  {
1916
1971
  key: "read",
1917
1972
  value: function read(context) {
1918
1973
  return _async_to_generator(function() {
1919
- var api, params, res, res1, res2, err;
1974
+ var api, params, _params_limit, cartsApi, res2, res21, res, err;
1920
1975
  return _ts_generator(this, function(_state) {
1921
1976
  switch(_state.label){
1922
1977
  case 0:
@@ -1928,25 +1983,30 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
1928
1983
  case 1:
1929
1984
  _state.trys.push([
1930
1985
  1,
1931
- 8,
1986
+ 7,
1932
1987
  ,
1933
- 9
1988
+ 8
1934
1989
  ]);
1990
+ cartsApi = this.getCartsApi(api, params.storeKey);
1935
1991
  if (!(params === null || params === void 0 ? void 0 : params.id)) return [
1936
1992
  3,
1937
1993
  3
1938
1994
  ];
1939
1995
  return [
1940
1996
  4,
1941
- this.getChannelsApi(api).withId({
1997
+ cartsApi.withId({
1942
1998
  ID: params.id
1943
- }).get().execute()
1999
+ }).get({
2000
+ queryArgs: _object_spread({}, params.expand && {
2001
+ expand: params.expand
2002
+ })
2003
+ }).execute()
1944
2004
  ];
1945
2005
  case 2:
1946
- res = _state.sent();
2006
+ res2 = _state.sent();
1947
2007
  return [
1948
2008
  2,
1949
- res.body
2009
+ res2.body
1950
2010
  ];
1951
2011
  case 3:
1952
2012
  if (!(params === null || params === void 0 ? void 0 : params.key)) return [
@@ -1955,42 +2015,47 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
1955
2015
  ];
1956
2016
  return [
1957
2017
  4,
1958
- this.getChannelsApi(api).withKey({
2018
+ cartsApi.withKey({
1959
2019
  key: params.key
1960
- }).get().execute()
2020
+ }).get({
2021
+ queryArgs: _object_spread({}, params.expand && {
2022
+ expand: params.expand
2023
+ })
2024
+ }).execute()
1961
2025
  ];
1962
2026
  case 4:
1963
- res1 = _state.sent();
2027
+ res21 = _state.sent();
1964
2028
  return [
1965
2029
  2,
1966
- res1.body
2030
+ res21.body
1967
2031
  ];
1968
2032
  case 5:
1969
2033
  return [
1970
2034
  4,
1971
- this.getChannelsApi(api).get({
1972
- queryArgs: _object_spread({}, params.limit && {
1973
- limit: params.limit
1974
- }, params.offset && {
2035
+ cartsApi.get({
2036
+ queryArgs: _object_spread({
2037
+ limit: (_params_limit = params.limit) !== null && _params_limit !== void 0 ? _params_limit : 20
2038
+ }, params.offset != null && {
1975
2039
  offset: params.offset
2040
+ }, params.sort && {
2041
+ sort: params.sort
2042
+ }, params.where && {
2043
+ where: params.where
2044
+ }, params.expand && {
2045
+ expand: params.expand
1976
2046
  })
1977
2047
  }).execute()
1978
2048
  ];
1979
2049
  case 6:
1980
- res2 = _state.sent();
2050
+ res = _state.sent();
1981
2051
  return [
1982
2052
  2,
1983
- res2.body
2053
+ res.body
1984
2054
  ];
1985
2055
  case 7:
1986
- return [
1987
- 3,
1988
- 9
1989
- ];
1990
- case 8:
1991
2056
  err = _state.sent();
1992
- throw new ToolExecutionError("Failed to read channels", context, err);
1993
- case 9:
2057
+ throw new ToolExecutionError("Failed to read cart", context, err);
2058
+ case 8:
1994
2059
  return [
1995
2060
  2
1996
2061
  ];
@@ -2003,7 +2068,7 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2003
2068
  key: "create",
2004
2069
  value: function create(context) {
2005
2070
  return _async_to_generator(function() {
2006
- var api, params, created, err;
2071
+ var api, params, cartsApi, created, err;
2007
2072
  return _ts_generator(this, function(_state) {
2008
2073
  switch(_state.label){
2009
2074
  case 0:
@@ -2019,10 +2084,11 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2019
2084
  ,
2020
2085
  4
2021
2086
  ]);
2087
+ cartsApi = this.getCartsApi(api, params.storeKey);
2022
2088
  return [
2023
2089
  4,
2024
- this.getChannelsApi(api).post({
2025
- body: params
2090
+ cartsApi.post({
2091
+ body: params.body
2026
2092
  }).execute()
2027
2093
  ];
2028
2094
  case 2:
@@ -2033,7 +2099,7 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2033
2099
  ];
2034
2100
  case 3:
2035
2101
  err = _state.sent();
2036
- throw new ToolExecutionError("Failed to create channel", context, err);
2102
+ throw new ToolExecutionError("Failed to create cart", context, err);
2037
2103
  case 4:
2038
2104
  return [
2039
2105
  2
@@ -2047,7 +2113,7 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2047
2113
  key: "update",
2048
2114
  value: function update(context) {
2049
2115
  return _async_to_generator(function() {
2050
- var api, params, currentVersion, channelId, s, updated, err;
2116
+ var api, params, _params_actions, cartsApi, cartId, version, res, updated, err;
2051
2117
  return _ts_generator(this, function(_state) {
2052
2118
  switch(_state.label){
2053
2119
  case 0:
@@ -2059,50 +2125,64 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2059
2125
  case 1:
2060
2126
  _state.trys.push([
2061
2127
  1,
2062
- 5,
2128
+ 7,
2063
2129
  ,
2064
- 6
2130
+ 8
2065
2131
  ]);
2066
- currentVersion = params.version;
2067
- channelId = params.id;
2068
- if (!(!channelId && params.key)) return [
2132
+ cartsApi = this.getCartsApi(api, params.storeKey);
2133
+ version = params.version;
2134
+ if (!params.id) return [
2069
2135
  3,
2070
- 3
2136
+ 2
2137
+ ];
2138
+ cartId = params.id;
2139
+ return [
2140
+ 3,
2141
+ 5
2142
+ ];
2143
+ case 2:
2144
+ if (!params.key) return [
2145
+ 3,
2146
+ 4
2071
2147
  ];
2072
2148
  return [
2073
2149
  4,
2074
- this.getChannelsApi(api).withKey({
2150
+ cartsApi.withKey({
2075
2151
  key: params.key
2076
2152
  }).get().execute()
2077
2153
  ];
2078
- case 2:
2079
- s = _state.sent();
2080
- channelId = s.body.id;
2081
- currentVersion = s.body.version;
2082
- _state.label = 3;
2083
2154
  case 3:
2084
- if (!channelId) throw new ToolExecutionError("Either id or key must be provided", context);
2155
+ res = _state.sent();
2156
+ cartId = res.body.id;
2157
+ version = res.body.version;
2158
+ return [
2159
+ 3,
2160
+ 5
2161
+ ];
2162
+ case 4:
2163
+ throw new ToolExecutionError("Either id or key must be provided", context);
2164
+ case 5:
2085
2165
  return [
2086
2166
  4,
2087
- this.getChannelsApi(api).withId({
2088
- ID: channelId
2167
+ cartsApi.withId({
2168
+ ID: cartId
2089
2169
  }).post({
2090
2170
  body: {
2091
- version: currentVersion,
2092
- actions: params.actions
2171
+ version: version,
2172
+ actions: (_params_actions = params.actions) !== null && _params_actions !== void 0 ? _params_actions : []
2093
2173
  }
2094
2174
  }).execute()
2095
2175
  ];
2096
- case 4:
2176
+ case 6:
2097
2177
  updated = _state.sent();
2098
2178
  return [
2099
2179
  2,
2100
2180
  updated.body
2101
2181
  ];
2102
- case 5:
2182
+ case 7:
2103
2183
  err = _state.sent();
2104
- throw new ToolExecutionError("Failed to update channel", context, err);
2105
- case 6:
2184
+ throw new ToolExecutionError("Failed to update cart", context, err);
2185
+ case 8:
2106
2186
  return [
2107
2187
  2
2108
2188
  ];
@@ -2116,19 +2196,19 @@ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2116
2196
  value: function _delete(context) {
2117
2197
  return _async_to_generator(function() {
2118
2198
  return _ts_generator(this, function(_state) {
2119
- throw new ToolExecutionError("Delete not supported for channels", context);
2199
+ throw new ToolExecutionError("Delete operation not implemented for carts", context);
2120
2200
  });
2121
2201
  })();
2122
2202
  }
2123
2203
  }
2124
2204
  ]);
2125
- return ChannelsHandler;
2205
+ return CartsHandler;
2126
2206
  }(CommercetoolsResourceHandler);
2127
- function readChannels(context, apiClientFactory) {
2207
+ function readCarts(context, apiClientFactory) {
2128
2208
  return _async_to_generator(function() {
2129
2209
  var handler;
2130
2210
  return _ts_generator(this, function(_state) {
2131
- handler = new ChannelsHandler(apiClientFactory);
2211
+ handler = new CartsHandler(apiClientFactory);
2132
2212
  return [
2133
2213
  2,
2134
2214
  handler.read(context)
@@ -2136,11 +2216,11 @@ function readChannels(context, apiClientFactory) {
2136
2216
  });
2137
2217
  })();
2138
2218
  }
2139
- function createChannels(context, apiClientFactory) {
2219
+ function createCarts(context, apiClientFactory) {
2140
2220
  return _async_to_generator(function() {
2141
2221
  var handler;
2142
2222
  return _ts_generator(this, function(_state) {
2143
- handler = new ChannelsHandler(apiClientFactory);
2223
+ handler = new CartsHandler(apiClientFactory);
2144
2224
  return [
2145
2225
  2,
2146
2226
  handler.create(context)
@@ -2148,11 +2228,11 @@ function createChannels(context, apiClientFactory) {
2148
2228
  });
2149
2229
  })();
2150
2230
  }
2151
- function updateChannels(context, apiClientFactory) {
2231
+ function updateCarts(context, apiClientFactory) {
2152
2232
  return _async_to_generator(function() {
2153
2233
  var handler;
2154
2234
  return _ts_generator(this, function(_state) {
2155
- handler = new ChannelsHandler(apiClientFactory);
2235
+ handler = new CartsHandler(apiClientFactory);
2156
2236
  return [
2157
2237
  2,
2158
2238
  handler.update(context)
@@ -2160,11 +2240,11 @@ function updateChannels(context, apiClientFactory) {
2160
2240
  });
2161
2241
  })();
2162
2242
  }
2163
- function deleteChannels(context, apiClientFactory) {
2243
+ function deleteCarts(context, apiClientFactory) {
2164
2244
  return _async_to_generator(function() {
2165
2245
  var handler;
2166
2246
  return _ts_generator(this, function(_state) {
2167
- handler = new ChannelsHandler(apiClientFactory);
2247
+ handler = new CartsHandler(apiClientFactory);
2168
2248
  return [
2169
2249
  2,
2170
2250
  handler.delete(context)
@@ -2172,73 +2252,68 @@ function deleteChannels(context, apiClientFactory) {
2172
2252
  });
2173
2253
  })();
2174
2254
  }
2175
- // src/resources/custom-objects/custom-objects.schema.ts
2255
+ // src/resources/channels/channels.handler.ts
2176
2256
  var import_zod5 = require("zod");
2177
- var readCustomObjectsParameters = import_zod5.z.object({
2178
- container: import_zod5.z.string().optional(),
2179
- key: import_zod5.z.string().optional(),
2180
- id: import_zod5.z.string().optional(),
2181
- where: import_zod5.z.array(import_zod5.z.string()).optional(),
2182
- sort: import_zod5.z.array(import_zod5.z.string()).optional(),
2183
- limit: import_zod5.z.number().int().min(1).max(500).optional(),
2184
- offset: import_zod5.z.number().int().optional(),
2185
- expand: import_zod5.z.array(import_zod5.z.string()).optional()
2257
+ // src/resources/channels/channels.schema.ts
2258
+ var import_zod4 = require("zod");
2259
+ var readChannelsParameters = import_zod4.z.object({
2260
+ id: import_zod4.z.string().optional(),
2261
+ key: import_zod4.z.string().optional(),
2262
+ where: import_zod4.z.array(import_zod4.z.string()).optional(),
2263
+ sort: import_zod4.z.array(import_zod4.z.string()).optional(),
2264
+ limit: import_zod4.z.number().int().min(1).max(500).optional(),
2265
+ offset: import_zod4.z.number().int().optional(),
2266
+ expand: import_zod4.z.array(import_zod4.z.string()).optional()
2186
2267
  });
2187
- var createCustomObjectsParameters = import_zod5.z.object({
2188
- container: import_zod5.z.string().describe("Container name (namespace)"),
2189
- key: import_zod5.z.string().describe("User-defined key"),
2190
- value: import_zod5.z.any().describe("JSON-serializable value")
2268
+ var createChannelsParameters = import_zod4.z.object({
2269
+ body: import_zod4.z.record(import_zod4.z.any())
2191
2270
  });
2192
- var updateCustomObjectsParameters = import_zod5.z.object({
2193
- container: import_zod5.z.string().optional(),
2194
- key: import_zod5.z.string().optional(),
2195
- id: import_zod5.z.string().optional(),
2196
- version: import_zod5.z.number().optional(),
2197
- value: import_zod5.z.any().optional()
2271
+ var updateChannelsParameters = import_zod4.z.object({
2272
+ id: import_zod4.z.string().optional(),
2273
+ key: import_zod4.z.string().optional(),
2274
+ version: import_zod4.z.number().optional(),
2275
+ actions: import_zod4.z.array(import_zod4.z.record(import_zod4.z.any())).optional()
2198
2276
  });
2199
- var deleteCustomObjectsParameters = import_zod5.z.object({
2200
- container: import_zod5.z.string().optional(),
2201
- key: import_zod5.z.string().optional(),
2202
- id: import_zod5.z.string().optional(),
2203
- version: import_zod5.z.number().optional()
2277
+ var deleteChannelsParameters = import_zod4.z.object({
2278
+ id: import_zod4.z.string().optional(),
2279
+ key: import_zod4.z.string().optional(),
2280
+ version: import_zod4.z.number().optional()
2204
2281
  });
2205
- // src/resources/custom-objects/custom-objects.prompt.ts
2206
- var readCustomObjectsPrompt = '\nRead custom objects from the commercetools platform. You can:\n- Get a single custom object by providing its container and key\n- List multiple custom objects in a container with optional filtering, sorting, and pagination\n\nParameters:\n- container: Container of the custom object to retrieve (required)\n- key: Key of the custom object to retrieve (optional)\n- limit: Number of results requested when listing (default: 20, max: 500)\n- offset: Number of elements to skip when listing (default: 0, max: 10000)\n- sort: Sort criteria for listing results (e.g., ["createdAt desc", "key asc"])\n- where: Query predicates for filtering when listing (e.g., ["container=\\"myContainer\\""])\n- expand: Reference paths to expand (e.g., ["value.order"])\n\nExamples:\n// Get by container and key\ncustomObjects.read({\n container: "myContainer",\n key: "myKey"\n})\n\n// List all custom objects in a container\ncustomObjects.read({\n container: "myContainer",\n limit: 10\n})\n\n// List with filtering\ncustomObjects.read({\n container: "myContainer",\n where: ["key=\\"specific-key\\""]\n})\n';
2207
- var createCustomObjectsPrompt = '\nCreate a new custom object in the commercetools platform.\n\nParameters:\n- container: Namespace to group custom objects (required)\n- key: User-defined unique identifier within the container (required)\n- value: Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type (required)\n\nExample:\ncustomObjects.create({\n container: "myContainer",\n key: "myKey",\n value: {\n "text": {\n "de": "Das ist ein Text",\n "en": "This is a text"\n },\n "order": {\n "typeId": "order",\n "id": "<order-id>"\n }\n }\n})\n';
2208
- var updateCustomObjectsPrompt = '\nUpdate a custom object in the commercetools platform. You must identify the object using container and key.\n\nParameters:\n- container: Container of the custom object to update (required)\n- key: Key of the custom object to update (required)\n- version: Expected version of the custom object (required)\n- actions: Array of update actions (required)\n\nAvailable update actions:\n- setValue: Set a new value for the custom object\n\nExamples:\n// Update by container and key\ncustomObjects.update({\n container: "myContainer",\n key: "myKey",\n version: 1,\n actions: [\n {\n action: "setValue",\n value: {\n "updatedText": "New value",\n "timestamp": "2024-01-01T00:00:00Z"\n }\n }\n ]\n})\n';
2209
- var deleteCustomObjectsPrompt = '\nDelete a custom object in the commercetools platform. You must identify the object using container and key.\n\nParameters:\n- container: Container of the custom object to delete (required)\n- key: Key of the custom object to delete (required)\n- version: Expected version of the custom object (required)\n\nExamples:\n// Delete by container and key\ncustomObjects.delete({\n container: "myContainer",\n key: "myKey",\n version: 1,\n})\n';
2210
- // src/resources/custom-objects/custom-objects.handler.ts
2211
- var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2282
+ // src/resources/channels/channels.prompt.ts
2283
+ var readChannelsPrompt = '\nThis tool will fetch information about commercetools channels.\n\nIt can be used in three ways:\n1. To fetch a single channel by its ID\n2. To fetch a single channel by its key\n3. To query multiple channels based on criteria\n\nIt takes these parameters:\n- id (string, optional): The ID of the channel to fetch\n- key (string, optional): The key of the channel to fetch\n- where (string array, optional): Query predicates for filtering channels. Example: ["roles contains any \\"InventorySupply\\",\\"ProductDistribution\\""]\n- limit (int, optional): The number of channels to return (default: 20, range: 1-500)\n- offset (int, optional): The number of items to skip before starting to collect the result set\n- sort (string array, optional): Sort criteria for the results. Example: ["name.en asc", "createdAt desc"]\n- expand (string array, optional): An array of field paths to expand. Example: ["custom.type"]\n\nIf both id and key are not provided, it will fetch a list of channels using query parameters.\n';
2284
+ var createChannelsPrompt = '\nThis tool will create a new Channel in commercetools.\n\nIt takes these required arguments:\n- key (string): User-defined unique identifier for the Channel\n- roles (array): Roles of the Channel. Each channel must have at least one role.\n Available roles: "InventorySupply", "ProductDistribution", "OrderExport", "OrderImport", "Primary"\n\nIt takes these optional arguments:\n- name (object, optional): Localized name of the Channel (record mapping locale to string)\n- description (object, optional): Localized description of the Channel (record mapping locale to string)\n- address (object, optional): Address where the Channel is located\n- geoLocation (object, optional): GeoJSON Point encoding the geo location of the Channel\n- custom (object, optional): Custom fields for the Channel\n\nExample name and description format:\n{\n "en": "Main Warehouse",\n "de": "Hauptlager"\n}\n\nExample geoLocation format:\n{\n "type": "Point",\n "coordinates": [13.377704, 52.516275]\n}\n';
2285
+ var updateChannelsPrompt = '\nThis tool will update a Channel in commercetools using update actions from the commercetools API.\n\nIt takes these required arguments:\n- version (integer): The current version of the channel\n- actions (array): An array of update actions to perform on the channel. Each action should have an "action" field indicating the action type\n\nIt also requires ONE of these identifiers:\n- id (string, optional): The ID of the channel to update\n- key (string, optional): The key of the channel to update\n\nExample actions from commercetools API include:\n- changeKey: Change the key of the channel\n- changeName: Change the localized name of the channel\n- changeDescription: Change the localized description of the channel\n- setRoles: Set the roles of the channel\n- addRoles: Add roles to the channel\n- removeRoles: Remove roles from the channel\n- setAddress: Set the address of the channel\n- setGeoLocation: Set the geo location of the channel\n- setCustomType: Set the custom type for the channel\n- setCustomField: Set a custom field for the channel\n\nEach action type requires specific fields according to the commercetools API.\n';
2286
+ // src/resources/channels/channels.handler.ts
2287
+ var ChannelsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2212
2288
  "use strict";
2213
- _inherits(CustomObjectsHandler, CommercetoolsResourceHandler);
2214
- function CustomObjectsHandler(apiClientFactory) {
2215
- _class_call_check(this, CustomObjectsHandler);
2289
+ _inherits(ChannelsHandler, CommercetoolsResourceHandler);
2290
+ function ChannelsHandler(apiClientFactory) {
2291
+ _class_call_check(this, ChannelsHandler);
2216
2292
  var _this;
2217
- _this = _call_super(this, CustomObjectsHandler, [
2293
+ _this = _call_super(this, ChannelsHandler, [
2218
2294
  apiClientFactory
2219
2295
  ]);
2220
2296
  __publicField(_this, "metadata", {
2221
- namespace: "custom-objects",
2222
- description: "Manage custom objects in commercetools",
2297
+ namespace: "channels",
2298
+ description: "Manage channels in commercetools",
2223
2299
  toolNamePrefix: TOOL_NAME_PREFIX,
2224
2300
  schemas: {
2225
- read: readCustomObjectsParameters,
2226
- create: createCustomObjectsParameters,
2227
- update: updateCustomObjectsParameters,
2228
- delete: deleteCustomObjectsParameters
2301
+ read: readChannelsParameters,
2302
+ create: createChannelsParameters,
2303
+ update: updateChannelsParameters,
2304
+ delete: import_zod5.z.object({})
2229
2305
  }
2230
2306
  });
2231
2307
  return _this;
2232
2308
  }
2233
- _create_class(CustomObjectsHandler, [
2309
+ _create_class(ChannelsHandler, [
2234
2310
  {
2235
2311
  key: "getToolDefinition",
2236
2312
  value: function getToolDefinition(operation) {
2237
2313
  var prompts = {
2238
- read: readCustomObjectsPrompt,
2239
- create: createCustomObjectsPrompt,
2240
- update: updateCustomObjectsPrompt,
2241
- delete: deleteCustomObjectsPrompt
2314
+ read: readChannelsPrompt,
2315
+ create: createChannelsPrompt,
2316
+ update: updateChannelsPrompt
2242
2317
  };
2243
2318
  return {
2244
2319
  name: this.getToolName(operation),
@@ -2248,9 +2323,9 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2248
2323
  }
2249
2324
  },
2250
2325
  {
2251
- key: "getCustomObjectsApi",
2252
- value: function getCustomObjectsApi(api) {
2253
- return api.customObjects();
2326
+ key: "getChannelsApi",
2327
+ value: function getChannelsApi(api) {
2328
+ return api.channels();
2254
2329
  }
2255
2330
  },
2256
2331
  {
@@ -2273,15 +2348,14 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2273
2348
  ,
2274
2349
  9
2275
2350
  ]);
2276
- if (!((params === null || params === void 0 ? void 0 : params.container) && (params === null || params === void 0 ? void 0 : params.key))) return [
2351
+ if (!(params === null || params === void 0 ? void 0 : params.id)) return [
2277
2352
  3,
2278
2353
  3
2279
2354
  ];
2280
2355
  return [
2281
2356
  4,
2282
- this.getCustomObjectsApi(api).withContainerAndKey({
2283
- container: params.container,
2284
- key: params.key
2357
+ this.getChannelsApi(api).withId({
2358
+ ID: params.id
2285
2359
  }).get().execute()
2286
2360
  ];
2287
2361
  case 2:
@@ -2291,27 +2365,15 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2291
2365
  res.body
2292
2366
  ];
2293
2367
  case 3:
2294
- if (!(params === null || params === void 0 ? void 0 : params.container)) return [
2368
+ if (!(params === null || params === void 0 ? void 0 : params.key)) return [
2295
2369
  3,
2296
2370
  5
2297
2371
  ];
2298
2372
  return [
2299
2373
  4,
2300
- this.getCustomObjectsApi(api).withContainer({
2301
- container: params.container
2302
- }).get({
2303
- queryArgs: _object_spread({}, params.limit && {
2304
- limit: params.limit
2305
- }, params.offset && {
2306
- offset: params.offset
2307
- }, params.sort && {
2308
- sort: params.sort
2309
- }, params.where && {
2310
- where: params.where
2311
- }, params.expand && {
2312
- expand: params.expand
2313
- })
2314
- }).execute()
2374
+ this.getChannelsApi(api).withKey({
2375
+ key: params.key
2376
+ }).get().execute()
2315
2377
  ];
2316
2378
  case 4:
2317
2379
  res1 = _state.sent();
@@ -2322,17 +2384,11 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2322
2384
  case 5:
2323
2385
  return [
2324
2386
  4,
2325
- this.getCustomObjectsApi(api).get({
2387
+ this.getChannelsApi(api).get({
2326
2388
  queryArgs: _object_spread({}, params.limit && {
2327
2389
  limit: params.limit
2328
2390
  }, params.offset && {
2329
2391
  offset: params.offset
2330
- }, params.sort && {
2331
- sort: params.sort
2332
- }, params.where && {
2333
- where: params.where
2334
- }, params.expand && {
2335
- expand: params.expand
2336
2392
  })
2337
2393
  }).execute()
2338
2394
  ];
@@ -2349,7 +2405,7 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2349
2405
  ];
2350
2406
  case 8:
2351
2407
  err = _state.sent();
2352
- throw new ToolExecutionError("Failed to read custom objects", context, err);
2408
+ throw new ToolExecutionError("Failed to read channels", context, err);
2353
2409
  case 9:
2354
2410
  return [
2355
2411
  2
@@ -2381,12 +2437,8 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2381
2437
  ]);
2382
2438
  return [
2383
2439
  4,
2384
- this.getCustomObjectsApi(api).post({
2385
- body: {
2386
- container: params.container,
2387
- key: params.key,
2388
- value: params.value
2389
- }
2440
+ this.getChannelsApi(api).post({
2441
+ body: params
2390
2442
  }).execute()
2391
2443
  ];
2392
2444
  case 2:
@@ -2397,7 +2449,7 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2397
2449
  ];
2398
2450
  case 3:
2399
2451
  err = _state.sent();
2400
- throw new ToolExecutionError("Failed to create custom object", context, err);
2452
+ throw new ToolExecutionError("Failed to create channel", context, err);
2401
2453
  case 4:
2402
2454
  return [
2403
2455
  2
@@ -2411,7 +2463,7 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2411
2463
  key: "update",
2412
2464
  value: function update(context) {
2413
2465
  return _async_to_generator(function() {
2414
- var api, params, updated, err;
2466
+ var api, params, currentVersion, channelId, s, updated, err;
2415
2467
  return _ts_generator(this, function(_state) {
2416
2468
  switch(_state.label){
2417
2469
  case 0:
@@ -2419,42 +2471,54 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2419
2471
  projectKey: context.configuration.projectKey
2420
2472
  });
2421
2473
  params = context.parameters;
2422
- if (!params.id && !params.container && !params.key) throw new ToolExecutionError("Either id or container+key must be provided", context);
2423
2474
  _state.label = 1;
2424
2475
  case 1:
2425
2476
  _state.trys.push([
2426
2477
  1,
2427
- 4,
2478
+ 5,
2428
2479
  ,
2429
- 5
2480
+ 6
2430
2481
  ]);
2431
- if (!(params.container && params.key)) return [
2432
- 3,
2482
+ currentVersion = params.version;
2483
+ channelId = params.id;
2484
+ if (!(!channelId && params.key)) return [
2485
+ 3,
2433
2486
  3
2434
2487
  ];
2435
2488
  return [
2436
2489
  4,
2437
- this.getCustomObjectsApi(api).post({
2490
+ this.getChannelsApi(api).withKey({
2491
+ key: params.key
2492
+ }).get().execute()
2493
+ ];
2494
+ case 2:
2495
+ s = _state.sent();
2496
+ channelId = s.body.id;
2497
+ currentVersion = s.body.version;
2498
+ _state.label = 3;
2499
+ case 3:
2500
+ if (!channelId) throw new ToolExecutionError("Either id or key must be provided", context);
2501
+ return [
2502
+ 4,
2503
+ this.getChannelsApi(api).withId({
2504
+ ID: channelId
2505
+ }).post({
2438
2506
  body: {
2439
- container: params.container,
2440
- key: params.key,
2441
- value: params.value,
2442
- version: params.version
2507
+ version: currentVersion,
2508
+ actions: params.actions
2443
2509
  }
2444
2510
  }).execute()
2445
2511
  ];
2446
- case 2:
2512
+ case 4:
2447
2513
  updated = _state.sent();
2448
2514
  return [
2449
2515
  2,
2450
2516
  updated.body
2451
2517
  ];
2452
- case 3:
2453
- throw new ToolExecutionError("Updating by id is not supported; use container+key to update a custom object", context);
2454
- case 4:
2455
- err = _state.sent();
2456
- throw new ToolExecutionError("Failed to update custom object", context, err);
2457
2518
  case 5:
2519
+ err = _state.sent();
2520
+ throw new ToolExecutionError("Failed to update channel", context, err);
2521
+ case 6:
2458
2522
  return [
2459
2523
  2
2460
2524
  ];
@@ -2468,19 +2532,19 @@ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
2468
2532
  value: function _delete(context) {
2469
2533
  return _async_to_generator(function() {
2470
2534
  return _ts_generator(this, function(_state) {
2471
- throw new ToolExecutionError("Delete not supported for custom objects", context);
2535
+ throw new ToolExecutionError("Delete not supported for channels", context);
2472
2536
  });
2473
2537
  })();
2474
2538
  }
2475
2539
  }
2476
2540
  ]);
2477
- return CustomObjectsHandler;
2541
+ return ChannelsHandler;
2478
2542
  }(CommercetoolsResourceHandler);
2479
- function readCustomObjects(context, apiClientFactory) {
2543
+ function readChannels(context, apiClientFactory) {
2480
2544
  return _async_to_generator(function() {
2481
2545
  var handler;
2482
2546
  return _ts_generator(this, function(_state) {
2483
- handler = new CustomObjectsHandler(apiClientFactory);
2547
+ handler = new ChannelsHandler(apiClientFactory);
2484
2548
  return [
2485
2549
  2,
2486
2550
  handler.read(context)
@@ -2488,11 +2552,11 @@ function readCustomObjects(context, apiClientFactory) {
2488
2552
  });
2489
2553
  })();
2490
2554
  }
2491
- function createCustomObjects(context, apiClientFactory) {
2555
+ function createChannels(context, apiClientFactory) {
2492
2556
  return _async_to_generator(function() {
2493
2557
  var handler;
2494
2558
  return _ts_generator(this, function(_state) {
2495
- handler = new CustomObjectsHandler(apiClientFactory);
2559
+ handler = new ChannelsHandler(apiClientFactory);
2496
2560
  return [
2497
2561
  2,
2498
2562
  handler.create(context)
@@ -2500,11 +2564,11 @@ function createCustomObjects(context, apiClientFactory) {
2500
2564
  });
2501
2565
  })();
2502
2566
  }
2503
- function updateCustomObjects(context, apiClientFactory) {
2567
+ function updateChannels(context, apiClientFactory) {
2504
2568
  return _async_to_generator(function() {
2505
2569
  var handler;
2506
2570
  return _ts_generator(this, function(_state) {
2507
- handler = new CustomObjectsHandler(apiClientFactory);
2571
+ handler = new ChannelsHandler(apiClientFactory);
2508
2572
  return [
2509
2573
  2,
2510
2574
  handler.update(context)
@@ -2512,11 +2576,11 @@ function updateCustomObjects(context, apiClientFactory) {
2512
2576
  });
2513
2577
  })();
2514
2578
  }
2515
- function deleteCustomObjects(context, apiClientFactory) {
2579
+ function deleteChannels(context, apiClientFactory) {
2516
2580
  return _async_to_generator(function() {
2517
2581
  var handler;
2518
2582
  return _ts_generator(this, function(_state) {
2519
- handler = new CustomObjectsHandler(apiClientFactory);
2583
+ handler = new ChannelsHandler(apiClientFactory);
2520
2584
  return [
2521
2585
  2,
2522
2586
  handler.delete(context)
@@ -2524,119 +2588,73 @@ function deleteCustomObjects(context, apiClientFactory) {
2524
2588
  });
2525
2589
  })();
2526
2590
  }
2527
- // src/resources/customers/customers.schema.ts
2591
+ // src/resources/custom-objects/custom-objects.schema.ts
2528
2592
  var import_zod6 = require("zod");
2529
- var readCustomerParameters = import_zod6.z.object({
2530
- id: import_zod6.z.string().optional().describe("Customer ID"),
2531
- key: import_zod6.z.string().optional().describe("Customer key"),
2532
- storeKey: import_zod6.z.string().optional().describe("Store key"),
2533
- where: import_zod6.z.array(import_zod6.z.string()).optional().describe('Query predicates specified as strings. Example: ["email = \\"customer@example.com\\""]'),
2534
- sort: import_zod6.z.array(import_zod6.z.string()).optional().describe('Sort criteria for the results. Example: ["firstName asc", "createdAt desc"]'),
2535
- limit: import_zod6.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10."),
2536
- offset: import_zod6.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
2537
- expand: import_zod6.z.array(import_zod6.z.string()).optional().describe('Fields to expand. Example: ["customerGroup"]')
2593
+ var readCustomObjectsParameters = import_zod6.z.object({
2594
+ container: import_zod6.z.string().optional(),
2595
+ key: import_zod6.z.string().optional(),
2596
+ id: import_zod6.z.string().optional(),
2597
+ where: import_zod6.z.array(import_zod6.z.string()).optional(),
2598
+ sort: import_zod6.z.array(import_zod6.z.string()).optional(),
2599
+ limit: import_zod6.z.number().int().min(1).max(500).optional(),
2600
+ offset: import_zod6.z.number().int().optional(),
2601
+ expand: import_zod6.z.array(import_zod6.z.string()).optional()
2538
2602
  });
2539
- var createCustomerParameters = import_zod6.z.object({
2540
- email: import_zod6.z.string().email().describe("Customer email address"),
2541
- storeKey: import_zod6.z.string().optional().describe("Store key"),
2542
- password: import_zod6.z.string().describe("Customer password"),
2543
- firstName: import_zod6.z.string().optional().describe("Customer first name"),
2544
- lastName: import_zod6.z.string().optional().describe("Customer last name"),
2545
- middleName: import_zod6.z.string().optional().describe("Customer middle name"),
2546
- title: import_zod6.z.string().optional().describe("Customer title (e.g., Mr., Mrs., Dr.)"),
2547
- dateOfBirth: import_zod6.z.string().optional().describe("Customer date of birth in ISO 8601 format (YYYY-MM-DD)"),
2548
- companyName: import_zod6.z.string().optional().describe("Customer company name"),
2549
- vatId: import_zod6.z.string().optional().describe("Customer VAT identification number"),
2550
- addresses: import_zod6.z.array(import_zod6.z.object({
2551
- streetName: import_zod6.z.string().describe("Street name"),
2552
- streetNumber: import_zod6.z.string().optional().describe("Street number"),
2553
- additionalStreetInfo: import_zod6.z.string().optional().describe("Additional street information"),
2554
- postalCode: import_zod6.z.string().describe("Postal code"),
2555
- city: import_zod6.z.string().describe("City"),
2556
- region: import_zod6.z.string().optional().describe("Region"),
2557
- state: import_zod6.z.string().optional().describe("State"),
2558
- country: import_zod6.z.string().describe("Country code (ISO 3166-1 alpha-2)"),
2559
- company: import_zod6.z.string().optional().describe("Company name"),
2560
- department: import_zod6.z.string().optional().describe("Department"),
2561
- building: import_zod6.z.string().optional().describe("Building"),
2562
- apartment: import_zod6.z.string().optional().describe("Apartment"),
2563
- pOBox: import_zod6.z.string().optional().describe("P.O. Box"),
2564
- phone: import_zod6.z.string().optional().describe("Phone"),
2565
- mobile: import_zod6.z.string().optional().describe("Mobile phone"),
2566
- email: import_zod6.z.string().email().optional().describe("Email"),
2567
- fax: import_zod6.z.string().optional().describe("Fax"),
2568
- additionalAddressInfo: import_zod6.z.string().optional().describe("Additional address information")
2569
- })).optional().describe("Customer addresses"),
2570
- defaultShippingAddress: import_zod6.z.number().int().optional().describe("Index of default shipping address in the addresses array"),
2571
- defaultBillingAddress: import_zod6.z.number().int().optional().describe("Index of default billing address in the addresses array"),
2572
- shippingAddresses: import_zod6.z.array(import_zod6.z.number().int()).optional().describe("Indices of shipping addresses in the addresses array"),
2573
- billingAddresses: import_zod6.z.array(import_zod6.z.number().int()).optional().describe("Indices of billing addresses in the addresses array"),
2574
- isEmailVerified: import_zod6.z.boolean().optional().describe("Whether the customer email is verified"),
2575
- externalId: import_zod6.z.string().optional().describe("Customer external ID"),
2576
- customerGroup: import_zod6.z.object({
2577
- id: import_zod6.z.string(),
2578
- typeId: import_zod6.z.literal("customer-group")
2579
- }).optional().describe("Customer group reference"),
2580
- custom: import_zod6.z.object({
2581
- type: import_zod6.z.object({
2582
- id: import_zod6.z.string(),
2583
- typeId: import_zod6.z.literal("type")
2584
- }),
2585
- fields: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.any())
2586
- }).optional().describe("Custom fields"),
2587
- locale: import_zod6.z.string().optional().describe("Customer locale"),
2588
- salutation: import_zod6.z.string().optional().describe("Customer salutation"),
2589
- key: import_zod6.z.string().optional().describe("Customer key")
2603
+ var createCustomObjectsParameters = import_zod6.z.object({
2604
+ container: import_zod6.z.string().describe("Container name (namespace)"),
2605
+ key: import_zod6.z.string().describe("User-defined key"),
2606
+ value: import_zod6.z.any().describe("JSON-serializable value")
2590
2607
  });
2591
- var updateCustomerParameters = import_zod6.z.object({
2592
- id: import_zod6.z.string().describe("The ID of the customer to update"),
2593
- version: import_zod6.z.number().int().describe("The current version of the customer"),
2594
- actions: import_zod6.z.array(import_zod6.z.object({
2595
- action: import_zod6.z.string().describe("The name of the update action to perform")
2596
- }).and(import_zod6.z.record(import_zod6.z.string(), import_zod6.z.any()).optional()).describe('Array of update actions to perform on the customer. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
2608
+ var updateCustomObjectsParameters = import_zod6.z.object({
2609
+ container: import_zod6.z.string().optional(),
2610
+ key: import_zod6.z.string().optional(),
2611
+ id: import_zod6.z.string().optional(),
2612
+ version: import_zod6.z.number().optional(),
2613
+ value: import_zod6.z.any().optional()
2597
2614
  });
2598
- var deleteCustomerParameters = import_zod6.z.object({
2599
- id: import_zod6.z.string().describe("Customer ID"),
2600
- version: import_zod6.z.number().int().describe("Current version (for optimistic locking)"),
2601
- dataErasure: import_zod6.z.boolean().optional().describe("Delete personal data")
2615
+ var deleteCustomObjectsParameters = import_zod6.z.object({
2616
+ container: import_zod6.z.string().optional(),
2617
+ key: import_zod6.z.string().optional(),
2618
+ id: import_zod6.z.string().optional(),
2619
+ version: import_zod6.z.number().optional()
2602
2620
  });
2603
- // src/resources/customers/customers.prompt.ts
2604
- var readCustomerPrompt = '\nThis tool will fetch a Customer by ID (ID or key if provided) from commercetools or a specific store in commercetools or query all available customers in a commercetools project if no arquments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the customer to fetch.\n- storeKey (string, optional): The key of the store to fetch the customer from.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["email = \\"customer@example.com\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["firstName asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Example: ["customerGroup"]\n';
2605
- var createCustomerPrompt = "\nThis tool will create a new Customer in commercetools or a specific store in commercetools.\n\nIt takes these required arguments:\n- email (string): Customer email address.\n- password (string): Customer password.\n\nIt takes these optional arguments:\n- storeKey (string, optional): The key of the store to create the customer in.\n- firstName (string, optional): Customer first name.\n- lastName (string, optional): Customer last name.\n- middleName (string, optional): Customer middle name.\n- title (string, optional): Customer title (e.g., Mr., Mrs., Dr.).\n- dateOfBirth (string, optional): Customer date of birth in ISO 8601 format (YYYY-MM-DD).\n- companyName (string, optional): Customer company name.\n- vatId (string, optional): Customer VAT identification number.\n- addresses (array, optional): An array of customer addresses.\n- defaultShippingAddress (integer, optional): Index of default shipping address in the addresses array.\n- defaultBillingAddress (integer, optional): Index of default billing address in the addresses array.\n- shippingAddresses (array of integers, optional): Indices of shipping addresses in the addresses array.\n- billingAddresses (array of integers, optional): Indices of billing addresses in the addresses array.\n- isEmailVerified (boolean, optional): Whether the customer email is verified.\n- externalId (string, optional): Customer external ID.\n- customerGroup (object, optional): Customer group reference.\n- custom (object, optional): Custom fields.\n- locale (string, optional): Customer locale.\n- salutation (string, optional): Customer salutation.\n- key (string, optional): Customer key.\n";
2606
- var updateCustomerPrompt = '\nThis tool will update a Customer in commercetools using update actions from the commercetools API.\n\nIt takes these required arguments:\n- id (string): The ID of the customer to update.\n- version (integer): The current version of the customer.\n- actions (array): An array of update actions to perform on the customer. Each action should have an "action" field indicating the action type.\n\nExample actions from commercetools API include:\n- addAddress\n- addBillingAddressId\n- addShippingAddressId\n- changeAddress\n- changeEmail\n- removeAddress\n- removeBillingAddressId\n- removeShippingAddressId\n- setCompanyName\n- setCustomField\n- setCustomType\n- setDateOfBirth\n- setDefaultBillingAddress\n- setDefaultShippingAddress\n- setFirstName\n- setLastName\n- setLocale\n- setMiddleName\n- setSalutation\n- setTitle\n- setVatId\n\nEach action type requires specific fields according to the commercetools API.\n';
2607
- var deleteCustomerPrompt = "\nThis tool will delete a Customer from commercetools.\n\nIt takes these required arguments:\n- id (string): The ID of the customer to delete.\n- version (integer): The current version of the customer (for optimistic locking).\n\nIt takes these optional arguments:\n- dataErasure (boolean, optional): Delete personal data.\n";
2608
- // src/resources/customers/customers.handler.ts
2609
- var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2621
+ // src/resources/custom-objects/custom-objects.prompt.ts
2622
+ var readCustomObjectsPrompt = '\nRead custom objects from the commercetools platform. You can:\n- Get a single custom object by providing its container and key\n- List multiple custom objects in a container with optional filtering, sorting, and pagination\n\nParameters:\n- container: Container of the custom object to retrieve (required)\n- key: Key of the custom object to retrieve (optional)\n- limit: Number of results requested when listing (default: 20, max: 500)\n- offset: Number of elements to skip when listing (default: 0, max: 10000)\n- sort: Sort criteria for listing results (e.g., ["createdAt desc", "key asc"])\n- where: Query predicates for filtering when listing (e.g., ["container=\\"myContainer\\""])\n- expand: Reference paths to expand (e.g., ["value.order"])\n\nExamples:\n// Get by container and key\ncustomObjects.read({\n container: "myContainer",\n key: "myKey"\n})\n\n// List all custom objects in a container\ncustomObjects.read({\n container: "myContainer",\n limit: 10\n})\n\n// List with filtering\ncustomObjects.read({\n container: "myContainer",\n where: ["key=\\"specific-key\\""]\n})\n';
2623
+ var createCustomObjectsPrompt = '\nCreate a new custom object in the commercetools platform.\n\nParameters:\n- container: Namespace to group custom objects (required)\n- key: User-defined unique identifier within the container (required)\n- value: Can be any JSON standard type, such as number, string, boolean, array, object, or a common API data type (required)\n\nExample:\ncustomObjects.create({\n container: "myContainer",\n key: "myKey",\n value: {\n "text": {\n "de": "Das ist ein Text",\n "en": "This is a text"\n },\n "order": {\n "typeId": "order",\n "id": "<order-id>"\n }\n }\n})\n';
2624
+ var updateCustomObjectsPrompt = '\nUpdate a custom object in the commercetools platform. You must identify the object using container and key.\n\nParameters:\n- container: Container of the custom object to update (required)\n- key: Key of the custom object to update (required)\n- version: Expected version of the custom object (required)\n- actions: Array of update actions (required)\n\nAvailable update actions:\n- setValue: Set a new value for the custom object\n\nExamples:\n// Update by container and key\ncustomObjects.update({\n container: "myContainer",\n key: "myKey",\n version: 1,\n actions: [\n {\n action: "setValue",\n value: {\n "updatedText": "New value",\n "timestamp": "2024-01-01T00:00:00Z"\n }\n }\n ]\n})\n';
2625
+ var deleteCustomObjectsPrompt = '\nDelete a custom object in the commercetools platform. You must identify the object using container and key.\n\nParameters:\n- container: Container of the custom object to delete (required)\n- key: Key of the custom object to delete (required)\n- version: Expected version of the custom object (required)\n\nExamples:\n// Delete by container and key\ncustomObjects.delete({\n container: "myContainer",\n key: "myKey",\n version: 1,\n})\n';
2626
+ // src/resources/custom-objects/custom-objects.handler.ts
2627
+ var CustomObjectsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2610
2628
  "use strict";
2611
- _inherits(CustomersHandler, CommercetoolsResourceHandler);
2612
- function CustomersHandler(apiClientFactory) {
2613
- _class_call_check(this, CustomersHandler);
2629
+ _inherits(CustomObjectsHandler, CommercetoolsResourceHandler);
2630
+ function CustomObjectsHandler(apiClientFactory) {
2631
+ _class_call_check(this, CustomObjectsHandler);
2614
2632
  var _this;
2615
- _this = _call_super(this, CustomersHandler, [
2633
+ _this = _call_super(this, CustomObjectsHandler, [
2616
2634
  apiClientFactory
2617
2635
  ]);
2618
2636
  __publicField(_this, "metadata", {
2619
- namespace: "customers",
2620
- description: "Manage customers in commercetools",
2637
+ namespace: "custom-objects",
2638
+ description: "Manage custom objects in commercetools",
2621
2639
  toolNamePrefix: TOOL_NAME_PREFIX,
2622
2640
  schemas: {
2623
- read: readCustomerParameters,
2624
- create: createCustomerParameters,
2625
- update: updateCustomerParameters,
2626
- delete: deleteCustomerParameters
2641
+ read: readCustomObjectsParameters,
2642
+ create: createCustomObjectsParameters,
2643
+ update: updateCustomObjectsParameters,
2644
+ delete: deleteCustomObjectsParameters
2627
2645
  }
2628
2646
  });
2629
2647
  return _this;
2630
2648
  }
2631
- _create_class(CustomersHandler, [
2649
+ _create_class(CustomObjectsHandler, [
2632
2650
  {
2633
2651
  key: "getToolDefinition",
2634
2652
  value: function getToolDefinition(operation) {
2635
2653
  var prompts = {
2636
- read: readCustomerPrompt,
2637
- create: createCustomerPrompt,
2638
- update: updateCustomerPrompt,
2639
- delete: deleteCustomerPrompt
2654
+ read: readCustomObjectsPrompt,
2655
+ create: createCustomObjectsPrompt,
2656
+ update: updateCustomObjectsPrompt,
2657
+ delete: deleteCustomObjectsPrompt
2640
2658
  };
2641
2659
  return {
2642
2660
  name: this.getToolName(operation),
@@ -2646,18 +2664,16 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2646
2664
  }
2647
2665
  },
2648
2666
  {
2649
- key: "getCustomersApi",
2650
- value: function getCustomersApi(api, storeKey) {
2651
- return storeKey ? api.inStoreKeyWithStoreKeyValue({
2652
- storeKey: storeKey
2653
- }).customers() : api.customers();
2667
+ key: "getCustomObjectsApi",
2668
+ value: function getCustomObjectsApi(api) {
2669
+ return api.customObjects();
2654
2670
  }
2655
2671
  },
2656
2672
  {
2657
2673
  key: "read",
2658
2674
  value: function read(context) {
2659
2675
  return _async_to_generator(function() {
2660
- var api, params, customer, customer1, customers, err;
2676
+ var api, params, res, res1, res2, err;
2661
2677
  return _ts_generator(this, function(_state) {
2662
2678
  switch(_state.label){
2663
2679
  case 0:
@@ -2673,49 +2689,58 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2673
2689
  ,
2674
2690
  9
2675
2691
  ]);
2676
- if (!(params === null || params === void 0 ? void 0 : params.id)) return [
2692
+ if (!((params === null || params === void 0 ? void 0 : params.container) && (params === null || params === void 0 ? void 0 : params.key))) return [
2677
2693
  3,
2678
2694
  3
2679
2695
  ];
2680
2696
  return [
2681
2697
  4,
2682
- this.getCustomersApi(api, params.storeKey).withId({
2683
- ID: params.id
2684
- }).get({
2685
- queryArgs: _object_spread({}, params.expand && {
2686
- expand: params.expand
2687
- })
2688
- }).execute()
2698
+ this.getCustomObjectsApi(api).withContainerAndKey({
2699
+ container: params.container,
2700
+ key: params.key
2701
+ }).get().execute()
2689
2702
  ];
2690
2703
  case 2:
2691
- customer = _state.sent();
2704
+ res = _state.sent();
2692
2705
  return [
2693
2706
  2,
2694
- customer.body
2707
+ res.body
2695
2708
  ];
2696
2709
  case 3:
2697
- if (!(params === null || params === void 0 ? void 0 : params.key)) return [
2710
+ if (!(params === null || params === void 0 ? void 0 : params.container)) return [
2698
2711
  3,
2699
2712
  5
2700
2713
  ];
2701
2714
  return [
2702
2715
  4,
2703
- this.getCustomersApi(api, params.storeKey).withKey({
2704
- key: params.key
2705
- }).get().execute()
2716
+ this.getCustomObjectsApi(api).withContainer({
2717
+ container: params.container
2718
+ }).get({
2719
+ queryArgs: _object_spread({}, params.limit && {
2720
+ limit: params.limit
2721
+ }, params.offset && {
2722
+ offset: params.offset
2723
+ }, params.sort && {
2724
+ sort: params.sort
2725
+ }, params.where && {
2726
+ where: params.where
2727
+ }, params.expand && {
2728
+ expand: params.expand
2729
+ })
2730
+ }).execute()
2706
2731
  ];
2707
2732
  case 4:
2708
- customer1 = _state.sent();
2733
+ res1 = _state.sent();
2709
2734
  return [
2710
2735
  2,
2711
- customer1.body
2736
+ res1.body
2712
2737
  ];
2713
2738
  case 5:
2714
2739
  return [
2715
2740
  4,
2716
- this.getCustomersApi(api, params.storeKey).get({
2717
- queryArgs: _object_spread({
2718
- limit: params.limit || 10
2741
+ this.getCustomObjectsApi(api).get({
2742
+ queryArgs: _object_spread({}, params.limit && {
2743
+ limit: params.limit
2719
2744
  }, params.offset && {
2720
2745
  offset: params.offset
2721
2746
  }, params.sort && {
@@ -2728,10 +2753,10 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2728
2753
  }).execute()
2729
2754
  ];
2730
2755
  case 6:
2731
- customers = _state.sent();
2756
+ res2 = _state.sent();
2732
2757
  return [
2733
2758
  2,
2734
- customers.body
2759
+ res2.body
2735
2760
  ];
2736
2761
  case 7:
2737
2762
  return [
@@ -2740,7 +2765,7 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2740
2765
  ];
2741
2766
  case 8:
2742
2767
  err = _state.sent();
2743
- throw new ToolExecutionError(err.message || "Failed to read customers", context, err);
2768
+ throw new ToolExecutionError("Failed to read custom objects", context, err);
2744
2769
  case 9:
2745
2770
  return [
2746
2771
  2
@@ -2751,10 +2776,1003 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2751
2776
  }
2752
2777
  },
2753
2778
  {
2754
- key: "create",
2755
- value: function create(context) {
2779
+ key: "create",
2780
+ value: function create(context) {
2781
+ return _async_to_generator(function() {
2782
+ var api, params, created, err;
2783
+ return _ts_generator(this, function(_state) {
2784
+ switch(_state.label){
2785
+ case 0:
2786
+ api = this.getApiRoot(context).withProjectKey({
2787
+ projectKey: context.configuration.projectKey
2788
+ });
2789
+ params = context.parameters;
2790
+ _state.label = 1;
2791
+ case 1:
2792
+ _state.trys.push([
2793
+ 1,
2794
+ 3,
2795
+ ,
2796
+ 4
2797
+ ]);
2798
+ return [
2799
+ 4,
2800
+ this.getCustomObjectsApi(api).post({
2801
+ body: {
2802
+ container: params.container,
2803
+ key: params.key,
2804
+ value: params.value
2805
+ }
2806
+ }).execute()
2807
+ ];
2808
+ case 2:
2809
+ created = _state.sent();
2810
+ return [
2811
+ 2,
2812
+ created.body
2813
+ ];
2814
+ case 3:
2815
+ err = _state.sent();
2816
+ throw new ToolExecutionError("Failed to create custom object", context, err);
2817
+ case 4:
2818
+ return [
2819
+ 2
2820
+ ];
2821
+ }
2822
+ });
2823
+ }).call(this);
2824
+ }
2825
+ },
2826
+ {
2827
+ key: "update",
2828
+ value: function update(context) {
2829
+ return _async_to_generator(function() {
2830
+ var api, params, updated, err;
2831
+ return _ts_generator(this, function(_state) {
2832
+ switch(_state.label){
2833
+ case 0:
2834
+ api = this.getApiRoot(context).withProjectKey({
2835
+ projectKey: context.configuration.projectKey
2836
+ });
2837
+ params = context.parameters;
2838
+ if (!params.id && !params.container && !params.key) throw new ToolExecutionError("Either id or container+key must be provided", context);
2839
+ _state.label = 1;
2840
+ case 1:
2841
+ _state.trys.push([
2842
+ 1,
2843
+ 4,
2844
+ ,
2845
+ 5
2846
+ ]);
2847
+ if (!(params.container && params.key)) return [
2848
+ 3,
2849
+ 3
2850
+ ];
2851
+ return [
2852
+ 4,
2853
+ this.getCustomObjectsApi(api).post({
2854
+ body: {
2855
+ container: params.container,
2856
+ key: params.key,
2857
+ value: params.value,
2858
+ version: params.version
2859
+ }
2860
+ }).execute()
2861
+ ];
2862
+ case 2:
2863
+ updated = _state.sent();
2864
+ return [
2865
+ 2,
2866
+ updated.body
2867
+ ];
2868
+ case 3:
2869
+ throw new ToolExecutionError("Updating by id is not supported; use container+key to update a custom object", context);
2870
+ case 4:
2871
+ err = _state.sent();
2872
+ throw new ToolExecutionError("Failed to update custom object", context, err);
2873
+ case 5:
2874
+ return [
2875
+ 2
2876
+ ];
2877
+ }
2878
+ });
2879
+ }).call(this);
2880
+ }
2881
+ },
2882
+ {
2883
+ key: "delete",
2884
+ value: function _delete(context) {
2885
+ return _async_to_generator(function() {
2886
+ return _ts_generator(this, function(_state) {
2887
+ throw new ToolExecutionError("Delete operation not implemented for custom objects", context);
2888
+ });
2889
+ })();
2890
+ }
2891
+ }
2892
+ ]);
2893
+ return CustomObjectsHandler;
2894
+ }(CommercetoolsResourceHandler);
2895
+ function readCustomObjects(context, apiClientFactory) {
2896
+ return _async_to_generator(function() {
2897
+ var handler;
2898
+ return _ts_generator(this, function(_state) {
2899
+ handler = new CustomObjectsHandler(apiClientFactory);
2900
+ return [
2901
+ 2,
2902
+ handler.read(context)
2903
+ ];
2904
+ });
2905
+ })();
2906
+ }
2907
+ function createCustomObjects(context, apiClientFactory) {
2908
+ return _async_to_generator(function() {
2909
+ var handler;
2910
+ return _ts_generator(this, function(_state) {
2911
+ handler = new CustomObjectsHandler(apiClientFactory);
2912
+ return [
2913
+ 2,
2914
+ handler.create(context)
2915
+ ];
2916
+ });
2917
+ })();
2918
+ }
2919
+ function updateCustomObjects(context, apiClientFactory) {
2920
+ return _async_to_generator(function() {
2921
+ var handler;
2922
+ return _ts_generator(this, function(_state) {
2923
+ handler = new CustomObjectsHandler(apiClientFactory);
2924
+ return [
2925
+ 2,
2926
+ handler.update(context)
2927
+ ];
2928
+ });
2929
+ })();
2930
+ }
2931
+ function deleteCustomObjects(context, apiClientFactory) {
2932
+ return _async_to_generator(function() {
2933
+ var handler;
2934
+ return _ts_generator(this, function(_state) {
2935
+ handler = new CustomObjectsHandler(apiClientFactory);
2936
+ return [
2937
+ 2,
2938
+ handler.delete(context)
2939
+ ];
2940
+ });
2941
+ })();
2942
+ }
2943
+ // src/resources/customers/customers.schema.ts
2944
+ var import_zod7 = require("zod");
2945
+ var readCustomerParameters = import_zod7.z.object({
2946
+ id: import_zod7.z.string().optional().describe("Customer ID"),
2947
+ key: import_zod7.z.string().optional().describe("Customer key"),
2948
+ storeKey: import_zod7.z.string().optional().describe("Store key"),
2949
+ where: import_zod7.z.array(import_zod7.z.string()).optional().describe('Query predicates specified as strings. Example: ["email = \\"customer@example.com\\""]'),
2950
+ sort: import_zod7.z.array(import_zod7.z.string()).optional().describe('Sort criteria for the results. Example: ["firstName asc", "createdAt desc"]'),
2951
+ limit: import_zod7.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10."),
2952
+ offset: import_zod7.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
2953
+ expand: import_zod7.z.array(import_zod7.z.string()).optional().describe('Fields to expand. Example: ["customerGroup"]')
2954
+ });
2955
+ var createCustomerParameters = import_zod7.z.object({
2956
+ email: import_zod7.z.string().email().describe("Customer email address"),
2957
+ storeKey: import_zod7.z.string().optional().describe("Store key"),
2958
+ password: import_zod7.z.string().describe("Customer password"),
2959
+ firstName: import_zod7.z.string().optional().describe("Customer first name"),
2960
+ lastName: import_zod7.z.string().optional().describe("Customer last name"),
2961
+ middleName: import_zod7.z.string().optional().describe("Customer middle name"),
2962
+ title: import_zod7.z.string().optional().describe("Customer title (e.g., Mr., Mrs., Dr.)"),
2963
+ dateOfBirth: import_zod7.z.string().optional().describe("Customer date of birth in ISO 8601 format (YYYY-MM-DD)"),
2964
+ companyName: import_zod7.z.string().optional().describe("Customer company name"),
2965
+ vatId: import_zod7.z.string().optional().describe("Customer VAT identification number"),
2966
+ addresses: import_zod7.z.array(import_zod7.z.object({
2967
+ streetName: import_zod7.z.string().describe("Street name"),
2968
+ streetNumber: import_zod7.z.string().optional().describe("Street number"),
2969
+ additionalStreetInfo: import_zod7.z.string().optional().describe("Additional street information"),
2970
+ postalCode: import_zod7.z.string().describe("Postal code"),
2971
+ city: import_zod7.z.string().describe("City"),
2972
+ region: import_zod7.z.string().optional().describe("Region"),
2973
+ state: import_zod7.z.string().optional().describe("State"),
2974
+ country: import_zod7.z.string().describe("Country code (ISO 3166-1 alpha-2)"),
2975
+ company: import_zod7.z.string().optional().describe("Company name"),
2976
+ department: import_zod7.z.string().optional().describe("Department"),
2977
+ building: import_zod7.z.string().optional().describe("Building"),
2978
+ apartment: import_zod7.z.string().optional().describe("Apartment"),
2979
+ pOBox: import_zod7.z.string().optional().describe("P.O. Box"),
2980
+ phone: import_zod7.z.string().optional().describe("Phone"),
2981
+ mobile: import_zod7.z.string().optional().describe("Mobile phone"),
2982
+ email: import_zod7.z.string().email().optional().describe("Email"),
2983
+ fax: import_zod7.z.string().optional().describe("Fax"),
2984
+ additionalAddressInfo: import_zod7.z.string().optional().describe("Additional address information")
2985
+ })).optional().describe("Customer addresses"),
2986
+ defaultShippingAddress: import_zod7.z.number().int().optional().describe("Index of default shipping address in the addresses array"),
2987
+ defaultBillingAddress: import_zod7.z.number().int().optional().describe("Index of default billing address in the addresses array"),
2988
+ shippingAddresses: import_zod7.z.array(import_zod7.z.number().int()).optional().describe("Indices of shipping addresses in the addresses array"),
2989
+ billingAddresses: import_zod7.z.array(import_zod7.z.number().int()).optional().describe("Indices of billing addresses in the addresses array"),
2990
+ isEmailVerified: import_zod7.z.boolean().optional().describe("Whether the customer email is verified"),
2991
+ externalId: import_zod7.z.string().optional().describe("Customer external ID"),
2992
+ customerGroup: import_zod7.z.object({
2993
+ id: import_zod7.z.string(),
2994
+ typeId: import_zod7.z.literal("customer-group")
2995
+ }).optional().describe("Customer group reference"),
2996
+ custom: import_zod7.z.object({
2997
+ type: import_zod7.z.object({
2998
+ id: import_zod7.z.string(),
2999
+ typeId: import_zod7.z.literal("type")
3000
+ }),
3001
+ fields: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.any())
3002
+ }).optional().describe("Custom fields"),
3003
+ locale: import_zod7.z.string().optional().describe("Customer locale"),
3004
+ salutation: import_zod7.z.string().optional().describe("Customer salutation"),
3005
+ key: import_zod7.z.string().optional().describe("Customer key")
3006
+ });
3007
+ var updateCustomerParameters = import_zod7.z.object({
3008
+ id: import_zod7.z.string().describe("The ID of the customer to update"),
3009
+ version: import_zod7.z.number().int().describe("The current version of the customer"),
3010
+ actions: import_zod7.z.array(import_zod7.z.object({
3011
+ action: import_zod7.z.string().describe("The name of the update action to perform")
3012
+ }).and(import_zod7.z.record(import_zod7.z.string(), import_zod7.z.any()).optional()).describe('Array of update actions to perform on the customer. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
3013
+ });
3014
+ var deleteCustomerParameters = import_zod7.z.object({
3015
+ id: import_zod7.z.string().describe("Customer ID"),
3016
+ version: import_zod7.z.number().int().describe("Current version (for optimistic locking)"),
3017
+ dataErasure: import_zod7.z.boolean().optional().describe("Delete personal data")
3018
+ });
3019
+ // src/resources/customers/customers.prompt.ts
3020
+ var readCustomerPrompt = '\nThis tool will fetch a Customer by ID (ID or key if provided) from commercetools or a specific store in commercetools or query all available customers in a commercetools project if no arquments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the customer to fetch.\n- storeKey (string, optional): The key of the store to fetch the customer from.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["email = \\"customer@example.com\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["firstName asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Example: ["customerGroup"]\n';
3021
+ var createCustomerPrompt = "\nThis tool will create a new Customer in commercetools or a specific store in commercetools.\n\nIt takes these required arguments:\n- email (string): Customer email address.\n- password (string): Customer password.\n\nIt takes these optional arguments:\n- storeKey (string, optional): The key of the store to create the customer in.\n- firstName (string, optional): Customer first name.\n- lastName (string, optional): Customer last name.\n- middleName (string, optional): Customer middle name.\n- title (string, optional): Customer title (e.g., Mr., Mrs., Dr.).\n- dateOfBirth (string, optional): Customer date of birth in ISO 8601 format (YYYY-MM-DD).\n- companyName (string, optional): Customer company name.\n- vatId (string, optional): Customer VAT identification number.\n- addresses (array, optional): An array of customer addresses.\n- defaultShippingAddress (integer, optional): Index of default shipping address in the addresses array.\n- defaultBillingAddress (integer, optional): Index of default billing address in the addresses array.\n- shippingAddresses (array of integers, optional): Indices of shipping addresses in the addresses array.\n- billingAddresses (array of integers, optional): Indices of billing addresses in the addresses array.\n- isEmailVerified (boolean, optional): Whether the customer email is verified.\n- externalId (string, optional): Customer external ID.\n- customerGroup (object, optional): Customer group reference.\n- custom (object, optional): Custom fields.\n- locale (string, optional): Customer locale.\n- salutation (string, optional): Customer salutation.\n- key (string, optional): Customer key.\n";
3022
+ var updateCustomerPrompt = '\nThis tool will update a Customer in commercetools using update actions from the commercetools API.\n\nIt takes these required arguments:\n- id (string): The ID of the customer to update.\n- version (integer): The current version of the customer.\n- actions (array): An array of update actions to perform on the customer. Each action should have an "action" field indicating the action type.\n\nExample actions from commercetools API include:\n- addAddress\n- addBillingAddressId\n- addShippingAddressId\n- changeAddress\n- changeEmail\n- removeAddress\n- removeBillingAddressId\n- removeShippingAddressId\n- setCompanyName\n- setCustomField\n- setCustomType\n- setDateOfBirth\n- setDefaultBillingAddress\n- setDefaultShippingAddress\n- setFirstName\n- setLastName\n- setLocale\n- setMiddleName\n- setSalutation\n- setTitle\n- setVatId\n\nEach action type requires specific fields according to the commercetools API.\n';
3023
+ var deleteCustomerPrompt = "\nThis tool will delete a Customer from commercetools.\n\nIt takes these required arguments:\n- id (string): The ID of the customer to delete.\n- version (integer): The current version of the customer (for optimistic locking).\n\nIt takes these optional arguments:\n- dataErasure (boolean, optional): Delete personal data.\n";
3024
+ // src/resources/customers/customers.handler.ts
3025
+ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
3026
+ "use strict";
3027
+ _inherits(CustomersHandler, CommercetoolsResourceHandler);
3028
+ function CustomersHandler(apiClientFactory) {
3029
+ _class_call_check(this, CustomersHandler);
3030
+ var _this;
3031
+ _this = _call_super(this, CustomersHandler, [
3032
+ apiClientFactory
3033
+ ]);
3034
+ __publicField(_this, "metadata", {
3035
+ namespace: "customers",
3036
+ description: "Manage customers in commercetools",
3037
+ toolNamePrefix: TOOL_NAME_PREFIX,
3038
+ schemas: {
3039
+ read: readCustomerParameters,
3040
+ create: createCustomerParameters,
3041
+ update: updateCustomerParameters,
3042
+ delete: deleteCustomerParameters
3043
+ }
3044
+ });
3045
+ return _this;
3046
+ }
3047
+ _create_class(CustomersHandler, [
3048
+ {
3049
+ key: "getToolDefinition",
3050
+ value: function getToolDefinition(operation) {
3051
+ var prompts = {
3052
+ read: readCustomerPrompt,
3053
+ create: createCustomerPrompt,
3054
+ update: updateCustomerPrompt,
3055
+ delete: deleteCustomerPrompt
3056
+ };
3057
+ return {
3058
+ name: this.getToolName(operation),
3059
+ description: prompts[operation],
3060
+ inputSchema: this.metadata.schemas[operation]
3061
+ };
3062
+ }
3063
+ },
3064
+ {
3065
+ key: "getCustomersApi",
3066
+ value: function getCustomersApi(api, storeKey) {
3067
+ return storeKey ? api.inStoreKeyWithStoreKeyValue({
3068
+ storeKey: storeKey
3069
+ }).customers() : api.customers();
3070
+ }
3071
+ },
3072
+ {
3073
+ key: "read",
3074
+ value: function read(context) {
3075
+ return _async_to_generator(function() {
3076
+ var api, params, customer, customer1, customers, err;
3077
+ return _ts_generator(this, function(_state) {
3078
+ switch(_state.label){
3079
+ case 0:
3080
+ api = this.getApiRoot(context).withProjectKey({
3081
+ projectKey: context.configuration.projectKey
3082
+ });
3083
+ params = context.parameters;
3084
+ _state.label = 1;
3085
+ case 1:
3086
+ _state.trys.push([
3087
+ 1,
3088
+ 8,
3089
+ ,
3090
+ 9
3091
+ ]);
3092
+ if (!(params === null || params === void 0 ? void 0 : params.id)) return [
3093
+ 3,
3094
+ 3
3095
+ ];
3096
+ return [
3097
+ 4,
3098
+ this.getCustomersApi(api, params.storeKey).withId({
3099
+ ID: params.id
3100
+ }).get({
3101
+ queryArgs: _object_spread({}, params.expand && {
3102
+ expand: params.expand
3103
+ })
3104
+ }).execute()
3105
+ ];
3106
+ case 2:
3107
+ customer = _state.sent();
3108
+ return [
3109
+ 2,
3110
+ customer.body
3111
+ ];
3112
+ case 3:
3113
+ if (!(params === null || params === void 0 ? void 0 : params.key)) return [
3114
+ 3,
3115
+ 5
3116
+ ];
3117
+ return [
3118
+ 4,
3119
+ this.getCustomersApi(api, params.storeKey).withKey({
3120
+ key: params.key
3121
+ }).get().execute()
3122
+ ];
3123
+ case 4:
3124
+ customer1 = _state.sent();
3125
+ return [
3126
+ 2,
3127
+ customer1.body
3128
+ ];
3129
+ case 5:
3130
+ return [
3131
+ 4,
3132
+ this.getCustomersApi(api, params.storeKey).get({
3133
+ queryArgs: _object_spread({
3134
+ limit: params.limit || 10
3135
+ }, params.offset && {
3136
+ offset: params.offset
3137
+ }, params.sort && {
3138
+ sort: params.sort
3139
+ }, params.where && {
3140
+ where: params.where
3141
+ }, params.expand && {
3142
+ expand: params.expand
3143
+ })
3144
+ }).execute()
3145
+ ];
3146
+ case 6:
3147
+ customers = _state.sent();
3148
+ return [
3149
+ 2,
3150
+ customers.body
3151
+ ];
3152
+ case 7:
3153
+ return [
3154
+ 3,
3155
+ 9
3156
+ ];
3157
+ case 8:
3158
+ err = _state.sent();
3159
+ throw new ToolExecutionError(err.message || "Failed to read customers", context, err);
3160
+ case 9:
3161
+ return [
3162
+ 2
3163
+ ];
3164
+ }
3165
+ });
3166
+ }).call(this);
3167
+ }
3168
+ },
3169
+ {
3170
+ key: "create",
3171
+ value: function create(context) {
3172
+ return _async_to_generator(function() {
3173
+ var api, params, customer, error;
3174
+ return _ts_generator(this, function(_state) {
3175
+ switch(_state.label){
3176
+ case 0:
3177
+ api = this.getApiRoot(context).withProjectKey({
3178
+ projectKey: context.configuration.projectKey
3179
+ });
3180
+ params = context.parameters;
3181
+ _state.label = 1;
3182
+ case 1:
3183
+ _state.trys.push([
3184
+ 1,
3185
+ 3,
3186
+ ,
3187
+ 4
3188
+ ]);
3189
+ return [
3190
+ 4,
3191
+ this.getCustomersApi(api, params.storeKey).post({
3192
+ body: params
3193
+ }).execute()
3194
+ ];
3195
+ case 2:
3196
+ customer = _state.sent();
3197
+ return [
3198
+ 2,
3199
+ customer.body
3200
+ ];
3201
+ case 3:
3202
+ error = _state.sent();
3203
+ throw new ToolExecutionError("Failed to create customers", context, error);
3204
+ case 4:
3205
+ return [
3206
+ 2
3207
+ ];
3208
+ }
3209
+ });
3210
+ }).call(this);
3211
+ }
3212
+ },
3213
+ {
3214
+ key: "update",
3215
+ value: function update(context) {
3216
+ return _async_to_generator(function() {
3217
+ var api, params, customer, currentVersion, updatedCustomer, error;
3218
+ return _ts_generator(this, function(_state) {
3219
+ switch(_state.label){
3220
+ case 0:
3221
+ api = this.getApiRoot(context).withProjectKey({
3222
+ projectKey: context.configuration.projectKey
3223
+ });
3224
+ params = context.parameters;
3225
+ _state.label = 1;
3226
+ case 1:
3227
+ _state.trys.push([
3228
+ 1,
3229
+ 4,
3230
+ ,
3231
+ 5
3232
+ ]);
3233
+ return [
3234
+ 4,
3235
+ api.customers().withId({
3236
+ ID: params.id
3237
+ }).get().execute()
3238
+ ];
3239
+ case 2:
3240
+ customer = _state.sent();
3241
+ currentVersion = customer.body.version;
3242
+ return [
3243
+ 4,
3244
+ api.customers().withId({
3245
+ ID: params.id
3246
+ }).post({
3247
+ body: {
3248
+ version: currentVersion,
3249
+ actions: params.actions
3250
+ }
3251
+ }).execute()
3252
+ ];
3253
+ case 3:
3254
+ updatedCustomer = _state.sent();
3255
+ return [
3256
+ 2,
3257
+ updatedCustomer.body
3258
+ ];
3259
+ case 4:
3260
+ error = _state.sent();
3261
+ throw new ToolExecutionError("Failed to update customers", context, error);
3262
+ case 5:
3263
+ return [
3264
+ 2
3265
+ ];
3266
+ }
3267
+ });
3268
+ }).call(this);
3269
+ }
3270
+ },
3271
+ {
3272
+ key: "delete",
3273
+ value: function _delete(context) {
3274
+ return _async_to_generator(function() {
3275
+ return _ts_generator(this, function(_state) {
3276
+ throw new ToolExecutionError("Delete operation not implemented", context);
3277
+ });
3278
+ })();
3279
+ }
3280
+ }
3281
+ ]);
3282
+ return CustomersHandler;
3283
+ }(CommercetoolsResourceHandler);
3284
+ function readCustomers(context, apiClientFactory) {
3285
+ return _async_to_generator(function() {
3286
+ var handler;
3287
+ return _ts_generator(this, function(_state) {
3288
+ handler = new CustomersHandler(apiClientFactory);
3289
+ return [
3290
+ 2,
3291
+ handler.read(context)
3292
+ ];
3293
+ });
3294
+ })();
3295
+ }
3296
+ function createCustomers(context, apiClientFactory) {
3297
+ return _async_to_generator(function() {
3298
+ var handler;
3299
+ return _ts_generator(this, function(_state) {
3300
+ handler = new CustomersHandler(apiClientFactory);
3301
+ return [
3302
+ 2,
3303
+ handler.create(context)
3304
+ ];
3305
+ });
3306
+ })();
3307
+ }
3308
+ function updateCustomers(context, apiClientFactory) {
3309
+ return _async_to_generator(function() {
3310
+ var handler;
3311
+ return _ts_generator(this, function(_state) {
3312
+ handler = new CustomersHandler(apiClientFactory);
3313
+ return [
3314
+ 2,
3315
+ handler.update(context)
3316
+ ];
3317
+ });
3318
+ })();
3319
+ }
3320
+ function deleteCustomers(context, apiClientFactory) {
3321
+ return _async_to_generator(function() {
3322
+ var handler;
3323
+ return _ts_generator(this, function(_state) {
3324
+ handler = new CustomersHandler(apiClientFactory);
3325
+ return [
3326
+ 2,
3327
+ handler.delete(context)
3328
+ ];
3329
+ });
3330
+ })();
3331
+ }
3332
+ // src/resources/customer-groups/customer-groups.schema.ts
3333
+ var import_zod8 = require("zod");
3334
+ var readCustomerGroupsParameters = import_zod8.z.object({
3335
+ id: import_zod8.z.string().optional().describe("Customer group ID"),
3336
+ key: import_zod8.z.string().optional().describe("Customer group key"),
3337
+ where: import_zod8.z.array(import_zod8.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"vip\\""] or ["name = \\"VIP Customers\\""]'),
3338
+ sort: import_zod8.z.array(import_zod8.z.string()).optional().describe('Sort criteria for the results. Example: ["name asc", "createdAt desc", "key asc"]'),
3339
+ limit: import_zod8.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
3340
+ offset: import_zod8.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
3341
+ expand: import_zod8.z.array(import_zod8.z.string()).optional().describe("Fields to expand. Customer groups have no reference expansions by default.")
3342
+ });
3343
+ var createCustomerGroupsParameters = import_zod8.z.object({
3344
+ groupName: import_zod8.z.string().min(1).describe("Unique name of the customer group. Must be different from any existing group name in the project."),
3345
+ key: import_zod8.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the customer group (2-256 characters, alphanumeric with underscores/hyphens)."),
3346
+ custom: import_zod8.z.object({
3347
+ type: import_zod8.z.object({
3348
+ id: import_zod8.z.string().describe("ID of the custom type"),
3349
+ typeId: import_zod8.z.literal("type")
3350
+ }),
3351
+ fields: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.any()).optional().describe("Custom field values")
3352
+ }).optional().describe('Custom fields for the customer group. Requires a Type with resourceTypeIds including "customer-group".')
3353
+ });
3354
+ var updateCustomerGroupsParameters = import_zod8.z.object({
3355
+ id: import_zod8.z.string().optional().describe("The ID of the customer group to update"),
3356
+ key: import_zod8.z.string().optional().describe("The key of the customer group to update"),
3357
+ version: import_zod8.z.number().int().describe("The current version of the customer group (for optimistic locking)"),
3358
+ actions: import_zod8.z.array(import_zod8.z.object({
3359
+ action: import_zod8.z.string().describe("The name of the update action to perform")
3360
+ }).and(import_zod8.z.record(import_zod8.z.string(), import_zod8.z.any()).optional()).describe('Array of update actions. Each action must have an "action" field and other fields specific to that action type (e.g. changeName requires "name", setKey requires "key").')).describe("Update actions")
3361
+ });
3362
+ var deleteCustomerGroupsParameters = import_zod8.z.object({
3363
+ id: import_zod8.z.string().optional().describe("Customer group ID (required if key is not provided)"),
3364
+ key: import_zod8.z.string().optional().describe("Customer group key (required if id is not provided)"),
3365
+ version: import_zod8.z.number().int().describe("Current version of the customer group (for optimistic locking).")
3366
+ });
3367
+ // src/resources/customer-groups/customer-groups.prompt.ts
3368
+ var readCustomerGroupsPrompt = '\nThis tool will fetch a Customer Group by ID or key (if provided) from commercetools or query all available customer groups in a commercetools project if no arguments or parameters are provided.\n\nCustomer groups are used to segment customers (e.g. for B2B pricing, promotions, or analytics). Each customer can be assigned to at most one customer group.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the customer group to fetch.\n- key (string, optional): The key of the customer group to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["key = \\"vip\\""] or ["name = \\"VIP Customers\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["name asc", "createdAt desc", "key asc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Customer groups typically have no reference fields to expand.\n';
3369
+ var createCustomerGroupsPrompt = '\nThis tool will create a new Customer Group in commercetools.\n\nCustomer groups segment customers for pricing, promotions, or reporting. Common examples include "VIP", "Wholesale", or "B2B".\n\nIt takes these required arguments:\n- groupName (string): Unique name of the customer group. Must be different from any existing group name in the project.\n\nIt takes these optional arguments:\n- key (string, optional): User-defined unique identifier for the customer group (2-256 characters, alphanumeric with underscores/hyphens). If omitted, a key may be derived or left unset.\n- custom (object, optional): Custom fields for the customer group. Must include a "type" object with "id" and "typeId" set to "type", and optionally a "fields" object with custom field values. The Type must have resourceTypeIds including "customer-group".\n';
3370
+ var updateCustomerGroupsPrompt = '\nThis tool will update a Customer Group in commercetools using update actions from the commercetools API.\n\nIt takes these required arguments:\n- version (integer): The current version of the customer group (for optimistic locking).\n- actions (array): An array of update actions to perform. Each action must have an "action" field indicating the action type and any required fields for that action.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the customer group to update (required if key is not provided).\n- key (string, optional): The key of the customer group to update (required if id is not provided).\n\nExample actions from the commercetools API include:\n- changeName: Change the name of the customer group. Requires "name" (string).\n- setKey: Set or change the key. Requires "key" (string, optional; omit or set to null to remove).\n- setCustomType: Set custom type and fields. Requires "type" (object with "id", "typeId") and optionally "fields" (object).\n- setCustomField: Set a custom field value. Requires "name" (string) and "value" (any; use null to remove).\n\nEach action type requires specific fields according to the commercetools API documentation.\n';
3371
+ var deleteCustomerGroupsPrompt = "\nThis tool will delete a Customer Group from commercetools.\n\nDeleting a customer group does not delete the customers that were assigned to it; their customerGroup reference will be cleared or may need to be updated separately depending on API behavior.\n\nIt takes these required arguments:\n- version (integer): The current version of the customer group (for optimistic locking).\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the customer group to delete (required if key is not provided).\n- key (string, optional): The key of the customer group to delete (required if id is not provided).\n";
3372
+ // src/resources/customer-groups/customer-groups.handler.ts
3373
+ var CustomerGroupsHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
3374
+ "use strict";
3375
+ _inherits(CustomerGroupsHandler, CommercetoolsResourceHandler);
3376
+ function CustomerGroupsHandler(apiClientFactory) {
3377
+ _class_call_check(this, CustomerGroupsHandler);
3378
+ var _this;
3379
+ _this = _call_super(this, CustomerGroupsHandler, [
3380
+ apiClientFactory
3381
+ ]);
3382
+ __publicField(_this, "metadata", {
3383
+ namespace: "customer-groups",
3384
+ description: "Manage customer groups in commercetools",
3385
+ toolNamePrefix: TOOL_NAME_PREFIX,
3386
+ schemas: {
3387
+ read: readCustomerGroupsParameters,
3388
+ create: createCustomerGroupsParameters,
3389
+ update: updateCustomerGroupsParameters,
3390
+ delete: deleteCustomerGroupsParameters
3391
+ }
3392
+ });
3393
+ return _this;
3394
+ }
3395
+ _create_class(CustomerGroupsHandler, [
3396
+ {
3397
+ key: "getToolDefinition",
3398
+ value: function getToolDefinition(operation) {
3399
+ var prompts = {
3400
+ read: readCustomerGroupsPrompt,
3401
+ create: createCustomerGroupsPrompt,
3402
+ update: updateCustomerGroupsPrompt,
3403
+ delete: deleteCustomerGroupsPrompt
3404
+ };
3405
+ return {
3406
+ name: this.getToolName(operation),
3407
+ description: prompts[operation],
3408
+ inputSchema: this.metadata.schemas[operation]
3409
+ };
3410
+ }
3411
+ },
3412
+ {
3413
+ key: "getCustomerGroupsApi",
3414
+ value: function getCustomerGroupsApi(api) {
3415
+ return api.customerGroups();
3416
+ }
3417
+ },
3418
+ {
3419
+ key: "read",
3420
+ value: function read(context) {
3421
+ return _async_to_generator(function() {
3422
+ var api, params, _params_limit, apiResource, res2, res21, res, err;
3423
+ return _ts_generator(this, function(_state) {
3424
+ switch(_state.label){
3425
+ case 0:
3426
+ api = this.getApiRoot(context).withProjectKey({
3427
+ projectKey: context.configuration.projectKey
3428
+ });
3429
+ params = context.parameters;
3430
+ _state.label = 1;
3431
+ case 1:
3432
+ _state.trys.push([
3433
+ 1,
3434
+ 7,
3435
+ ,
3436
+ 8
3437
+ ]);
3438
+ apiResource = this.getCustomerGroupsApi(api);
3439
+ if (!(params === null || params === void 0 ? void 0 : params.id)) return [
3440
+ 3,
3441
+ 3
3442
+ ];
3443
+ return [
3444
+ 4,
3445
+ apiResource.withId({
3446
+ ID: params.id
3447
+ }).get({
3448
+ queryArgs: _object_spread({}, params.expand && {
3449
+ expand: params.expand
3450
+ })
3451
+ }).execute()
3452
+ ];
3453
+ case 2:
3454
+ res2 = _state.sent();
3455
+ return [
3456
+ 2,
3457
+ res2.body
3458
+ ];
3459
+ case 3:
3460
+ if (!(params === null || params === void 0 ? void 0 : params.key)) return [
3461
+ 3,
3462
+ 5
3463
+ ];
3464
+ return [
3465
+ 4,
3466
+ apiResource.withKey({
3467
+ key: params.key
3468
+ }).get({
3469
+ queryArgs: _object_spread({}, params.expand && {
3470
+ expand: params.expand
3471
+ })
3472
+ }).execute()
3473
+ ];
3474
+ case 4:
3475
+ res21 = _state.sent();
3476
+ return [
3477
+ 2,
3478
+ res21.body
3479
+ ];
3480
+ case 5:
3481
+ return [
3482
+ 4,
3483
+ apiResource.get({
3484
+ queryArgs: _object_spread({
3485
+ limit: (_params_limit = params.limit) !== null && _params_limit !== void 0 ? _params_limit : 20
3486
+ }, params.offset != null && {
3487
+ offset: params.offset
3488
+ }, params.sort && {
3489
+ sort: params.sort
3490
+ }, params.where && {
3491
+ where: params.where
3492
+ }, params.expand && {
3493
+ expand: params.expand
3494
+ })
3495
+ }).execute()
3496
+ ];
3497
+ case 6:
3498
+ res = _state.sent();
3499
+ return [
3500
+ 2,
3501
+ res.body
3502
+ ];
3503
+ case 7:
3504
+ err = _state.sent();
3505
+ throw new ToolExecutionError("Failed to read customer groups", context, err);
3506
+ case 8:
3507
+ return [
3508
+ 2
3509
+ ];
3510
+ }
3511
+ });
3512
+ }).call(this);
3513
+ }
3514
+ },
3515
+ {
3516
+ key: "create",
3517
+ value: function create(context) {
3518
+ return _async_to_generator(function() {
3519
+ var api, params, body, created, err;
3520
+ return _ts_generator(this, function(_state) {
3521
+ switch(_state.label){
3522
+ case 0:
3523
+ api = this.getApiRoot(context).withProjectKey({
3524
+ projectKey: context.configuration.projectKey
3525
+ });
3526
+ params = context.parameters;
3527
+ _state.label = 1;
3528
+ case 1:
3529
+ _state.trys.push([
3530
+ 1,
3531
+ 3,
3532
+ ,
3533
+ 4
3534
+ ]);
3535
+ body = _object_spread({
3536
+ groupName: params.groupName
3537
+ }, params.key != null && {
3538
+ key: params.key
3539
+ }, params.custom != null && {
3540
+ custom: params.custom
3541
+ });
3542
+ return [
3543
+ 4,
3544
+ this.getCustomerGroupsApi(api).post({
3545
+ body: body
3546
+ }).execute()
3547
+ ];
3548
+ case 2:
3549
+ created = _state.sent();
3550
+ return [
3551
+ 2,
3552
+ created.body
3553
+ ];
3554
+ case 3:
3555
+ err = _state.sent();
3556
+ throw new ToolExecutionError("Failed to create customer group", context, err);
3557
+ case 4:
3558
+ return [
3559
+ 2
3560
+ ];
3561
+ }
3562
+ });
3563
+ }).call(this);
3564
+ }
3565
+ },
3566
+ {
3567
+ key: "update",
3568
+ value: function update(context) {
3569
+ return _async_to_generator(function() {
3570
+ var api, params, _params_actions, apiResource, groupId, version, res, updated, err;
3571
+ return _ts_generator(this, function(_state) {
3572
+ switch(_state.label){
3573
+ case 0:
3574
+ api = this.getApiRoot(context).withProjectKey({
3575
+ projectKey: context.configuration.projectKey
3576
+ });
3577
+ params = context.parameters;
3578
+ _state.label = 1;
3579
+ case 1:
3580
+ _state.trys.push([
3581
+ 1,
3582
+ 7,
3583
+ ,
3584
+ 8
3585
+ ]);
3586
+ apiResource = this.getCustomerGroupsApi(api);
3587
+ version = params.version;
3588
+ if (!params.id) return [
3589
+ 3,
3590
+ 2
3591
+ ];
3592
+ groupId = params.id;
3593
+ return [
3594
+ 3,
3595
+ 5
3596
+ ];
3597
+ case 2:
3598
+ if (!params.key) return [
3599
+ 3,
3600
+ 4
3601
+ ];
3602
+ return [
3603
+ 4,
3604
+ apiResource.withKey({
3605
+ key: params.key
3606
+ }).get().execute()
3607
+ ];
3608
+ case 3:
3609
+ res = _state.sent();
3610
+ groupId = res.body.id;
3611
+ version = res.body.version;
3612
+ return [
3613
+ 3,
3614
+ 5
3615
+ ];
3616
+ case 4:
3617
+ throw new ToolExecutionError("Either id or key must be provided", context);
3618
+ case 5:
3619
+ return [
3620
+ 4,
3621
+ apiResource.withId({
3622
+ ID: groupId
3623
+ }).post({
3624
+ body: {
3625
+ version: version,
3626
+ actions: (_params_actions = params.actions) !== null && _params_actions !== void 0 ? _params_actions : []
3627
+ }
3628
+ }).execute()
3629
+ ];
3630
+ case 6:
3631
+ updated = _state.sent();
3632
+ return [
3633
+ 2,
3634
+ updated.body
3635
+ ];
3636
+ case 7:
3637
+ err = _state.sent();
3638
+ throw new ToolExecutionError("Failed to update customer group", context, err);
3639
+ case 8:
3640
+ return [
3641
+ 2
3642
+ ];
3643
+ }
3644
+ });
3645
+ }).call(this);
3646
+ }
3647
+ },
3648
+ {
3649
+ key: "delete",
3650
+ value: function _delete(context) {
3651
+ return _async_to_generator(function() {
3652
+ return _ts_generator(this, function(_state) {
3653
+ throw new ToolExecutionError("Delete operation not implemented for customer groups", context);
3654
+ });
3655
+ })();
3656
+ }
3657
+ }
3658
+ ]);
3659
+ return CustomerGroupsHandler;
3660
+ }(CommercetoolsResourceHandler);
3661
+ function readCustomerGroups(context, apiClientFactory) {
3662
+ return _async_to_generator(function() {
3663
+ var handler;
3664
+ return _ts_generator(this, function(_state) {
3665
+ handler = new CustomerGroupsHandler(apiClientFactory);
3666
+ return [
3667
+ 2,
3668
+ handler.read(context)
3669
+ ];
3670
+ });
3671
+ })();
3672
+ }
3673
+ function createCustomerGroups(context, apiClientFactory) {
3674
+ return _async_to_generator(function() {
3675
+ var handler;
3676
+ return _ts_generator(this, function(_state) {
3677
+ handler = new CustomerGroupsHandler(apiClientFactory);
3678
+ return [
3679
+ 2,
3680
+ handler.create(context)
3681
+ ];
3682
+ });
3683
+ })();
3684
+ }
3685
+ function updateCustomerGroups(context, apiClientFactory) {
3686
+ return _async_to_generator(function() {
3687
+ var handler;
3688
+ return _ts_generator(this, function(_state) {
3689
+ handler = new CustomerGroupsHandler(apiClientFactory);
3690
+ return [
3691
+ 2,
3692
+ handler.update(context)
3693
+ ];
3694
+ });
3695
+ })();
3696
+ }
3697
+ function deleteCustomerGroups(context, apiClientFactory) {
3698
+ return _async_to_generator(function() {
3699
+ var handler;
3700
+ return _ts_generator(this, function(_state) {
3701
+ handler = new CustomerGroupsHandler(apiClientFactory);
3702
+ return [
3703
+ 2,
3704
+ handler.delete(context)
3705
+ ];
3706
+ });
3707
+ })();
3708
+ }
3709
+ // src/resources/customer-search/customer-search.schema.ts
3710
+ var import_zod9 = require("zod");
3711
+ var readCustomerSearchParameters = import_zod9.z.object({
3712
+ query: import_zod9.z.record(import_zod9.z.any()).optional().describe("Search query (SearchQuery). Use fullText (field, value), exact (field, value), range (field, gte, lt), or compound (and, or, not). Text fields: all, firstName, lastName, email, companyName, fullName, addresses.*. Keyword: id, key, customerNumber, externalId, vatId, customerGroup.id, stores.key. Number/date: dateOfBirth, createdAt, lastModifiedAt, version."),
3713
+ sort: import_zod9.z.array(import_zod9.z.record(import_zod9.z.any())).optional().describe('Sort criteria (SearchSorting). If not provided, results are sorted by relevance descending. Example: [{"field": "createdAt", "order": "desc"}]'),
3714
+ limit: import_zod9.z.number().int().min(1).max(100).optional().describe("Maximum number of search results. Default: 20. Minimum: 1, Maximum: 100."),
3715
+ offset: import_zod9.z.number().int().min(0).max(9900).optional().describe("Number of search results to skip for pagination. Default: 0. Minimum: 0, Maximum: 9900.")
3716
+ });
3717
+ var createCustomerSearchParameters = import_zod9.z.object({}).describe("Customer Search does not support create operations");
3718
+ var updateCustomerSearchParameters = import_zod9.z.object({}).describe("Customer Search does not support update operations");
3719
+ var deleteCustomerSearchParameters = import_zod9.z.object({}).describe("Customer Search does not support delete operations");
3720
+ // src/resources/customer-search/customer-search.prompt.ts
3721
+ var readCustomerSearchPrompt = '\nThis tool searches across Customers in a commercetools Project using the [Customer Search API](https://docs.commercetools.com/api/projects/customer-search). It is designed for back-office use cases (e.g. Merchant Center, admin tools), not storefront search.\n\nThe API is **ID-first**: it returns only Customer IDs (and relevance scores). To get full Customer data, use the Get Customer by ID endpoint (customers.read with id) after searching.\n\nCustomer Search is deactivated for a Project by default. Activate it via the Project API (Change Customer Search status) or by indexing in Merchant Center (Customers > Customer list). If no search calls are made for 30 days, the feature is automatically deactivated.\n\nIt takes these optional arguments:\n- query (object, optional): Search query in the [Search Query Language](https://docs.commercetools.com/api/search-query-language). Examples:\n - Full-text on a field: { "fullText": { "field": "firstName", "value": "john" } }\n - Search in all text fields: { "fullText": { "field": "all", "value": "example" } }\n - Exact match (keyword): { "exact": { "field": "email", "value": "user@example.com" } } or { "exact": { "field": "id", "value": "customer-id" } }\n - Range (date/number): { "range": { "field": "createdAt", "gte": "2023-12-01T00:00:00.000Z", "lt": "2024-01-01T00:00:00.000Z" } }\n - Compound: { "and": [ { "fullText": { "field": "firstName", "value": "john" } }, { "exact": { "field": "customerGroup.id", "value": "group-id" } } ] } or { "or": [ ... ] }\n Text fields: all, firstName, lastName, email, companyName, fullName, addresses.all, addresses.city, addresses.country, etc. Keyword: id, key, customerNumber, externalId, vatId, customerGroup.id, stores.key. Number/date: dateOfBirth, createdAt, lastModifiedAt, version.\n- sort (array of objects, optional): Sort criteria (SearchSorting). If not provided, results are sorted by relevance descending. Example: [{"field": "createdAt", "order": "desc"}].\n- limit (integer, optional): Maximum number of results. Default: 20. Min: 1, Max: 100.\n- offset (integer, optional): Number of results to skip for pagination. Default: 0. Min: 0, Max: 9900.\n\nIf the index is not ready or the feature is inactive, a SearchNotReady error is returned.\n';
3722
+ var createCustomerSearchPrompt = "\nCustomer Search does not support create operations. This is a read-only search API. Use the Customers API (customers.create) to create customers.\n";
3723
+ var updateCustomerSearchPrompt = "\nCustomer Search does not support update operations. This is a read-only search API. Use the Customers API (customers.update) to update customers.\n";
3724
+ var deleteCustomerSearchPrompt = "\nCustomer Search does not support delete operations. This is a read-only search API. Use the Customers API (customers.delete) to delete customers.\n";
3725
+ // src/resources/customer-search/customer-search.handler.ts
3726
+ var CustomerSearchHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
3727
+ "use strict";
3728
+ _inherits(CustomerSearchHandler, CommercetoolsResourceHandler);
3729
+ function CustomerSearchHandler(apiClientFactory) {
3730
+ _class_call_check(this, CustomerSearchHandler);
3731
+ var _this;
3732
+ _this = _call_super(this, CustomerSearchHandler, [
3733
+ apiClientFactory
3734
+ ]);
3735
+ __publicField(_this, "metadata", {
3736
+ namespace: "customer-search",
3737
+ description: "Search customers in commercetools (back-office, ID-first)",
3738
+ toolNamePrefix: TOOL_NAME_PREFIX,
3739
+ schemas: {
3740
+ read: readCustomerSearchParameters,
3741
+ create: createCustomerSearchParameters,
3742
+ update: updateCustomerSearchParameters,
3743
+ delete: deleteCustomerSearchParameters
3744
+ }
3745
+ });
3746
+ return _this;
3747
+ }
3748
+ _create_class(CustomerSearchHandler, [
3749
+ {
3750
+ key: "getToolDefinition",
3751
+ value: function getToolDefinition(operation) {
3752
+ var prompts = {
3753
+ read: readCustomerSearchPrompt,
3754
+ create: createCustomerSearchPrompt,
3755
+ update: updateCustomerSearchPrompt,
3756
+ delete: deleteCustomerSearchPrompt
3757
+ };
3758
+ return {
3759
+ name: this.getToolName(operation),
3760
+ description: prompts[operation],
3761
+ inputSchema: this.metadata.schemas[operation]
3762
+ };
3763
+ }
3764
+ },
3765
+ {
3766
+ key: "getCustomerSearchApi",
3767
+ value: function getCustomerSearchApi(api) {
3768
+ return api.customers().search();
3769
+ }
3770
+ },
3771
+ {
3772
+ key: "read",
3773
+ value: function read(context) {
2756
3774
  return _async_to_generator(function() {
2757
- var api, params, customer, error;
3775
+ var api, params, body, searchResponse, err;
2758
3776
  return _ts_generator(this, function(_state) {
2759
3777
  switch(_state.label){
2760
3778
  case 0:
@@ -2770,21 +3788,30 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2770
3788
  ,
2771
3789
  4
2772
3790
  ]);
3791
+ body = _object_spread({}, params.query != null && {
3792
+ query: params.query
3793
+ }, params.sort != null && {
3794
+ sort: params.sort
3795
+ }, params.limit != null && {
3796
+ limit: params.limit
3797
+ }, params.offset != null && {
3798
+ offset: params.offset
3799
+ });
2773
3800
  return [
2774
3801
  4,
2775
- this.getCustomersApi(api, params.storeKey).post({
2776
- body: params
3802
+ this.getCustomerSearchApi(api).post({
3803
+ body: body
2777
3804
  }).execute()
2778
3805
  ];
2779
3806
  case 2:
2780
- customer = _state.sent();
3807
+ searchResponse = _state.sent();
2781
3808
  return [
2782
3809
  2,
2783
- customer.body
3810
+ searchResponse.body
2784
3811
  ];
2785
3812
  case 3:
2786
- error = _state.sent();
2787
- throw new ToolExecutionError("Failed to create customers", context, error);
3813
+ err = _state.sent();
3814
+ throw new ToolExecutionError(err.message || "Failed to search customers", context, err);
2788
3815
  case 4:
2789
3816
  return [
2790
3817
  2
@@ -2794,62 +3821,24 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2794
3821
  }).call(this);
2795
3822
  }
2796
3823
  },
3824
+ {
3825
+ key: "create",
3826
+ value: function create(context) {
3827
+ return _async_to_generator(function() {
3828
+ return _ts_generator(this, function(_state) {
3829
+ throw new ToolExecutionError("Create operation not supported for customer-search", context);
3830
+ });
3831
+ })();
3832
+ }
3833
+ },
2797
3834
  {
2798
3835
  key: "update",
2799
3836
  value: function update(context) {
2800
3837
  return _async_to_generator(function() {
2801
- var api, params, customer, currentVersion, updatedCustomer, error;
2802
3838
  return _ts_generator(this, function(_state) {
2803
- switch(_state.label){
2804
- case 0:
2805
- api = this.getApiRoot(context).withProjectKey({
2806
- projectKey: context.configuration.projectKey
2807
- });
2808
- params = context.parameters;
2809
- _state.label = 1;
2810
- case 1:
2811
- _state.trys.push([
2812
- 1,
2813
- 4,
2814
- ,
2815
- 5
2816
- ]);
2817
- return [
2818
- 4,
2819
- api.customers().withId({
2820
- ID: params.id
2821
- }).get().execute()
2822
- ];
2823
- case 2:
2824
- customer = _state.sent();
2825
- currentVersion = customer.body.version;
2826
- return [
2827
- 4,
2828
- api.customers().withId({
2829
- ID: params.id
2830
- }).post({
2831
- body: {
2832
- version: currentVersion,
2833
- actions: params.actions
2834
- }
2835
- }).execute()
2836
- ];
2837
- case 3:
2838
- updatedCustomer = _state.sent();
2839
- return [
2840
- 2,
2841
- updatedCustomer.body
2842
- ];
2843
- case 4:
2844
- error = _state.sent();
2845
- throw new ToolExecutionError("Failed to update customers", context, error);
2846
- case 5:
2847
- return [
2848
- 2
2849
- ];
2850
- }
3839
+ throw new ToolExecutionError("Update operation not supported for customer-search", context);
2851
3840
  });
2852
- }).call(this);
3841
+ })();
2853
3842
  }
2854
3843
  },
2855
3844
  {
@@ -2857,19 +3846,19 @@ var CustomersHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
2857
3846
  value: function _delete(context) {
2858
3847
  return _async_to_generator(function() {
2859
3848
  return _ts_generator(this, function(_state) {
2860
- throw new ToolExecutionError("Delete operation not implemented", context);
3849
+ throw new ToolExecutionError("Delete operation not supported for customer-search", context);
2861
3850
  });
2862
3851
  })();
2863
3852
  }
2864
3853
  }
2865
3854
  ]);
2866
- return CustomersHandler;
3855
+ return CustomerSearchHandler;
2867
3856
  }(CommercetoolsResourceHandler);
2868
- function readCustomers(context, apiClientFactory) {
3857
+ function readCustomerSearch(context, apiClientFactory) {
2869
3858
  return _async_to_generator(function() {
2870
3859
  var handler;
2871
3860
  return _ts_generator(this, function(_state) {
2872
- handler = new CustomersHandler(apiClientFactory);
3861
+ handler = new CustomerSearchHandler(apiClientFactory);
2873
3862
  return [
2874
3863
  2,
2875
3864
  handler.read(context)
@@ -2877,11 +3866,11 @@ function readCustomers(context, apiClientFactory) {
2877
3866
  });
2878
3867
  })();
2879
3868
  }
2880
- function createCustomers(context, apiClientFactory) {
3869
+ function createCustomerSearch(context, apiClientFactory) {
2881
3870
  return _async_to_generator(function() {
2882
3871
  var handler;
2883
3872
  return _ts_generator(this, function(_state) {
2884
- handler = new CustomersHandler(apiClientFactory);
3873
+ handler = new CustomerSearchHandler(apiClientFactory);
2885
3874
  return [
2886
3875
  2,
2887
3876
  handler.create(context)
@@ -2889,11 +3878,11 @@ function createCustomers(context, apiClientFactory) {
2889
3878
  });
2890
3879
  })();
2891
3880
  }
2892
- function updateCustomers(context, apiClientFactory) {
3881
+ function updateCustomerSearch(context, apiClientFactory) {
2893
3882
  return _async_to_generator(function() {
2894
3883
  var handler;
2895
3884
  return _ts_generator(this, function(_state) {
2896
- handler = new CustomersHandler(apiClientFactory);
3885
+ handler = new CustomerSearchHandler(apiClientFactory);
2897
3886
  return [
2898
3887
  2,
2899
3888
  handler.update(context)
@@ -2901,11 +3890,11 @@ function updateCustomers(context, apiClientFactory) {
2901
3890
  });
2902
3891
  })();
2903
3892
  }
2904
- function deleteCustomers(context, apiClientFactory) {
3893
+ function deleteCustomerSearch(context, apiClientFactory) {
2905
3894
  return _async_to_generator(function() {
2906
3895
  var handler;
2907
3896
  return _ts_generator(this, function(_state) {
2908
- handler = new CustomersHandler(apiClientFactory);
3897
+ handler = new CustomerSearchHandler(apiClientFactory);
2909
3898
  return [
2910
3899
  2,
2911
3900
  handler.delete(context)
@@ -2914,54 +3903,54 @@ function deleteCustomers(context, apiClientFactory) {
2914
3903
  })();
2915
3904
  }
2916
3905
  // src/resources/discount-codes/discount-codes.schema.ts
2917
- var import_zod7 = require("zod");
2918
- var readDiscountCodesParameters = import_zod7.z.object({
2919
- id: import_zod7.z.string().optional().describe("Discount Code ID"),
2920
- key: import_zod7.z.string().optional().describe("Discount Code key"),
2921
- where: import_zod7.z.array(import_zod7.z.string()).optional().describe('Query predicates specified as strings. Example: ["code = \\"SUMMER2024\\""]'),
2922
- sort: import_zod7.z.array(import_zod7.z.string()).optional().describe('Sort criteria for the results. Example: ["code asc", "createdAt desc"]'),
2923
- limit: import_zod7.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
2924
- offset: import_zod7.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
2925
- expand: import_zod7.z.array(import_zod7.z.string()).optional().describe('Fields to expand. Example: ["cartDiscounts[*]"]')
3906
+ var import_zod10 = require("zod");
3907
+ var readDiscountCodesParameters = import_zod10.z.object({
3908
+ id: import_zod10.z.string().optional().describe("Discount Code ID"),
3909
+ key: import_zod10.z.string().optional().describe("Discount Code key"),
3910
+ where: import_zod10.z.array(import_zod10.z.string()).optional().describe('Query predicates specified as strings. Example: ["code = \\"SUMMER2024\\""]'),
3911
+ sort: import_zod10.z.array(import_zod10.z.string()).optional().describe('Sort criteria for the results. Example: ["code asc", "createdAt desc"]'),
3912
+ limit: import_zod10.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
3913
+ offset: import_zod10.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
3914
+ expand: import_zod10.z.array(import_zod10.z.string()).optional().describe('Fields to expand. Example: ["cartDiscounts[*]"]')
2926
3915
  });
2927
- var createDiscountCodesParameters = import_zod7.z.object({
2928
- key: import_zod7.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the discount code"),
2929
- name: import_zod7.z.record(import_zod7.z.string()).optional().describe("Localized name of the Discount Code"),
2930
- description: import_zod7.z.record(import_zod7.z.string()).optional().describe("Localized description"),
2931
- code: import_zod7.z.string().describe("User-defined unique identifier added to a Cart to apply related Cart Discounts"),
2932
- cartDiscounts: import_zod7.z.array(import_zod7.z.object({
2933
- id: import_zod7.z.string().optional(),
2934
- key: import_zod7.z.string().optional(),
2935
- typeId: import_zod7.z.literal("cart-discount")
3916
+ var createDiscountCodesParameters = import_zod10.z.object({
3917
+ key: import_zod10.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the discount code"),
3918
+ name: import_zod10.z.record(import_zod10.z.string()).optional().describe("Localized name of the Discount Code"),
3919
+ description: import_zod10.z.record(import_zod10.z.string()).optional().describe("Localized description"),
3920
+ code: import_zod10.z.string().describe("User-defined unique identifier added to a Cart to apply related Cart Discounts"),
3921
+ cartDiscounts: import_zod10.z.array(import_zod10.z.object({
3922
+ id: import_zod10.z.string().optional(),
3923
+ key: import_zod10.z.string().optional(),
3924
+ typeId: import_zod10.z.literal("cart-discount")
2936
3925
  })).describe("Array of references to up to 10 CartDiscounts that apply when the code is used"),
2937
- cartPredicate: import_zod7.z.string().optional().describe("Optional predicate defining which Carts the code can apply to"),
2938
- isActive: import_zod7.z.boolean().optional().describe("Whether the code can be applied (defaults to false)"),
2939
- maxApplications: import_zod7.z.number().int().min(0).optional().describe("Total number of times the code can be applied"),
2940
- maxApplicationsPerCustomer: import_zod7.z.number().int().min(0).optional().describe("Times the code can be applied per customer"),
2941
- groups: import_zod7.z.array(import_zod7.z.string()).optional().describe("Tags for grouping and organizing Discount Codes"),
2942
- validFrom: import_zod7.z.string().optional().describe("Date/time when the code becomes valid (ISO 8601 format)"),
2943
- validUntil: import_zod7.z.string().optional().describe("Date/time when the code expires (ISO 8601 format)"),
2944
- custom: import_zod7.z.object({
2945
- type: import_zod7.z.object({
2946
- id: import_zod7.z.string(),
2947
- typeId: import_zod7.z.literal("type")
3926
+ cartPredicate: import_zod10.z.string().optional().describe("Optional predicate defining which Carts the code can apply to"),
3927
+ isActive: import_zod10.z.boolean().optional().describe("Whether the code can be applied (defaults to false)"),
3928
+ maxApplications: import_zod10.z.number().int().min(0).optional().describe("Total number of times the code can be applied"),
3929
+ maxApplicationsPerCustomer: import_zod10.z.number().int().min(0).optional().describe("Times the code can be applied per customer"),
3930
+ groups: import_zod10.z.array(import_zod10.z.string()).optional().describe("Tags for grouping and organizing Discount Codes"),
3931
+ validFrom: import_zod10.z.string().optional().describe("Date/time when the code becomes valid (ISO 8601 format)"),
3932
+ validUntil: import_zod10.z.string().optional().describe("Date/time when the code expires (ISO 8601 format)"),
3933
+ custom: import_zod10.z.object({
3934
+ type: import_zod10.z.object({
3935
+ id: import_zod10.z.string(),
3936
+ typeId: import_zod10.z.literal("type")
2948
3937
  }).optional(),
2949
- fields: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.any()).optional()
3938
+ fields: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.any()).optional()
2950
3939
  }).optional().describe("Custom fields for the discount code")
2951
3940
  });
2952
- var updateDiscountCodesParameters = import_zod7.z.object({
2953
- id: import_zod7.z.string().optional().describe("The ID of the discount code to update"),
2954
- key: import_zod7.z.string().optional().describe("The key of the discount code to update"),
2955
- version: import_zod7.z.number().int().describe("The current version of the discount code"),
2956
- actions: import_zod7.z.array(import_zod7.z.object({
2957
- action: import_zod7.z.string().describe("The name of the update action to perform")
2958
- }).and(import_zod7.z.record(import_zod7.z.string(), import_zod7.z.any()).optional()).describe('Array of update actions to perform on the discount code. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
3941
+ var updateDiscountCodesParameters = import_zod10.z.object({
3942
+ id: import_zod10.z.string().optional().describe("The ID of the discount code to update"),
3943
+ key: import_zod10.z.string().optional().describe("The key of the discount code to update"),
3944
+ version: import_zod10.z.number().int().describe("The current version of the discount code"),
3945
+ actions: import_zod10.z.array(import_zod10.z.object({
3946
+ action: import_zod10.z.string().describe("The name of the update action to perform")
3947
+ }).and(import_zod10.z.record(import_zod10.z.string(), import_zod10.z.any()).optional()).describe('Array of update actions to perform on the discount code. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
2959
3948
  });
2960
- var deleteDiscountCodesParameters = import_zod7.z.object({
2961
- id: import_zod7.z.string().optional().describe("Discount Code ID"),
2962
- key: import_zod7.z.string().optional().describe("Discount Code key"),
2963
- version: import_zod7.z.number().int().describe("Current version (for optimistic locking)"),
2964
- dataErasure: import_zod7.z.boolean().optional().describe("Delete personal data")
3949
+ var deleteDiscountCodesParameters = import_zod10.z.object({
3950
+ id: import_zod10.z.string().optional().describe("Discount Code ID"),
3951
+ key: import_zod10.z.string().optional().describe("Discount Code key"),
3952
+ version: import_zod10.z.number().int().describe("Current version (for optimistic locking)"),
3953
+ dataErasure: import_zod10.z.boolean().optional().describe("Delete personal data")
2965
3954
  });
2966
3955
  // src/resources/discount-codes/discount-codes.prompt.ts
2967
3956
  var readDiscountCodesPrompt = '\nThis tool will fetch a Discount Code by ID or key (if provided) from commercetools or query all available discount codes in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the discount code to fetch.\n- key (string, optional): The key of the discount code to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["code = \\"SUMMER2024\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["code asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Example: ["cartDiscounts[*]"]\n';
@@ -3253,7 +4242,7 @@ var DiscountCodesHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler)
3253
4242
  value: function _delete(context) {
3254
4243
  return _async_to_generator(function() {
3255
4244
  return _ts_generator(this, function(_state) {
3256
- throw new ToolExecutionError("Not implemented", context);
4245
+ throw new ToolExecutionError("Delete operation not implemented for discount codes", context);
3257
4246
  });
3258
4247
  })();
3259
4248
  }
@@ -3310,42 +4299,42 @@ function deleteDiscountCodes(context, apiClientFactory) {
3310
4299
  })();
3311
4300
  }
3312
4301
  // src/resources/extensions/extensions.schema.ts
3313
- var import_zod8 = require("zod");
3314
- var readExtensionsParameters = import_zod8.z.object({
3315
- id: import_zod8.z.string().optional().describe("Extension ID"),
3316
- key: import_zod8.z.string().optional().describe("Extension key"),
3317
- where: import_zod8.z.array(import_zod8.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-extension\\""]'),
3318
- sort: import_zod8.z.array(import_zod8.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
3319
- limit: import_zod8.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
3320
- offset: import_zod8.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
3321
- expand: import_zod8.z.array(import_zod8.z.string()).optional().describe('Fields to expand. Example: ["destination", "triggers"]')
4302
+ var import_zod11 = require("zod");
4303
+ var readExtensionsParameters = import_zod11.z.object({
4304
+ id: import_zod11.z.string().optional().describe("Extension ID"),
4305
+ key: import_zod11.z.string().optional().describe("Extension key"),
4306
+ where: import_zod11.z.array(import_zod11.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-extension\\""]'),
4307
+ sort: import_zod11.z.array(import_zod11.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
4308
+ limit: import_zod11.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
4309
+ offset: import_zod11.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
4310
+ expand: import_zod11.z.array(import_zod11.z.string()).optional().describe('Fields to expand. Example: ["destination", "triggers"]')
3322
4311
  });
3323
- var createExtensionsParameters = import_zod8.z.object({
3324
- key: import_zod8.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the extension"),
3325
- destination: import_zod8.z.object({
3326
- type: import_zod8.z.enum([
4312
+ var createExtensionsParameters = import_zod11.z.object({
4313
+ key: import_zod11.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the extension"),
4314
+ destination: import_zod11.z.object({
4315
+ type: import_zod11.z.enum([
3327
4316
  "HTTP",
3328
4317
  "AWSLambda",
3329
4318
  "GoogleCloudFunction"
3330
4319
  ]),
3331
- url: import_zod8.z.string().optional().describe("URL of the HTTP endpoint or Google Cloud Function"),
3332
- arn: import_zod8.z.string().optional().describe("ARN of the AWS Lambda function"),
3333
- accessKey: import_zod8.z.string().optional().describe("AWS access key or Azure Event Grid access key"),
3334
- accessSecret: import_zod8.z.string().optional().describe("AWS access secret"),
3335
- region: import_zod8.z.string().optional().describe("AWS region or Google Cloud region"),
3336
- authentication: import_zod8.z.object({
3337
- type: import_zod8.z.enum([
4320
+ url: import_zod11.z.string().optional().describe("URL of the HTTP endpoint or Google Cloud Function"),
4321
+ arn: import_zod11.z.string().optional().describe("ARN of the AWS Lambda function"),
4322
+ accessKey: import_zod11.z.string().optional().describe("AWS access key or Azure Event Grid access key"),
4323
+ accessSecret: import_zod11.z.string().optional().describe("AWS access secret"),
4324
+ region: import_zod11.z.string().optional().describe("AWS region or Google Cloud region"),
4325
+ authentication: import_zod11.z.object({
4326
+ type: import_zod11.z.enum([
3338
4327
  "AuthorizationHeader",
3339
4328
  "AzureFunctions"
3340
4329
  ]),
3341
- headerValue: import_zod8.z.string().optional().describe("Header value for authorization"),
3342
- key: import_zod8.z.string().optional().describe("Function key for authentication")
4330
+ headerValue: import_zod11.z.string().optional().describe("Header value for authorization"),
4331
+ key: import_zod11.z.string().optional().describe("Function key for authentication")
3343
4332
  }).optional().describe("Authentication configuration"),
3344
- connectionString: import_zod8.z.string().optional().describe("Azure Service Bus connection string"),
3345
- uri: import_zod8.z.string().optional().describe("RabbitMQ URI or Azure Event Grid URI")
4333
+ connectionString: import_zod11.z.string().optional().describe("Azure Service Bus connection string"),
4334
+ uri: import_zod11.z.string().optional().describe("RabbitMQ URI or Azure Event Grid URI")
3346
4335
  }).describe("Destination configuration for the extension"),
3347
- triggers: import_zod8.z.array(import_zod8.z.object({
3348
- resourceTypeId: import_zod8.z.enum([
4336
+ triggers: import_zod11.z.array(import_zod11.z.object({
4337
+ resourceTypeId: import_zod11.z.enum([
3349
4338
  "cart",
3350
4339
  "order",
3351
4340
  "payment",
@@ -3358,26 +4347,26 @@ var createExtensionsParameters = import_zod8.z.object({
3358
4347
  "business-unit",
3359
4348
  "shopping-list"
3360
4349
  ]).describe("Resource type that triggers the extension"),
3361
- actions: import_zod8.z.array(import_zod8.z.enum([
4350
+ actions: import_zod11.z.array(import_zod11.z.enum([
3362
4351
  "Create",
3363
4352
  "Update"
3364
4353
  ])).describe("Actions that trigger the extension"),
3365
- condition: import_zod8.z.string().optional().describe("Conditional predicate for triggering")
4354
+ condition: import_zod11.z.string().optional().describe("Conditional predicate for triggering")
3366
4355
  })).describe("Describes what triggers the extension"),
3367
- timeoutInMs: import_zod8.z.number().int().min(1).max(1e4).optional().describe("Maximum time in milliseconds for the extension to respond (default: 2000, max: 10000)")
4356
+ timeoutInMs: import_zod11.z.number().int().min(1).max(1e4).optional().describe("Maximum time in milliseconds for the extension to respond (default: 2000, max: 10000)")
3368
4357
  });
3369
- var updateExtensionsParameters = import_zod8.z.object({
3370
- id: import_zod8.z.string().optional().describe("The ID of the extension to update"),
3371
- key: import_zod8.z.string().optional().describe("The key of the extension to update"),
3372
- version: import_zod8.z.number().int().describe("The current version of the extension"),
3373
- actions: import_zod8.z.array(import_zod8.z.object({
3374
- action: import_zod8.z.string().describe("The name of the update action to perform")
3375
- }).and(import_zod8.z.record(import_zod8.z.string(), import_zod8.z.any()).optional()).describe('Array of update actions to perform on the extension. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
4358
+ var updateExtensionsParameters = import_zod11.z.object({
4359
+ id: import_zod11.z.string().optional().describe("The ID of the extension to update"),
4360
+ key: import_zod11.z.string().optional().describe("The key of the extension to update"),
4361
+ version: import_zod11.z.number().int().describe("The current version of the extension"),
4362
+ actions: import_zod11.z.array(import_zod11.z.object({
4363
+ action: import_zod11.z.string().describe("The name of the update action to perform")
4364
+ }).and(import_zod11.z.record(import_zod11.z.string(), import_zod11.z.any()).optional()).describe('Array of update actions to perform on the extension. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
3376
4365
  });
3377
- var deleteExtensionsParameters = import_zod8.z.object({
3378
- id: import_zod8.z.string().optional().describe("Extension ID"),
3379
- key: import_zod8.z.string().optional().describe("Extension key"),
3380
- version: import_zod8.z.number().int().describe("Current version (for optimistic locking)")
4366
+ var deleteExtensionsParameters = import_zod11.z.object({
4367
+ id: import_zod11.z.string().optional().describe("Extension ID"),
4368
+ key: import_zod11.z.string().optional().describe("Extension key"),
4369
+ version: import_zod11.z.number().int().describe("Current version (for optimistic locking)")
3381
4370
  });
3382
4371
  // src/resources/extensions/extensions.prompt.ts
3383
4372
  var readExtensionsPrompt = '\nThis tool will fetch an Extension by ID or key (if provided) from commercetools or query all available extensions in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the extension to fetch.\n- key (string, optional): The key of the extension to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["key = \\"my-extension\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["key asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Example: ["destination", "triggers"]\n';
@@ -3718,48 +4707,48 @@ function deleteExtensions(context, apiClientFactory) {
3718
4707
  })();
3719
4708
  }
3720
4709
  // src/resources/inventory/inventory.schema.ts
3721
- var import_zod9 = require("zod");
3722
- var readInventoryParameters = import_zod9.z.object({
3723
- id: import_zod9.z.string().optional().describe("Inventory Entry ID"),
3724
- key: import_zod9.z.string().optional().describe("Inventory Entry key"),
3725
- sku: import_zod9.z.string().optional().describe("SKU of the product variant"),
3726
- where: import_zod9.z.array(import_zod9.z.string()).optional().describe('Query predicates specified as strings. Example: ["sku = \\"SKU-123\\""]'),
3727
- sort: import_zod9.z.array(import_zod9.z.string()).optional().describe('Sort criteria for the results. Example: ["quantityOnStock desc", "createdAt asc"]'),
3728
- limit: import_zod9.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10."),
3729
- offset: import_zod9.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
3730
- expand: import_zod9.z.array(import_zod9.z.string()).optional().describe('Fields to expand. Example: ["supplyChannel"]')
4710
+ var import_zod12 = require("zod");
4711
+ var readInventoryParameters = import_zod12.z.object({
4712
+ id: import_zod12.z.string().optional().describe("Inventory Entry ID"),
4713
+ key: import_zod12.z.string().optional().describe("Inventory Entry key"),
4714
+ sku: import_zod12.z.string().optional().describe("SKU of the product variant"),
4715
+ where: import_zod12.z.array(import_zod12.z.string()).optional().describe('Query predicates specified as strings. Example: ["sku = \\"SKU-123\\""]'),
4716
+ sort: import_zod12.z.array(import_zod12.z.string()).optional().describe('Sort criteria for the results. Example: ["quantityOnStock desc", "createdAt asc"]'),
4717
+ limit: import_zod12.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10."),
4718
+ offset: import_zod12.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
4719
+ expand: import_zod12.z.array(import_zod12.z.string()).optional().describe('Fields to expand. Example: ["supplyChannel"]')
3731
4720
  });
3732
- var createInventoryParameters = import_zod9.z.object({
3733
- sku: import_zod9.z.string().describe("SKU of the product variant"),
3734
- quantityOnStock: import_zod9.z.number().int().min(0).describe("Quantity available in stock"),
3735
- key: import_zod9.z.string().optional().describe("User-defined unique identifier"),
3736
- supplyChannel: import_zod9.z.object({
3737
- id: import_zod9.z.string().optional(),
3738
- key: import_zod9.z.string().optional(),
3739
- typeId: import_zod9.z.literal("channel")
4721
+ var createInventoryParameters = import_zod12.z.object({
4722
+ sku: import_zod12.z.string().describe("SKU of the product variant"),
4723
+ quantityOnStock: import_zod12.z.number().int().min(0).describe("Quantity available in stock"),
4724
+ key: import_zod12.z.string().optional().describe("User-defined unique identifier"),
4725
+ supplyChannel: import_zod12.z.object({
4726
+ id: import_zod12.z.string().optional(),
4727
+ key: import_zod12.z.string().optional(),
4728
+ typeId: import_zod12.z.literal("channel")
3740
4729
  }).optional().describe("Supply channel reference"),
3741
- expectedDelivery: import_zod9.z.string().optional().describe("Expected delivery date in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ)"),
3742
- restockableInDays: import_zod9.z.number().int().min(0).optional().describe("Number of days until the item is restockable"),
3743
- custom: import_zod9.z.object({
3744
- type: import_zod9.z.object({
3745
- id: import_zod9.z.string(),
3746
- typeId: import_zod9.z.literal("type")
4730
+ expectedDelivery: import_zod12.z.string().optional().describe("Expected delivery date in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ)"),
4731
+ restockableInDays: import_zod12.z.number().int().min(0).optional().describe("Number of days until the item is restockable"),
4732
+ custom: import_zod12.z.object({
4733
+ type: import_zod12.z.object({
4734
+ id: import_zod12.z.string(),
4735
+ typeId: import_zod12.z.literal("type")
3747
4736
  }).optional(),
3748
- fields: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.any()).optional()
4737
+ fields: import_zod12.z.record(import_zod12.z.string(), import_zod12.z.any()).optional()
3749
4738
  }).optional().describe("Custom fields")
3750
4739
  });
3751
- var updateInventoryParameters = import_zod9.z.object({
3752
- id: import_zod9.z.string().optional().describe("The ID of the inventory entry to update"),
3753
- key: import_zod9.z.string().optional().describe("The key of the inventory entry to update"),
3754
- version: import_zod9.z.number().int().describe("The current version of the inventory entry"),
3755
- actions: import_zod9.z.array(import_zod9.z.object({
3756
- action: import_zod9.z.string().describe("The name of the update action")
3757
- }).and(import_zod9.z.record(import_zod9.z.string(), import_zod9.z.unknown()))).describe("Update actions")
4740
+ var updateInventoryParameters = import_zod12.z.object({
4741
+ id: import_zod12.z.string().optional().describe("The ID of the inventory entry to update"),
4742
+ key: import_zod12.z.string().optional().describe("The key of the inventory entry to update"),
4743
+ version: import_zod12.z.number().int().describe("The current version of the inventory entry"),
4744
+ actions: import_zod12.z.array(import_zod12.z.object({
4745
+ action: import_zod12.z.string().describe("The name of the update action")
4746
+ }).and(import_zod12.z.record(import_zod12.z.string(), import_zod12.z.unknown()))).describe("Update actions")
3758
4747
  });
3759
- var deleteInventoryParameters = import_zod9.z.object({
3760
- id: import_zod9.z.string().optional().describe("Inventory Entry ID"),
3761
- key: import_zod9.z.string().optional().describe("Inventory Entry key"),
3762
- version: import_zod9.z.number().int().describe("Current version")
4748
+ var deleteInventoryParameters = import_zod12.z.object({
4749
+ id: import_zod12.z.string().optional().describe("Inventory Entry ID"),
4750
+ key: import_zod12.z.string().optional().describe("Inventory Entry key"),
4751
+ version: import_zod12.z.number().int().describe("Current version")
3763
4752
  });
3764
4753
  // src/resources/inventory/inventory.prompt.ts
3765
4754
  var readInventoryPrompt = '\nThis tool will fetch an Inventory Entry by ID, key, or SKU from commercetools or query all available inventory entries in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the inventory entry to fetch.\n- key (string, optional): The key of the inventory entry to fetch.\n- sku (string, optional): The SKU of the product variant to fetch inventory for.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["sku = \\"SKU-123\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["quantityOnStock desc", "createdAt asc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Example: ["supplyChannel"]\n';
@@ -4139,18 +5128,18 @@ function deleteInventory(context, apiClientFactory) {
4139
5128
  })();
4140
5129
  }
4141
5130
  // src/resources/messages/messages.schema.ts
4142
- var import_zod10 = require("zod");
4143
- var readMessagesParameters = import_zod10.z.object({
4144
- id: import_zod10.z.string().optional(),
4145
- where: import_zod10.z.array(import_zod10.z.string()).optional(),
4146
- sort: import_zod10.z.array(import_zod10.z.string()).optional(),
4147
- limit: import_zod10.z.number().int().min(1).max(500).optional(),
4148
- offset: import_zod10.z.number().int().optional(),
4149
- expand: import_zod10.z.array(import_zod10.z.string()).optional()
5131
+ var import_zod13 = require("zod");
5132
+ var readMessagesParameters = import_zod13.z.object({
5133
+ id: import_zod13.z.string().optional(),
5134
+ where: import_zod13.z.array(import_zod13.z.string()).optional(),
5135
+ sort: import_zod13.z.array(import_zod13.z.string()).optional(),
5136
+ limit: import_zod13.z.number().int().min(1).max(500).optional(),
5137
+ offset: import_zod13.z.number().int().optional(),
5138
+ expand: import_zod13.z.array(import_zod13.z.string()).optional()
4150
5139
  });
4151
- var createMessagesParameters = import_zod10.z.object({});
4152
- var updateMessagesParameters = import_zod10.z.object({});
4153
- var deleteMessagesParameters = import_zod10.z.object({});
5140
+ var createMessagesParameters = import_zod13.z.object({});
5141
+ var updateMessagesParameters = import_zod13.z.object({});
5142
+ var deleteMessagesParameters = import_zod13.z.object({});
4154
5143
  // src/resources/messages/messages.prompt.ts
4155
5144
  var readMessagesPrompt = "\nRead Messages (change or event messages) generated by commercetools.\n\nOptional arguments:\n- id (string): fetch a single Message by ID\n- where (array[string]): query predicates\n- sort (array[string])\n- limit (int)\n- offset (int)\n- expand (array[string])\n\nNotes:\n- Messages are produced by the platform; they cannot be created/updated/deleted via the HTTP API.\n";
4156
5145
  var createMessagesPrompt = "\nMessages are generated by commercetools and cannot be created via API.\n";
@@ -4358,40 +5347,40 @@ function deleteMessages(_context, apiClientFactory) {
4358
5347
  })();
4359
5348
  }
4360
5349
  // src/resources/product-discounts/product-discounts.schema.ts
4361
- var import_zod11 = require("zod");
4362
- var readProductDiscountsParameters = import_zod11.z.object({
4363
- id: import_zod11.z.string().optional().describe("Product Discount ID"),
4364
- key: import_zod11.z.string().optional().describe("Product Discount key"),
4365
- where: import_zod11.z.array(import_zod11.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"summer-sale\\""]'),
4366
- sort: import_zod11.z.array(import_zod11.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
4367
- limit: import_zod11.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
4368
- offset: import_zod11.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
4369
- expand: import_zod11.z.array(import_zod11.z.string()).optional().describe("Fields to expand. Example: []")
5350
+ var import_zod14 = require("zod");
5351
+ var readProductDiscountsParameters = import_zod14.z.object({
5352
+ id: import_zod14.z.string().optional().describe("Product Discount ID"),
5353
+ key: import_zod14.z.string().optional().describe("Product Discount key"),
5354
+ where: import_zod14.z.array(import_zod14.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"summer-sale\\""]'),
5355
+ sort: import_zod14.z.array(import_zod14.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
5356
+ limit: import_zod14.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
5357
+ offset: import_zod14.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
5358
+ expand: import_zod14.z.array(import_zod14.z.string()).optional().describe("Fields to expand. Example: []")
4370
5359
  });
4371
- var createProductDiscountsParameters = import_zod11.z.object({
4372
- key: import_zod11.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the product discount"),
4373
- name: import_zod11.z.record(import_zod11.z.string()).describe("Product Discount name (localized string)"),
4374
- description: import_zod11.z.record(import_zod11.z.string()).optional().describe("Product Discount description (localized string)"),
4375
- value: import_zod11.z.any().describe("Value of the product discount"),
4376
- predicate: import_zod11.z.string().describe("Valid ProductDiscount predicate"),
4377
- sortOrder: import_zod11.z.string().describe("String value used to order ProductDiscounts"),
4378
- isActive: import_zod11.z.boolean().optional().describe("Whether the product discount is active (defaults to true)"),
4379
- validFrom: import_zod11.z.string().optional().describe("Date/time when the discount becomes valid (ISO 8601 format)"),
4380
- validUntil: import_zod11.z.string().optional().describe("Date/time when the discount expires (ISO 8601 format)"),
4381
- references: import_zod11.z.array(import_zod11.z.any()).optional().describe("References to other resources")
5360
+ var createProductDiscountsParameters = import_zod14.z.object({
5361
+ key: import_zod14.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the product discount"),
5362
+ name: import_zod14.z.record(import_zod14.z.string()).describe("Product Discount name (localized string)"),
5363
+ description: import_zod14.z.record(import_zod14.z.string()).optional().describe("Product Discount description (localized string)"),
5364
+ value: import_zod14.z.any().describe("Value of the product discount"),
5365
+ predicate: import_zod14.z.string().describe("Valid ProductDiscount predicate"),
5366
+ sortOrder: import_zod14.z.string().describe("String value used to order ProductDiscounts"),
5367
+ isActive: import_zod14.z.boolean().optional().describe("Whether the product discount is active (defaults to true)"),
5368
+ validFrom: import_zod14.z.string().optional().describe("Date/time when the discount becomes valid (ISO 8601 format)"),
5369
+ validUntil: import_zod14.z.string().optional().describe("Date/time when the discount expires (ISO 8601 format)"),
5370
+ references: import_zod14.z.array(import_zod14.z.any()).optional().describe("References to other resources")
4382
5371
  });
4383
- var updateProductDiscountsParameters = import_zod11.z.object({
4384
- id: import_zod11.z.string().optional().describe("The ID of the product discount to update"),
4385
- key: import_zod11.z.string().optional().describe("The key of the product discount to update"),
4386
- version: import_zod11.z.number().int().describe("The current version of the product discount"),
4387
- actions: import_zod11.z.array(import_zod11.z.object({
4388
- action: import_zod11.z.string().describe("The name of the update action to perform")
4389
- }).and(import_zod11.z.record(import_zod11.z.string(), import_zod11.z.any()).optional()).describe('Array of update actions to perform on the product discount. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
5372
+ var updateProductDiscountsParameters = import_zod14.z.object({
5373
+ id: import_zod14.z.string().optional().describe("The ID of the product discount to update"),
5374
+ key: import_zod14.z.string().optional().describe("The key of the product discount to update"),
5375
+ version: import_zod14.z.number().int().describe("The current version of the product discount"),
5376
+ actions: import_zod14.z.array(import_zod14.z.object({
5377
+ action: import_zod14.z.string().describe("The name of the update action to perform")
5378
+ }).and(import_zod14.z.record(import_zod14.z.string(), import_zod14.z.any()).optional()).describe('Array of update actions to perform on the product discount. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
4390
5379
  });
4391
- var deleteProductDiscountsParameters = import_zod11.z.object({
4392
- id: import_zod11.z.string().optional().describe("Product Discount ID"),
4393
- key: import_zod11.z.string().optional().describe("Product Discount key"),
4394
- version: import_zod11.z.number().int().describe("Current version (for optimistic locking)")
5380
+ var deleteProductDiscountsParameters = import_zod14.z.object({
5381
+ id: import_zod14.z.string().optional().describe("Product Discount ID"),
5382
+ key: import_zod14.z.string().optional().describe("Product Discount key"),
5383
+ version: import_zod14.z.number().int().describe("Current version (for optimistic locking)")
4395
5384
  });
4396
5385
  // src/resources/product-discounts/product-discounts.prompt.ts
4397
5386
  var readProductDiscountsPrompt = '\nThis tool will fetch a Product Discount by ID or key (if provided) from commercetools or query all available product discounts in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the product discount to fetch.\n- key (string, optional): The key of the product discount to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["key = \\"summer-sale\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["key asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand.\n';
@@ -4740,20 +5729,20 @@ function deleteProductDiscounts(context, apiClientFactory) {
4740
5729
  })();
4741
5730
  }
4742
5731
  // src/resources/product-projections/product-projections.schema.ts
4743
- var import_zod12 = require("zod");
4744
- var readProductProjectionsParameters = import_zod12.z.object({
4745
- id: import_zod12.z.string().optional(),
4746
- key: import_zod12.z.string().optional(),
4747
- where: import_zod12.z.array(import_zod12.z.string()).optional(),
4748
- sort: import_zod12.z.array(import_zod12.z.string()).optional(),
4749
- limit: import_zod12.z.number().int().min(1).max(500).optional(),
4750
- offset: import_zod12.z.number().int().optional(),
4751
- expand: import_zod12.z.array(import_zod12.z.string()).optional(),
4752
- fuzzy: import_zod12.z.boolean().optional()
5732
+ var import_zod15 = require("zod");
5733
+ var readProductProjectionsParameters = import_zod15.z.object({
5734
+ id: import_zod15.z.string().optional(),
5735
+ key: import_zod15.z.string().optional(),
5736
+ where: import_zod15.z.array(import_zod15.z.string()).optional(),
5737
+ sort: import_zod15.z.array(import_zod15.z.string()).optional(),
5738
+ limit: import_zod15.z.number().int().min(1).max(500).optional(),
5739
+ offset: import_zod15.z.number().int().optional(),
5740
+ expand: import_zod15.z.array(import_zod15.z.string()).optional(),
5741
+ fuzzy: import_zod15.z.boolean().optional()
4753
5742
  });
4754
- var createProductProjectionsParameters = import_zod12.z.object({});
4755
- var updateProductProjectionsParameters = import_zod12.z.object({});
4756
- var deleteProductProjectionsParameters = import_zod12.z.object({});
5743
+ var createProductProjectionsParameters = import_zod15.z.object({});
5744
+ var updateProductProjectionsParameters = import_zod15.z.object({});
5745
+ var deleteProductProjectionsParameters = import_zod15.z.object({});
4757
5746
  // src/resources/product-projections/product-projections.prompt.ts
4758
5747
  var readProductProjectionsPrompt = '\nThis tool reads Product Projections (published product data / search results) from commercetools.\n\nUsage patterns:\n- Read a single product projection by `id` or `key`.\n- Search product projections using search parameters (full-text, filters), or perform a paged query.\n\nIt accepts these optional arguments:\n- id (string, optional): Fetch a single Product Projection by its ID.\n- key (string, optional): Fetch a single Product Projection by its key.\n- text (string, optional): Full-text search query (search across searchable attributes).\n- fuzzy (boolean, optional): If true, allow fuzzy matching for text searches.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["categories(id=\\"123\\")", "masterVariant(sku=\\"SKU-1\\")"]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["name.en asc", "createdAt desc"]\n- limit (integer, optional): Number of results to return (1-500). Default depends on API.\n- offset (integer, optional): Number of items to skip before collecting results.\n- expand (array of strings, optional): Fields to expand (e.g., ["categories", "masterVariant"]).\n\nNotes:\n- If `id` or `key` is provided the tool will return a single Product Projection object.\n- If no identifier is provided the tool will perform a search/query and return a paged search response.\n';
4759
5748
  var createProductProjectionsPrompt = "\nProduct Projections are read-only representations derived from Products; creating a Product Projection directly is not supported.\n\nIf you need to create product data, use the Product creation APIs (products.create) which will result in product projections becoming available once published.\n";
@@ -4970,26 +5959,26 @@ function deleteProductProjections(_context, apiClientFactory) {
4970
5959
  })();
4971
5960
  }
4972
5961
  // src/resources/product-search/product-search.schema.ts
4973
- var import_zod13 = require("zod");
4974
- var readProductSearchParameters = import_zod13.z.object({
4975
- query: import_zod13.z.string().optional().describe("Search query in the search query language"),
4976
- filter: import_zod13.z.array(import_zod13.z.string()).optional().describe("Filter expressions"),
4977
- facet: import_zod13.z.array(import_zod13.z.string()).optional().describe("Facet expressions"),
4978
- sort: import_zod13.z.array(import_zod13.z.string()).optional().describe("Sort criteria for the results"),
4979
- limit: import_zod13.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
4980
- offset: import_zod13.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
4981
- markMatchingVariants: import_zod13.z.boolean().optional().describe("Whether to mark matching variants"),
4982
- priceCurrency: import_zod13.z.string().optional().describe("Currency code for price selection"),
4983
- priceCountry: import_zod13.z.string().optional().describe("Country code for price selection"),
4984
- priceCustomerGroup: import_zod13.z.string().optional().describe("Customer group ID for price selection"),
4985
- priceChannel: import_zod13.z.string().optional().describe("Channel ID for price selection"),
4986
- localeProjection: import_zod13.z.string().optional().describe("Locale for projection"),
4987
- storeProjection: import_zod13.z.string().optional().describe("Store key for projection"),
4988
- expand: import_zod13.z.array(import_zod13.z.string()).optional().describe("Fields to expand")
5962
+ var import_zod16 = require("zod");
5963
+ var readProductSearchParameters = import_zod16.z.object({
5964
+ query: import_zod16.z.string().optional().describe("Search query in the search query language"),
5965
+ filter: import_zod16.z.array(import_zod16.z.string()).optional().describe("Filter expressions"),
5966
+ facet: import_zod16.z.array(import_zod16.z.string()).optional().describe("Facet expressions"),
5967
+ sort: import_zod16.z.array(import_zod16.z.string()).optional().describe("Sort criteria for the results"),
5968
+ limit: import_zod16.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
5969
+ offset: import_zod16.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
5970
+ markMatchingVariants: import_zod16.z.boolean().optional().describe("Whether to mark matching variants"),
5971
+ priceCurrency: import_zod16.z.string().optional().describe("Currency code for price selection"),
5972
+ priceCountry: import_zod16.z.string().optional().describe("Country code for price selection"),
5973
+ priceCustomerGroup: import_zod16.z.string().optional().describe("Customer group ID for price selection"),
5974
+ priceChannel: import_zod16.z.string().optional().describe("Channel ID for price selection"),
5975
+ localeProjection: import_zod16.z.string().optional().describe("Locale for projection"),
5976
+ storeProjection: import_zod16.z.string().optional().describe("Store key for projection"),
5977
+ expand: import_zod16.z.array(import_zod16.z.string()).optional().describe("Fields to expand")
4989
5978
  });
4990
- var createProductSearchParameters = import_zod13.z.object({}).describe("Product Search does not support create operations");
4991
- var updateProductSearchParameters = import_zod13.z.object({}).describe("Product Search does not support update operations");
4992
- var deleteProductSearchParameters = import_zod13.z.object({}).describe("Product Search does not support delete operations");
5979
+ var createProductSearchParameters = import_zod16.z.object({}).describe("Product Search does not support create operations");
5980
+ var updateProductSearchParameters = import_zod16.z.object({}).describe("Product Search does not support update operations");
5981
+ var deleteProductSearchParameters = import_zod16.z.object({}).describe("Product Search does not support delete operations");
4993
5982
  // src/resources/product-search/product-search.prompt.ts
4994
5983
  var readProductSearchPrompt = '\nThis tool will search for products in commercetools using the Product Search API.\n\nIt takes these optional arguments:\n- query (string, optional): Search query in the search query language. Example: "red shoes" or "name.en:shoes AND variants.attributes.color:red"\n- filter (array of strings, optional): Filter expressions. Example: ["variants.price.centAmount:range(1000 to 5000)"]\n- facet (array of strings, optional): Facet expressions for faceted search.\n- sort (array of strings, optional): Sort criteria for the results. Example: ["name.en asc", "variants.price.centAmount desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- markMatchingVariants (boolean, optional): Whether to mark matching variants in the response.\n- priceCurrency (string, optional): Currency code for price selection.\n- priceCountry (string, optional): Country code for price selection.\n- priceCustomerGroup (string, optional): Customer group ID for price selection.\n- priceChannel (string, optional): Channel ID for price selection.\n- localeProjection (string, optional): Locale for projection.\n- storeProjection (string, optional): Store key for projection.\n- expand (array of strings, optional): Fields to expand.\n';
4995
5984
  var createProductSearchPrompt = "\nProduct Search does not support create operations. This is a read-only search API.\n";
@@ -5167,43 +6156,43 @@ function deleteProductSearch(context, apiClientFactory) {
5167
6156
  })();
5168
6157
  }
5169
6158
  // src/resources/product-selections/product-selections.schema.ts
5170
- var import_zod14 = require("zod");
5171
- var readProductSelectionsParameters = import_zod14.z.object({
5172
- id: import_zod14.z.string().optional().describe("Product Selection ID"),
5173
- key: import_zod14.z.string().optional().describe("Product Selection key"),
5174
- where: import_zod14.z.array(import_zod14.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-selection\\""]'),
5175
- sort: import_zod14.z.array(import_zod14.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
5176
- limit: import_zod14.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
5177
- offset: import_zod14.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
5178
- expand: import_zod14.z.array(import_zod14.z.string()).optional().describe("Fields to expand. Example: []")
6159
+ var import_zod17 = require("zod");
6160
+ var readProductSelectionsParameters = import_zod17.z.object({
6161
+ id: import_zod17.z.string().optional().describe("Product Selection ID"),
6162
+ key: import_zod17.z.string().optional().describe("Product Selection key"),
6163
+ where: import_zod17.z.array(import_zod17.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-selection\\""]'),
6164
+ sort: import_zod17.z.array(import_zod17.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
6165
+ limit: import_zod17.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
6166
+ offset: import_zod17.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
6167
+ expand: import_zod17.z.array(import_zod17.z.string()).optional().describe("Fields to expand. Example: []")
5179
6168
  });
5180
- var createProductSelectionsParameters = import_zod14.z.object({
5181
- key: import_zod14.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the product selection"),
5182
- name: import_zod14.z.record(import_zod14.z.string()).describe("Product Selection name (localized string)"),
5183
- mode: import_zod14.z.enum([
6169
+ var createProductSelectionsParameters = import_zod17.z.object({
6170
+ key: import_zod17.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the product selection"),
6171
+ name: import_zod17.z.record(import_zod17.z.string()).describe("Product Selection name (localized string)"),
6172
+ mode: import_zod17.z.enum([
5184
6173
  "Individual",
5185
6174
  "IndividualExclusion"
5186
6175
  ]).optional().describe("Selection mode: Individual (explicitly includes) or IndividualExclusion (explicitly excludes)"),
5187
- custom: import_zod14.z.object({
5188
- type: import_zod14.z.object({
5189
- id: import_zod14.z.string(),
5190
- typeId: import_zod14.z.literal("type")
6176
+ custom: import_zod17.z.object({
6177
+ type: import_zod17.z.object({
6178
+ id: import_zod17.z.string(),
6179
+ typeId: import_zod17.z.literal("type")
5191
6180
  }).optional(),
5192
- fields: import_zod14.z.record(import_zod14.z.string(), import_zod14.z.any()).optional()
6181
+ fields: import_zod17.z.record(import_zod17.z.string(), import_zod17.z.any()).optional()
5193
6182
  }).optional().describe("Custom fields for the product selection")
5194
6183
  });
5195
- var updateProductSelectionsParameters = import_zod14.z.object({
5196
- id: import_zod14.z.string().optional().describe("The ID of the product selection to update"),
5197
- key: import_zod14.z.string().optional().describe("The key of the product selection to update"),
5198
- version: import_zod14.z.number().int().describe("The current version of the product selection"),
5199
- actions: import_zod14.z.array(import_zod14.z.object({
5200
- action: import_zod14.z.string().describe("The name of the update action to perform")
5201
- }).and(import_zod14.z.record(import_zod14.z.string(), import_zod14.z.any()).optional()).describe('Array of update actions to perform on the product selection. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
6184
+ var updateProductSelectionsParameters = import_zod17.z.object({
6185
+ id: import_zod17.z.string().optional().describe("The ID of the product selection to update"),
6186
+ key: import_zod17.z.string().optional().describe("The key of the product selection to update"),
6187
+ version: import_zod17.z.number().int().describe("The current version of the product selection"),
6188
+ actions: import_zod17.z.array(import_zod17.z.object({
6189
+ action: import_zod17.z.string().describe("The name of the update action to perform")
6190
+ }).and(import_zod17.z.record(import_zod17.z.string(), import_zod17.z.any()).optional()).describe('Array of update actions to perform on the product selection. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
5202
6191
  });
5203
- var deleteProductSelectionsParameters = import_zod14.z.object({
5204
- id: import_zod14.z.string().optional().describe("Product Selection ID"),
5205
- key: import_zod14.z.string().optional().describe("Product Selection key"),
5206
- version: import_zod14.z.number().int().describe("Current version (for optimistic locking)")
6192
+ var deleteProductSelectionsParameters = import_zod17.z.object({
6193
+ id: import_zod17.z.string().optional().describe("Product Selection ID"),
6194
+ key: import_zod17.z.string().optional().describe("Product Selection key"),
6195
+ version: import_zod17.z.number().int().describe("Current version (for optimistic locking)")
5207
6196
  });
5208
6197
  // src/resources/product-selections/product-selections.prompt.ts
5209
6198
  var readProductSelectionsPrompt = '\nThis tool will fetch a Product Selection by ID or key (if provided) from commercetools or query all available product selections in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the product selection to fetch.\n- key (string, optional): The key of the product selection to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["key = \\"my-selection\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["key asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand.\n';
@@ -5552,53 +6541,53 @@ function deleteProductSelections(context, apiClientFactory) {
5552
6541
  })();
5553
6542
  }
5554
6543
  // src/resources/product-tailoring/product-tailoring.schema.ts
5555
- var import_zod15 = require("zod");
5556
- var readProductTailoringParameters = import_zod15.z.object({
5557
- id: import_zod15.z.string().optional().describe("Product Tailoring ID"),
5558
- key: import_zod15.z.string().optional().describe("Product Tailoring key"),
5559
- productId: import_zod15.z.string().optional().describe("Product ID"),
5560
- productKey: import_zod15.z.string().optional().describe("Product key"),
5561
- storeKey: import_zod15.z.string().optional().describe("Store key"),
5562
- where: import_zod15.z.array(import_zod15.z.string()).optional().describe('Query predicates specified as strings. Example: ["productKey = \\"product-123\\""]'),
5563
- sort: import_zod15.z.array(import_zod15.z.string()).optional().describe('Sort criteria for the results. Example: ["productKey asc", "createdAt desc"]'),
5564
- limit: import_zod15.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
5565
- offset: import_zod15.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
5566
- expand: import_zod15.z.array(import_zod15.z.string()).optional().describe("Fields to expand. Example: []")
6544
+ var import_zod18 = require("zod");
6545
+ var readProductTailoringParameters = import_zod18.z.object({
6546
+ id: import_zod18.z.string().optional().describe("Product Tailoring ID"),
6547
+ key: import_zod18.z.string().optional().describe("Product Tailoring key"),
6548
+ productId: import_zod18.z.string().optional().describe("Product ID"),
6549
+ productKey: import_zod18.z.string().optional().describe("Product key"),
6550
+ storeKey: import_zod18.z.string().optional().describe("Store key"),
6551
+ where: import_zod18.z.array(import_zod18.z.string()).optional().describe('Query predicates specified as strings. Example: ["productKey = \\"product-123\\""]'),
6552
+ sort: import_zod18.z.array(import_zod18.z.string()).optional().describe('Sort criteria for the results. Example: ["productKey asc", "createdAt desc"]'),
6553
+ limit: import_zod18.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
6554
+ offset: import_zod18.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
6555
+ expand: import_zod18.z.array(import_zod18.z.string()).optional().describe("Fields to expand. Example: []")
5567
6556
  });
5568
- var createProductTailoringParameters = import_zod15.z.object({
5569
- productKey: import_zod15.z.string().describe("Product key"),
5570
- storeKey: import_zod15.z.string().describe("Store key"),
5571
- name: import_zod15.z.record(import_zod15.z.string()).optional().describe("Tailored product name (localized string)"),
5572
- description: import_zod15.z.record(import_zod15.z.string()).optional().describe("Tailored product description (localized string)"),
5573
- slug: import_zod15.z.record(import_zod15.z.string()).optional().describe("Tailored product slug (localized string)"),
5574
- metaTitle: import_zod15.z.record(import_zod15.z.string()).optional().describe("Tailored meta title (localized string)"),
5575
- metaDescription: import_zod15.z.record(import_zod15.z.string()).optional().describe("Tailored meta description (localized string)"),
5576
- metaKeywords: import_zod15.z.record(import_zod15.z.string()).optional().describe("Tailored meta keywords (localized string)"),
5577
- variantTailoring: import_zod15.z.array(import_zod15.z.object({
5578
- id: import_zod15.z.number().int().describe("Variant ID"),
5579
- images: import_zod15.z.array(import_zod15.z.any()).optional().describe("Tailored images for the variant"),
5580
- assets: import_zod15.z.array(import_zod15.z.any()).optional().describe("Tailored assets for the variant"),
5581
- attributes: import_zod15.z.record(import_zod15.z.any()).optional().describe("Tailored attributes for the variant")
6557
+ var createProductTailoringParameters = import_zod18.z.object({
6558
+ productKey: import_zod18.z.string().describe("Product key"),
6559
+ storeKey: import_zod18.z.string().describe("Store key"),
6560
+ name: import_zod18.z.record(import_zod18.z.string()).optional().describe("Tailored product name (localized string)"),
6561
+ description: import_zod18.z.record(import_zod18.z.string()).optional().describe("Tailored product description (localized string)"),
6562
+ slug: import_zod18.z.record(import_zod18.z.string()).optional().describe("Tailored product slug (localized string)"),
6563
+ metaTitle: import_zod18.z.record(import_zod18.z.string()).optional().describe("Tailored meta title (localized string)"),
6564
+ metaDescription: import_zod18.z.record(import_zod18.z.string()).optional().describe("Tailored meta description (localized string)"),
6565
+ metaKeywords: import_zod18.z.record(import_zod18.z.string()).optional().describe("Tailored meta keywords (localized string)"),
6566
+ variantTailoring: import_zod18.z.array(import_zod18.z.object({
6567
+ id: import_zod18.z.number().int().describe("Variant ID"),
6568
+ images: import_zod18.z.array(import_zod18.z.any()).optional().describe("Tailored images for the variant"),
6569
+ assets: import_zod18.z.array(import_zod18.z.any()).optional().describe("Tailored assets for the variant"),
6570
+ attributes: import_zod18.z.record(import_zod18.z.any()).optional().describe("Tailored attributes for the variant")
5582
6571
  })).optional().describe("Variant tailoring data")
5583
6572
  });
5584
- var updateProductTailoringParameters = import_zod15.z.object({
5585
- id: import_zod15.z.string().optional().describe("Product Tailoring ID"),
5586
- key: import_zod15.z.string().optional().describe("Product Tailoring key"),
5587
- productId: import_zod15.z.string().optional().describe("Product ID"),
5588
- productKey: import_zod15.z.string().optional().describe("Product key"),
5589
- storeKey: import_zod15.z.string().optional().describe("Store key"),
5590
- version: import_zod15.z.number().int().describe("The current version of the product tailoring"),
5591
- actions: import_zod15.z.array(import_zod15.z.object({
5592
- action: import_zod15.z.string().describe("The name of the update action to perform")
5593
- }).and(import_zod15.z.record(import_zod15.z.string(), import_zod15.z.any()).optional()).describe('Array of update actions to perform on the product tailoring. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
6573
+ var updateProductTailoringParameters = import_zod18.z.object({
6574
+ id: import_zod18.z.string().optional().describe("Product Tailoring ID"),
6575
+ key: import_zod18.z.string().optional().describe("Product Tailoring key"),
6576
+ productId: import_zod18.z.string().optional().describe("Product ID"),
6577
+ productKey: import_zod18.z.string().optional().describe("Product key"),
6578
+ storeKey: import_zod18.z.string().optional().describe("Store key"),
6579
+ version: import_zod18.z.number().int().describe("The current version of the product tailoring"),
6580
+ actions: import_zod18.z.array(import_zod18.z.object({
6581
+ action: import_zod18.z.string().describe("The name of the update action to perform")
6582
+ }).and(import_zod18.z.record(import_zod18.z.string(), import_zod18.z.any()).optional()).describe('Array of update actions to perform on the product tailoring. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
5594
6583
  });
5595
- var deleteProductTailoringParameters = import_zod15.z.object({
5596
- id: import_zod15.z.string().optional().describe("Product Tailoring ID"),
5597
- key: import_zod15.z.string().optional().describe("Product Tailoring key"),
5598
- productId: import_zod15.z.string().optional().describe("Product ID"),
5599
- productKey: import_zod15.z.string().optional().describe("Product key"),
5600
- storeKey: import_zod15.z.string().optional().describe("Store key"),
5601
- version: import_zod15.z.number().int().describe("Current version (for optimistic locking)")
6584
+ var deleteProductTailoringParameters = import_zod18.z.object({
6585
+ id: import_zod18.z.string().optional().describe("Product Tailoring ID"),
6586
+ key: import_zod18.z.string().optional().describe("Product Tailoring key"),
6587
+ productId: import_zod18.z.string().optional().describe("Product ID"),
6588
+ productKey: import_zod18.z.string().optional().describe("Product key"),
6589
+ storeKey: import_zod18.z.string().optional().describe("Store key"),
6590
+ version: import_zod18.z.number().int().describe("Current version (for optimistic locking)")
5602
6591
  });
5603
6592
  // src/resources/product-tailoring/product-tailoring.prompt.ts
5604
6593
  var readProductTailoringPrompt = '\nThis tool will fetch Product Tailoring from commercetools. You can fetch by ID, key, product ID with store key, or product key with store key. If no specific identifier is provided, it will query all available product tailoring records.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the product tailoring to fetch.\n- key (string, optional): The key of the product tailoring to fetch.\n- productId (string, optional): The product ID to fetch tailoring for (requires storeKey).\n- productKey (string, optional): The product key to fetch tailoring for (requires storeKey).\n- storeKey (string, optional): The store key (required when using productId or productKey).\n- where (array of strings, optional): Query predicates specified as strings. Example: ["productKey = \\"product-123\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["productKey asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand.\n';
@@ -6070,51 +7059,51 @@ function deleteProductTailoring(context, apiClientFactory) {
6070
7059
  })();
6071
7060
  }
6072
7061
  // src/resources/product-types/product-types.schema.ts
6073
- var import_zod16 = require("zod");
6074
- var readProductTypesParameters = import_zod16.z.object({
6075
- id: import_zod16.z.string().optional().describe("Product Type ID"),
6076
- key: import_zod16.z.string().optional().describe("Product Type key"),
6077
- where: import_zod16.z.array(import_zod16.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-product-type\\""]'),
6078
- sort: import_zod16.z.array(import_zod16.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
6079
- limit: import_zod16.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
6080
- offset: import_zod16.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
6081
- expand: import_zod16.z.array(import_zod16.z.string()).optional().describe("Fields to expand. Example: []")
7062
+ var import_zod19 = require("zod");
7063
+ var readProductTypesParameters = import_zod19.z.object({
7064
+ id: import_zod19.z.string().optional().describe("Product Type ID"),
7065
+ key: import_zod19.z.string().optional().describe("Product Type key"),
7066
+ where: import_zod19.z.array(import_zod19.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-product-type\\""]'),
7067
+ sort: import_zod19.z.array(import_zod19.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
7068
+ limit: import_zod19.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
7069
+ offset: import_zod19.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
7070
+ expand: import_zod19.z.array(import_zod19.z.string()).optional().describe("Fields to expand. Example: []")
6082
7071
  });
6083
- var createProductTypesParameters = import_zod16.z.object({
6084
- key: import_zod16.z.string().min(2).max(256).describe("User-defined unique identifier for the product type"),
6085
- name: import_zod16.z.string().describe("Product Type name"),
6086
- description: import_zod16.z.string().optional().describe("Product Type description"),
6087
- attributes: import_zod16.z.array(import_zod16.z.object({
6088
- name: import_zod16.z.string().describe("Attribute name"),
6089
- label: import_zod16.z.record(import_zod16.z.string()).optional().describe("Localized label for the attribute"),
6090
- isRequired: import_zod16.z.boolean().optional().describe("Whether the attribute is required"),
6091
- isSearchable: import_zod16.z.boolean().optional().describe("Whether the attribute is searchable"),
6092
- type: import_zod16.z.any().describe("Attribute type definition"),
6093
- attributeConstraint: import_zod16.z.enum([
7072
+ var createProductTypesParameters = import_zod19.z.object({
7073
+ key: import_zod19.z.string().min(2).max(256).describe("User-defined unique identifier for the product type"),
7074
+ name: import_zod19.z.string().describe("Product Type name"),
7075
+ description: import_zod19.z.string().optional().describe("Product Type description"),
7076
+ attributes: import_zod19.z.array(import_zod19.z.object({
7077
+ name: import_zod19.z.string().describe("Attribute name"),
7078
+ label: import_zod19.z.record(import_zod19.z.string()).optional().describe("Localized label for the attribute"),
7079
+ isRequired: import_zod19.z.boolean().optional().describe("Whether the attribute is required"),
7080
+ isSearchable: import_zod19.z.boolean().optional().describe("Whether the attribute is searchable"),
7081
+ type: import_zod19.z.any().describe("Attribute type definition"),
7082
+ attributeConstraint: import_zod19.z.enum([
6094
7083
  "None",
6095
7084
  "Unique",
6096
7085
  "CombinationUnique",
6097
7086
  "SameForAll"
6098
7087
  ]).optional().describe("Attribute constraint"),
6099
- inputHint: import_zod16.z.enum([
7088
+ inputHint: import_zod19.z.enum([
6100
7089
  "SingleLine",
6101
7090
  "MultiLine"
6102
7091
  ]).optional().describe("Input hint for String attributes"),
6103
- inputTip: import_zod16.z.record(import_zod16.z.string()).optional().describe("Input tip for the attribute (localized)")
7092
+ inputTip: import_zod19.z.record(import_zod19.z.string()).optional().describe("Input tip for the attribute (localized)")
6104
7093
  })).optional().describe("Array of attribute definitions")
6105
7094
  });
6106
- var updateProductTypesParameters = import_zod16.z.object({
6107
- id: import_zod16.z.string().optional().describe("The ID of the product type to update"),
6108
- key: import_zod16.z.string().optional().describe("The key of the product type to update"),
6109
- version: import_zod16.z.number().int().describe("The current version of the product type"),
6110
- actions: import_zod16.z.array(import_zod16.z.object({
6111
- action: import_zod16.z.string().describe("The name of the update action to perform")
6112
- }).and(import_zod16.z.record(import_zod16.z.string(), import_zod16.z.any()).optional()).describe('Array of update actions to perform on the product type. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
7095
+ var updateProductTypesParameters = import_zod19.z.object({
7096
+ id: import_zod19.z.string().optional().describe("The ID of the product type to update"),
7097
+ key: import_zod19.z.string().optional().describe("The key of the product type to update"),
7098
+ version: import_zod19.z.number().int().describe("The current version of the product type"),
7099
+ actions: import_zod19.z.array(import_zod19.z.object({
7100
+ action: import_zod19.z.string().describe("The name of the update action to perform")
7101
+ }).and(import_zod19.z.record(import_zod19.z.string(), import_zod19.z.any()).optional()).describe('Array of update actions to perform on the product type. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
6113
7102
  });
6114
- var deleteProductTypesParameters = import_zod16.z.object({
6115
- id: import_zod16.z.string().optional().describe("Product Type ID"),
6116
- key: import_zod16.z.string().optional().describe("Product Type key"),
6117
- version: import_zod16.z.number().int().describe("Current version (for optimistic locking)")
7103
+ var deleteProductTypesParameters = import_zod19.z.object({
7104
+ id: import_zod19.z.string().optional().describe("Product Type ID"),
7105
+ key: import_zod19.z.string().optional().describe("Product Type key"),
7106
+ version: import_zod19.z.number().int().describe("Current version (for optimistic locking)")
6118
7107
  });
6119
7108
  // src/resources/product-types/product-types.prompt.ts
6120
7109
  var readProductTypesPrompt = '\nThis tool will fetch a Product Type by ID or key (if provided) from commercetools or query all available product types in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the product type to fetch.\n- key (string, optional): The key of the product type to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["key = \\"my-product-type\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["key asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand.\n';
@@ -6459,73 +7448,73 @@ function deleteProductTypes(context, apiClientFactory) {
6459
7448
  })();
6460
7449
  }
6461
7450
  // src/resources/products/products.schema.ts
6462
- var import_zod17 = require("zod");
6463
- var readProductsParameters = import_zod17.z.object({
6464
- id: import_zod17.z.string().optional().describe("Product ID"),
6465
- key: import_zod17.z.string().optional().describe("Product key"),
6466
- where: import_zod17.z.array(import_zod17.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"product-key\\""]'),
6467
- sort: import_zod17.z.array(import_zod17.z.string()).optional().describe('Sort criteria for the results. Example: ["name asc", "createdAt desc"]'),
6468
- limit: import_zod17.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
6469
- offset: import_zod17.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
6470
- expand: import_zod17.z.array(import_zod17.z.string()).optional().describe('Fields to expand. Example: ["productType", "categories[*]"]'),
6471
- priceCurrency: import_zod17.z.string().optional().describe("Currency code for price selection"),
6472
- priceCountry: import_zod17.z.string().optional().describe("Country code for price selection"),
6473
- priceCustomerGroup: import_zod17.z.string().optional().describe("Customer group ID for price selection"),
6474
- priceChannel: import_zod17.z.string().optional().describe("Channel ID for price selection"),
6475
- localeProjection: import_zod17.z.string().optional().describe("Locale for projection"),
6476
- storeProjection: import_zod17.z.string().optional().describe("Store key for projection")
7451
+ var import_zod20 = require("zod");
7452
+ var readProductsParameters = import_zod20.z.object({
7453
+ id: import_zod20.z.string().optional().describe("Product ID"),
7454
+ key: import_zod20.z.string().optional().describe("Product key"),
7455
+ where: import_zod20.z.array(import_zod20.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"product-key\\""]'),
7456
+ sort: import_zod20.z.array(import_zod20.z.string()).optional().describe('Sort criteria for the results. Example: ["name asc", "createdAt desc"]'),
7457
+ limit: import_zod20.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
7458
+ offset: import_zod20.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
7459
+ expand: import_zod20.z.array(import_zod20.z.string()).optional().describe('Fields to expand. Example: ["productType", "categories[*]"]'),
7460
+ priceCurrency: import_zod20.z.string().optional().describe("Currency code for price selection"),
7461
+ priceCountry: import_zod20.z.string().optional().describe("Country code for price selection"),
7462
+ priceCustomerGroup: import_zod20.z.string().optional().describe("Customer group ID for price selection"),
7463
+ priceChannel: import_zod20.z.string().optional().describe("Channel ID for price selection"),
7464
+ localeProjection: import_zod20.z.string().optional().describe("Locale for projection"),
7465
+ storeProjection: import_zod20.z.string().optional().describe("Store key for projection")
6477
7466
  });
6478
- var createProductsParameters = import_zod17.z.object({
6479
- key: import_zod17.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the product"),
6480
- productType: import_zod17.z.object({
6481
- id: import_zod17.z.string().optional(),
6482
- key: import_zod17.z.string().optional(),
6483
- typeId: import_zod17.z.literal("product-type")
7467
+ var createProductsParameters = import_zod20.z.object({
7468
+ key: import_zod20.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the product"),
7469
+ productType: import_zod20.z.object({
7470
+ id: import_zod20.z.string().optional(),
7471
+ key: import_zod20.z.string().optional(),
7472
+ typeId: import_zod20.z.literal("product-type")
6484
7473
  }).describe("Product Type reference"),
6485
- name: import_zod17.z.record(import_zod17.z.string()).describe("Product name (localized string)"),
6486
- description: import_zod17.z.record(import_zod17.z.string()).optional().describe("Product description (localized string)"),
6487
- slug: import_zod17.z.record(import_zod17.z.string()).describe("Product slug (localized string)"),
6488
- categories: import_zod17.z.array(import_zod17.z.object({
6489
- id: import_zod17.z.string().optional(),
6490
- key: import_zod17.z.string().optional(),
6491
- typeId: import_zod17.z.literal("category")
7474
+ name: import_zod20.z.record(import_zod20.z.string()).describe("Product name (localized string)"),
7475
+ description: import_zod20.z.record(import_zod20.z.string()).optional().describe("Product description (localized string)"),
7476
+ slug: import_zod20.z.record(import_zod20.z.string()).describe("Product slug (localized string)"),
7477
+ categories: import_zod20.z.array(import_zod20.z.object({
7478
+ id: import_zod20.z.string().optional(),
7479
+ key: import_zod20.z.string().optional(),
7480
+ typeId: import_zod20.z.literal("category")
6492
7481
  })).optional().describe("Array of category references"),
6493
- categoryOrderHints: import_zod17.z.record(import_zod17.z.string()).optional().describe("Category order hints"),
6494
- metaTitle: import_zod17.z.record(import_zod17.z.string()).optional().describe("Meta title (localized string)"),
6495
- metaDescription: import_zod17.z.record(import_zod17.z.string()).optional().describe("Meta description (localized string)"),
6496
- metaKeywords: import_zod17.z.record(import_zod17.z.string()).optional().describe("Meta keywords (localized string)"),
6497
- masterVariant: import_zod17.z.any().optional().describe("Master variant"),
6498
- variants: import_zod17.z.array(import_zod17.z.any()).optional().describe("Product variants"),
6499
- taxCategory: import_zod17.z.object({
6500
- id: import_zod17.z.string().optional(),
6501
- key: import_zod17.z.string().optional(),
6502
- typeId: import_zod17.z.literal("tax-category")
7482
+ categoryOrderHints: import_zod20.z.record(import_zod20.z.string()).optional().describe("Category order hints"),
7483
+ metaTitle: import_zod20.z.record(import_zod20.z.string()).optional().describe("Meta title (localized string)"),
7484
+ metaDescription: import_zod20.z.record(import_zod20.z.string()).optional().describe("Meta description (localized string)"),
7485
+ metaKeywords: import_zod20.z.record(import_zod20.z.string()).optional().describe("Meta keywords (localized string)"),
7486
+ masterVariant: import_zod20.z.any().optional().describe("Master variant"),
7487
+ variants: import_zod20.z.array(import_zod20.z.any()).optional().describe("Product variants"),
7488
+ taxCategory: import_zod20.z.object({
7489
+ id: import_zod20.z.string().optional(),
7490
+ key: import_zod20.z.string().optional(),
7491
+ typeId: import_zod20.z.literal("tax-category")
6503
7492
  }).optional().describe("Tax category reference"),
6504
- state: import_zod17.z.object({
6505
- id: import_zod17.z.string().optional(),
6506
- key: import_zod17.z.string().optional(),
6507
- typeId: import_zod17.z.literal("state")
7493
+ state: import_zod20.z.object({
7494
+ id: import_zod20.z.string().optional(),
7495
+ key: import_zod20.z.string().optional(),
7496
+ typeId: import_zod20.z.literal("state")
6508
7497
  }).optional().describe("State reference"),
6509
- reviewRatingStatistics: import_zod17.z.any().optional().describe("Review rating statistics"),
6510
- publish: import_zod17.z.boolean().optional().describe("Whether to publish the product"),
6511
- priceMode: import_zod17.z.enum([
7498
+ reviewRatingStatistics: import_zod20.z.any().optional().describe("Review rating statistics"),
7499
+ publish: import_zod20.z.boolean().optional().describe("Whether to publish the product"),
7500
+ priceMode: import_zod20.z.enum([
6512
7501
  "Embedded",
6513
7502
  "Standalone"
6514
7503
  ]).optional().describe("Price mode")
6515
7504
  });
6516
- var updateProductsParameters = import_zod17.z.object({
6517
- id: import_zod17.z.string().optional().describe("The ID of the product to update"),
6518
- key: import_zod17.z.string().optional().describe("The key of the product to update"),
6519
- version: import_zod17.z.number().int().describe("The current version of the product"),
6520
- actions: import_zod17.z.array(import_zod17.z.object({
6521
- action: import_zod17.z.string().describe("The name of the update action to perform")
6522
- }).and(import_zod17.z.record(import_zod17.z.string(), import_zod17.z.any()).optional()).describe('Array of update actions to perform on the product. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
7505
+ var updateProductsParameters = import_zod20.z.object({
7506
+ id: import_zod20.z.string().optional().describe("The ID of the product to update"),
7507
+ key: import_zod20.z.string().optional().describe("The key of the product to update"),
7508
+ version: import_zod20.z.number().int().describe("The current version of the product"),
7509
+ actions: import_zod20.z.array(import_zod20.z.object({
7510
+ action: import_zod20.z.string().describe("The name of the update action to perform")
7511
+ }).and(import_zod20.z.record(import_zod20.z.string(), import_zod20.z.any()).optional()).describe('Array of update actions to perform on the product. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
6523
7512
  });
6524
- var deleteProductsParameters = import_zod17.z.object({
6525
- id: import_zod17.z.string().optional().describe("Product ID"),
6526
- key: import_zod17.z.string().optional().describe("Product key"),
6527
- version: import_zod17.z.number().int().describe("Current version (for optimistic locking)"),
6528
- priceMode: import_zod17.z.enum([
7513
+ var deleteProductsParameters = import_zod20.z.object({
7514
+ id: import_zod20.z.string().optional().describe("Product ID"),
7515
+ key: import_zod20.z.string().optional().describe("Product key"),
7516
+ version: import_zod20.z.number().int().describe("Current version (for optimistic locking)"),
7517
+ priceMode: import_zod20.z.enum([
6529
7518
  "Embedded",
6530
7519
  "Standalone"
6531
7520
  ]).optional().describe("Price mode")
@@ -6913,136 +7902,136 @@ function deleteProducts(context, apiClientFactory) {
6913
7902
  })();
6914
7903
  }
6915
7904
  // src/resources/project/project.handler.ts
6916
- var import_zod19 = require("zod");
7905
+ var import_zod22 = require("zod");
6917
7906
  // src/resources/project/project.schema.ts
6918
- var import_zod18 = require("zod");
6919
- var readProjectParameters = import_zod18.z.object({
6920
- projectKey: import_zod18.z.string().optional().describe("The key of the project to read. If not provided, the current project will be used.")
7907
+ var import_zod21 = require("zod");
7908
+ var readProjectParameters = import_zod21.z.object({
7909
+ projectKey: import_zod21.z.string().optional().describe("The key of the project to read. If not provided, the current project will be used.")
6921
7910
  });
6922
- var messagesConfigurationDraftSchema = import_zod18.z.object({
6923
- enabled: import_zod18.z.boolean().describe("When true, the Messages Query feature is active."),
6924
- deleteDaysAfterCreation: import_zod18.z.number().min(1).max(90).optional().describe("Specifies the number of days each Message should be available via the Messages Query API.")
7911
+ var messagesConfigurationDraftSchema = import_zod21.z.object({
7912
+ enabled: import_zod21.z.boolean().describe("When true, the Messages Query feature is active."),
7913
+ deleteDaysAfterCreation: import_zod21.z.number().min(1).max(90).optional().describe("Specifies the number of days each Message should be available via the Messages Query API.")
6925
7914
  });
6926
- var cartsConfigurationSchema = import_zod18.z.object({
6927
- deleteDaysAfterLastModification: import_zod18.z.number().min(1).optional().describe("Default value for the deleteDaysAfterLastModification parameter of CartDraft and MyCartDraft."),
6928
- countryTaxRateFallbackEnabled: import_zod18.z.boolean().optional().describe("Indicates if country - no state Tax Rate fallback should be used.")
7915
+ var cartsConfigurationSchema = import_zod21.z.object({
7916
+ deleteDaysAfterLastModification: import_zod21.z.number().min(1).optional().describe("Default value for the deleteDaysAfterLastModification parameter of CartDraft and MyCartDraft."),
7917
+ countryTaxRateFallbackEnabled: import_zod21.z.boolean().optional().describe("Indicates if country - no state Tax Rate fallback should be used.")
6929
7918
  });
6930
- var shoppingListsConfigurationSchema = import_zod18.z.object({
6931
- deleteDaysAfterLastModification: import_zod18.z.number().min(1).optional().describe("Default value for the deleteDaysAfterLastModification parameter of ShoppingListDraft.")
7919
+ var shoppingListsConfigurationSchema = import_zod21.z.object({
7920
+ deleteDaysAfterLastModification: import_zod21.z.number().min(1).optional().describe("Default value for the deleteDaysAfterLastModification parameter of ShoppingListDraft.")
6932
7921
  });
6933
- var customFieldLocalizedEnumValueSchema = import_zod18.z.object({
6934
- key: import_zod18.z.string().describe("The key of the enum value."),
6935
- label: import_zod18.z.record(import_zod18.z.string(), import_zod18.z.string()).describe("The localized labels for the enum value.")
7922
+ var customFieldLocalizedEnumValueSchema = import_zod21.z.object({
7923
+ key: import_zod21.z.string().describe("The key of the enum value."),
7924
+ label: import_zod21.z.record(import_zod21.z.string(), import_zod21.z.string()).describe("The localized labels for the enum value.")
6936
7925
  });
6937
- var shippingRateInputTypeSchema = import_zod18.z.discriminatedUnion("type", [
6938
- import_zod18.z.object({
6939
- type: import_zod18.z.literal("CartValue")
7926
+ var shippingRateInputTypeSchema = import_zod21.z.discriminatedUnion("type", [
7927
+ import_zod21.z.object({
7928
+ type: import_zod21.z.literal("CartValue")
6940
7929
  }),
6941
- import_zod18.z.object({
6942
- type: import_zod18.z.literal("CartClassification"),
6943
- values: import_zod18.z.array(customFieldLocalizedEnumValueSchema).describe("The classification items for ShippingRatePriceTier.")
7930
+ import_zod21.z.object({
7931
+ type: import_zod21.z.literal("CartClassification"),
7932
+ values: import_zod21.z.array(customFieldLocalizedEnumValueSchema).describe("The classification items for ShippingRatePriceTier.")
6944
7933
  }),
6945
- import_zod18.z.object({
6946
- type: import_zod18.z.literal("CartScore"),
6947
- score: import_zod18.z.number().describe("The score mapping for available shipping rate tiers.")
7934
+ import_zod21.z.object({
7935
+ type: import_zod21.z.literal("CartScore"),
7936
+ score: import_zod21.z.number().describe("The score mapping for available shipping rate tiers.")
6948
7937
  })
6949
7938
  ]);
6950
- var externalOAuthSchema = import_zod18.z.object({
6951
- url: import_zod18.z.string().url().describe("The URL of the token introspection endpoint."),
6952
- authorizationHeader: import_zod18.z.string().describe("The authorization header to authenticate against the introspection endpoint.")
7939
+ var externalOAuthSchema = import_zod21.z.object({
7940
+ url: import_zod21.z.string().url().describe("The URL of the token introspection endpoint."),
7941
+ authorizationHeader: import_zod21.z.string().describe("The authorization header to authenticate against the introspection endpoint.")
6953
7942
  });
6954
- var customerSearchStatusSchema = import_zod18.z.enum([
7943
+ var customerSearchStatusSchema = import_zod21.z.enum([
6955
7944
  "Activated",
6956
7945
  "Deactivated"
6957
7946
  ]);
6958
- var businessUnitSearchStatusSchema = import_zod18.z.enum([
7947
+ var businessUnitSearchStatusSchema = import_zod21.z.enum([
6959
7948
  "Activated",
6960
7949
  "Deactivated"
6961
7950
  ]);
6962
- var orderSearchStatusSchema = import_zod18.z.enum([
7951
+ var orderSearchStatusSchema = import_zod21.z.enum([
6963
7952
  "Activated",
6964
7953
  "Deactivated"
6965
7954
  ]);
6966
- var productSearchIndexingModeSchema = import_zod18.z.enum([
7955
+ var productSearchIndexingModeSchema = import_zod21.z.enum([
6967
7956
  "ProductProjectionsSearch",
6968
7957
  "ProductsSearch"
6969
7958
  ]);
6970
- var businessUnitConfigurationStatusSchema = import_zod18.z.enum([
7959
+ var businessUnitConfigurationStatusSchema = import_zod21.z.enum([
6971
7960
  "Active",
6972
7961
  "Inactive",
6973
7962
  "Verification"
6974
7963
  ]);
6975
- var associateRoleResourceIdentifierSchema = import_zod18.z.object({
6976
- typeId: import_zod18.z.literal("associate-role"),
6977
- id: import_zod18.z.string().optional().describe("The ID of the associate role."),
6978
- key: import_zod18.z.string().optional().describe("The key of the associate role.")
7964
+ var associateRoleResourceIdentifierSchema = import_zod21.z.object({
7965
+ typeId: import_zod21.z.literal("associate-role"),
7966
+ id: import_zod21.z.string().optional().describe("The ID of the associate role."),
7967
+ key: import_zod21.z.string().optional().describe("The key of the associate role.")
6979
7968
  });
6980
- var changeNameSchema = import_zod18.z.object({
6981
- action: import_zod18.z.literal("changeName"),
6982
- name: import_zod18.z.string().describe("New value to set.")
7969
+ var changeNameSchema = import_zod21.z.object({
7970
+ action: import_zod21.z.literal("changeName"),
7971
+ name: import_zod21.z.string().describe("New value to set.")
6983
7972
  });
6984
- var changeCountriesSchema = import_zod18.z.object({
6985
- action: import_zod18.z.literal("changeCountries"),
6986
- countries: import_zod18.z.array(import_zod18.z.string()).describe("New value to set. Must not be empty.")
7973
+ var changeCountriesSchema = import_zod21.z.object({
7974
+ action: import_zod21.z.literal("changeCountries"),
7975
+ countries: import_zod21.z.array(import_zod21.z.string()).describe("New value to set. Must not be empty.")
6987
7976
  });
6988
- var changeCurrenciesSchema = import_zod18.z.object({
6989
- action: import_zod18.z.literal("changeCurrencies"),
6990
- currencies: import_zod18.z.array(import_zod18.z.string()).describe("New value to set. Must not be empty.")
7977
+ var changeCurrenciesSchema = import_zod21.z.object({
7978
+ action: import_zod21.z.literal("changeCurrencies"),
7979
+ currencies: import_zod21.z.array(import_zod21.z.string()).describe("New value to set. Must not be empty.")
6991
7980
  });
6992
- var changeLanguagesSchema = import_zod18.z.object({
6993
- action: import_zod18.z.literal("changeLanguages"),
6994
- languages: import_zod18.z.array(import_zod18.z.string()).describe("New value to set. Must not be empty.")
7981
+ var changeLanguagesSchema = import_zod21.z.object({
7982
+ action: import_zod21.z.literal("changeLanguages"),
7983
+ languages: import_zod21.z.array(import_zod21.z.string()).describe("New value to set. Must not be empty.")
6995
7984
  });
6996
- var changeMessagesConfigurationSchema = import_zod18.z.object({
6997
- action: import_zod18.z.literal("changeMessagesConfiguration"),
7985
+ var changeMessagesConfigurationSchema = import_zod21.z.object({
7986
+ action: import_zod21.z.literal("changeMessagesConfiguration"),
6998
7987
  messagesConfiguration: messagesConfigurationDraftSchema.describe("Configuration for the Messages Query feature.")
6999
7988
  });
7000
- var changeCartsConfigurationSchema = import_zod18.z.object({
7001
- action: import_zod18.z.literal("changeCartsConfiguration"),
7989
+ var changeCartsConfigurationSchema = import_zod21.z.object({
7990
+ action: import_zod21.z.literal("changeCartsConfiguration"),
7002
7991
  cartsConfiguration: cartsConfigurationSchema.describe("Configuration for the Carts feature.")
7003
7992
  });
7004
- var changeCountryTaxRateFallbackEnabledSchema = import_zod18.z.object({
7005
- action: import_zod18.z.literal("changeCountryTaxRateFallbackEnabled"),
7006
- countryTaxRateFallbackEnabled: import_zod18.z.boolean().describe("When true, country - no state Tax Rate is used as fallback.")
7993
+ var changeCountryTaxRateFallbackEnabledSchema = import_zod21.z.object({
7994
+ action: import_zod21.z.literal("changeCountryTaxRateFallbackEnabled"),
7995
+ countryTaxRateFallbackEnabled: import_zod21.z.boolean().describe("When true, country - no state Tax Rate is used as fallback.")
7007
7996
  });
7008
- var changeShoppingListsConfigurationSchema = import_zod18.z.object({
7009
- action: import_zod18.z.literal("changeShoppingListsConfiguration"),
7997
+ var changeShoppingListsConfigurationSchema = import_zod21.z.object({
7998
+ action: import_zod21.z.literal("changeShoppingListsConfiguration"),
7010
7999
  shoppingListsConfiguration: shoppingListsConfigurationSchema.describe("Configuration for the Shopping Lists feature.")
7011
8000
  });
7012
- var changeMyBusinessUnitStatusOnCreationSchema = import_zod18.z.object({
7013
- action: import_zod18.z.literal("changeMyBusinessUnitStatusOnCreation"),
8001
+ var changeMyBusinessUnitStatusOnCreationSchema = import_zod21.z.object({
8002
+ action: import_zod21.z.literal("changeMyBusinessUnitStatusOnCreation"),
7014
8003
  status: businessUnitConfigurationStatusSchema.describe("Status for Business Units created using the My Business Unit endpoint.")
7015
8004
  });
7016
- var setMyBusinessUnitAssociateRoleOnCreationSchema = import_zod18.z.object({
7017
- action: import_zod18.z.literal("setMyBusinessUnitAssociateRoleOnCreation"),
8005
+ var setMyBusinessUnitAssociateRoleOnCreationSchema = import_zod21.z.object({
8006
+ action: import_zod21.z.literal("setMyBusinessUnitAssociateRoleOnCreation"),
7018
8007
  associateRole: associateRoleResourceIdentifierSchema.describe("Default Associate Role assigned to the Associate creating a Business Unit.")
7019
8008
  });
7020
- var setShippingRateInputTypeSchema = import_zod18.z.object({
7021
- action: import_zod18.z.literal("setShippingRateInputType"),
8009
+ var setShippingRateInputTypeSchema = import_zod21.z.object({
8010
+ action: import_zod21.z.literal("setShippingRateInputType"),
7022
8011
  shippingRateInputType: shippingRateInputTypeSchema.optional().describe("Value to set. If empty, any existing value will be removed.")
7023
8012
  });
7024
- var setExternalOAuthSchema = import_zod18.z.object({
7025
- action: import_zod18.z.literal("setExternalOAuth"),
8013
+ var setExternalOAuthSchema = import_zod21.z.object({
8014
+ action: import_zod21.z.literal("setExternalOAuth"),
7026
8015
  externalOAuth: externalOAuthSchema.optional().describe("Value to set. If empty, any existing value will be removed.")
7027
8016
  });
7028
- var changeProductSearchIndexingEnabledSchema = import_zod18.z.object({
7029
- action: import_zod18.z.literal("changeProductSearchIndexingEnabled"),
7030
- enabled: import_zod18.z.boolean().describe("If false, the indexing of Product information will stop."),
8017
+ var changeProductSearchIndexingEnabledSchema = import_zod21.z.object({
8018
+ action: import_zod21.z.literal("changeProductSearchIndexingEnabled"),
8019
+ enabled: import_zod21.z.boolean().describe("If false, the indexing of Product information will stop."),
7031
8020
  mode: productSearchIndexingModeSchema.optional().describe("Controls whether the action should apply to Product Projection Search or to Product Search.")
7032
8021
  });
7033
- var changeOrderSearchStatusSchema = import_zod18.z.object({
7034
- action: import_zod18.z.literal("changeOrderSearchStatus"),
8022
+ var changeOrderSearchStatusSchema = import_zod21.z.object({
8023
+ action: import_zod21.z.literal("changeOrderSearchStatus"),
7035
8024
  status: orderSearchStatusSchema.describe("Activates or deactivates the Order Search feature.")
7036
8025
  });
7037
- var changeCustomerSearchStatusSchema = import_zod18.z.object({
7038
- action: import_zod18.z.literal("changeCustomerSearchStatus"),
8026
+ var changeCustomerSearchStatusSchema = import_zod21.z.object({
8027
+ action: import_zod21.z.literal("changeCustomerSearchStatus"),
7039
8028
  status: customerSearchStatusSchema.describe("Activates or deactivates the Customer Search feature.")
7040
8029
  });
7041
- var changeBusinessUnitSearchStatusSchema = import_zod18.z.object({
7042
- action: import_zod18.z.literal("changeBusinessUnitSearchStatus"),
8030
+ var changeBusinessUnitSearchStatusSchema = import_zod21.z.object({
8031
+ action: import_zod21.z.literal("changeBusinessUnitSearchStatus"),
7043
8032
  status: businessUnitSearchStatusSchema.describe("Activates or deactivates the Search Business Units feature.")
7044
8033
  });
7045
- var updateActionSchema = import_zod18.z.discriminatedUnion("action", [
8034
+ var updateActionSchema = import_zod21.z.discriminatedUnion("action", [
7046
8035
  changeNameSchema,
7047
8036
  changeCountriesSchema,
7048
8037
  changeCurrenciesSchema,
@@ -7060,10 +8049,10 @@ var updateActionSchema = import_zod18.z.discriminatedUnion("action", [
7060
8049
  changeCustomerSearchStatusSchema,
7061
8050
  changeBusinessUnitSearchStatusSchema
7062
8051
  ]);
7063
- var updateProjectParameters = import_zod18.z.object({
7064
- version: import_zod18.z.number().describe("The current version of the project. If not provided, the current version will be fetched automatically."),
7065
- actions: import_zod18.z.array(updateActionSchema).describe("The list of update actions to apply to the project."),
7066
- projectKey: import_zod18.z.string().optional().describe("The key of the project to update. If not provided, the current project will be used.")
8052
+ var updateProjectParameters = import_zod21.z.object({
8053
+ version: import_zod21.z.number().describe("The current version of the project. If not provided, the current version will be fetched automatically."),
8054
+ actions: import_zod21.z.array(updateActionSchema).describe("The list of update actions to apply to the project."),
8055
+ projectKey: import_zod21.z.string().optional().describe("The key of the project to update. If not provided, the current project will be used.")
7067
8056
  });
7068
8057
  // src/resources/project/project.prompt.ts
7069
8058
  var readProjectPrompt = "\nThis tool will fetch information about a commercetools project.\n\nIt takes these optional arguments:\n- projectKey (string, optional): The key of the project to read. If not provided, the current projectKey from the configuration will be used.\n\nThe response will contain detailed information about the project including countries, currencies, languages, and more.\n";
@@ -7085,9 +8074,9 @@ var ProjectHandler = /*#__PURE__*/ function(CommercetoolsResourceHandler) {
7085
8074
  schemas: {
7086
8075
  read: readProjectParameters,
7087
8076
  update: updateProjectParameters,
7088
- create: import_zod19.z.object({}),
8077
+ create: import_zod22.z.object({}),
7089
8078
  // Empty schema for unsupported operation
7090
- delete: import_zod19.z.object({})
8079
+ delete: import_zod22.z.object({})
7091
8080
  }
7092
8081
  });
7093
8082
  return _this;
@@ -7243,63 +8232,63 @@ function updateProject(context, apiClientFactory) {
7243
8232
  })();
7244
8233
  }
7245
8234
  // src/resources/reviews/reviews.schema.ts
7246
- var import_zod20 = require("zod");
7247
- var readReviewsParameters = import_zod20.z.object({
7248
- id: import_zod20.z.string().optional().describe("Review ID"),
7249
- key: import_zod20.z.string().optional().describe("Review key"),
7250
- where: import_zod20.z.array(import_zod20.z.string()).optional().describe('Query predicates specified as strings. Example: ["rating > 50"]'),
7251
- sort: import_zod20.z.array(import_zod20.z.string()).optional().describe('Sort criteria for the results. Example: ["rating desc", "createdAt asc"]'),
7252
- limit: import_zod20.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
7253
- offset: import_zod20.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
7254
- expand: import_zod20.z.array(import_zod20.z.string()).optional().describe('Fields to expand. Example: ["customer", "target"]')
8235
+ var import_zod23 = require("zod");
8236
+ var readReviewsParameters = import_zod23.z.object({
8237
+ id: import_zod23.z.string().optional().describe("Review ID"),
8238
+ key: import_zod23.z.string().optional().describe("Review key"),
8239
+ where: import_zod23.z.array(import_zod23.z.string()).optional().describe('Query predicates specified as strings. Example: ["rating > 50"]'),
8240
+ sort: import_zod23.z.array(import_zod23.z.string()).optional().describe('Sort criteria for the results. Example: ["rating desc", "createdAt asc"]'),
8241
+ limit: import_zod23.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
8242
+ offset: import_zod23.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
8243
+ expand: import_zod23.z.array(import_zod23.z.string()).optional().describe('Fields to expand. Example: ["customer", "target"]')
7255
8244
  });
7256
- var createReviewsParameters = import_zod20.z.object({
7257
- key: import_zod20.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the review"),
7258
- uniquenessValue: import_zod20.z.string().optional().describe("Must be unique among reviews"),
7259
- locale: import_zod20.z.string().optional().describe("Language in which the content is written"),
7260
- authorName: import_zod20.z.string().optional().describe("Name of the author"),
7261
- title: import_zod20.z.string().optional().describe("Title of the review"),
7262
- text: import_zod20.z.string().optional().describe("Text content of the review"),
7263
- target: import_zod20.z.object({
7264
- id: import_zod20.z.string().optional(),
7265
- key: import_zod20.z.string().optional(),
7266
- typeId: import_zod20.z.enum([
8245
+ var createReviewsParameters = import_zod23.z.object({
8246
+ key: import_zod23.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the review"),
8247
+ uniquenessValue: import_zod23.z.string().optional().describe("Must be unique among reviews"),
8248
+ locale: import_zod23.z.string().optional().describe("Language in which the content is written"),
8249
+ authorName: import_zod23.z.string().optional().describe("Name of the author"),
8250
+ title: import_zod23.z.string().optional().describe("Title of the review"),
8251
+ text: import_zod23.z.string().optional().describe("Text content of the review"),
8252
+ target: import_zod23.z.object({
8253
+ id: import_zod23.z.string().optional(),
8254
+ key: import_zod23.z.string().optional(),
8255
+ typeId: import_zod23.z.enum([
7267
8256
  "product",
7268
8257
  "channel"
7269
8258
  ])
7270
8259
  }).optional().describe("Identifies the target of the review (Product or Channel)"),
7271
- state: import_zod20.z.object({
7272
- id: import_zod20.z.string().optional(),
7273
- key: import_zod20.z.string().optional(),
7274
- typeId: import_zod20.z.literal("state")
8260
+ state: import_zod23.z.object({
8261
+ id: import_zod23.z.string().optional(),
8262
+ key: import_zod23.z.string().optional(),
8263
+ typeId: import_zod23.z.literal("state")
7275
8264
  }).optional().describe("State of the review used for approval processes"),
7276
- rating: import_zod20.z.number().int().min(-100).max(100).optional().describe("Rating of the Product or Channel, range -100 to 100"),
7277
- customer: import_zod20.z.object({
7278
- id: import_zod20.z.string().optional(),
7279
- key: import_zod20.z.string().optional(),
7280
- typeId: import_zod20.z.literal("customer")
8265
+ rating: import_zod23.z.number().int().min(-100).max(100).optional().describe("Rating of the Product or Channel, range -100 to 100"),
8266
+ customer: import_zod23.z.object({
8267
+ id: import_zod23.z.string().optional(),
8268
+ key: import_zod23.z.string().optional(),
8269
+ typeId: import_zod23.z.literal("customer")
7281
8270
  }).optional().describe("Customer who created the review"),
7282
- custom: import_zod20.z.object({
7283
- type: import_zod20.z.object({
7284
- id: import_zod20.z.string(),
7285
- typeId: import_zod20.z.literal("type")
8271
+ custom: import_zod23.z.object({
8272
+ type: import_zod23.z.object({
8273
+ id: import_zod23.z.string(),
8274
+ typeId: import_zod23.z.literal("type")
7286
8275
  }).optional(),
7287
- fields: import_zod20.z.record(import_zod20.z.string(), import_zod20.z.any()).optional()
8276
+ fields: import_zod23.z.record(import_zod23.z.string(), import_zod23.z.any()).optional()
7288
8277
  }).optional().describe("Custom fields for the review")
7289
8278
  });
7290
- var updateReviewsParameters = import_zod20.z.object({
7291
- id: import_zod20.z.string().optional().describe("The ID of the review to update"),
7292
- key: import_zod20.z.string().optional().describe("The key of the review to update"),
7293
- version: import_zod20.z.number().int().describe("The current version of the review"),
7294
- actions: import_zod20.z.array(import_zod20.z.object({
7295
- action: import_zod20.z.string().describe("The name of the update action to perform")
7296
- }).and(import_zod20.z.record(import_zod20.z.string(), import_zod20.z.any()).optional()).describe('Array of update actions to perform on the review. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
8279
+ var updateReviewsParameters = import_zod23.z.object({
8280
+ id: import_zod23.z.string().optional().describe("The ID of the review to update"),
8281
+ key: import_zod23.z.string().optional().describe("The key of the review to update"),
8282
+ version: import_zod23.z.number().int().describe("The current version of the review"),
8283
+ actions: import_zod23.z.array(import_zod23.z.object({
8284
+ action: import_zod23.z.string().describe("The name of the update action to perform")
8285
+ }).and(import_zod23.z.record(import_zod23.z.string(), import_zod23.z.any()).optional()).describe('Array of update actions to perform on the review. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
7297
8286
  });
7298
- var deleteReviewsParameters = import_zod20.z.object({
7299
- id: import_zod20.z.string().optional().describe("Review ID"),
7300
- key: import_zod20.z.string().optional().describe("Review key"),
7301
- version: import_zod20.z.number().int().describe("Current version (for optimistic locking)"),
7302
- dataErasure: import_zod20.z.boolean().optional().describe("Delete personal data")
8287
+ var deleteReviewsParameters = import_zod23.z.object({
8288
+ id: import_zod23.z.string().optional().describe("Review ID"),
8289
+ key: import_zod23.z.string().optional().describe("Review key"),
8290
+ version: import_zod23.z.number().int().describe("Current version (for optimistic locking)"),
8291
+ dataErasure: import_zod23.z.boolean().optional().describe("Delete personal data")
7303
8292
  });
7304
8293
  // src/resources/reviews/reviews.prompt.ts
7305
8294
  var readReviewsPrompt = '\nThis tool will fetch a Review by ID or key (if provided) from commercetools or query all available reviews in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the review to fetch.\n- key (string, optional): The key of the review to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["rating > 50"]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["rating desc", "createdAt asc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand. Example: ["customer", "target"]\n';
@@ -7648,30 +8637,30 @@ function deleteReviews(context, apiClientFactory) {
7648
8637
  })();
7649
8638
  }
7650
8639
  // src/resources/standalone-prices/standalone-prices.schema.ts
7651
- var import_zod21 = require("zod");
7652
- var readStandalonePricesParameters = import_zod21.z.object({
7653
- id: import_zod21.z.string().optional(),
7654
- key: import_zod21.z.string().optional(),
7655
- sku: import_zod21.z.string().optional(),
7656
- where: import_zod21.z.array(import_zod21.z.string()).optional(),
7657
- sort: import_zod21.z.array(import_zod21.z.string()).optional(),
7658
- limit: import_zod21.z.number().int().min(1).max(500).optional(),
7659
- offset: import_zod21.z.number().int().optional(),
7660
- expand: import_zod21.z.array(import_zod21.z.string()).optional()
8640
+ var import_zod24 = require("zod");
8641
+ var readStandalonePricesParameters = import_zod24.z.object({
8642
+ id: import_zod24.z.string().optional(),
8643
+ key: import_zod24.z.string().optional(),
8644
+ sku: import_zod24.z.string().optional(),
8645
+ where: import_zod24.z.array(import_zod24.z.string()).optional(),
8646
+ sort: import_zod24.z.array(import_zod24.z.string()).optional(),
8647
+ limit: import_zod24.z.number().int().min(1).max(500).optional(),
8648
+ offset: import_zod24.z.number().int().optional(),
8649
+ expand: import_zod24.z.array(import_zod24.z.string()).optional()
7661
8650
  });
7662
- var createStandalonePricesParameters = import_zod21.z.object({
7663
- body: import_zod21.z.record(import_zod21.z.any())
8651
+ var createStandalonePricesParameters = import_zod24.z.object({
8652
+ body: import_zod24.z.record(import_zod24.z.any())
7664
8653
  });
7665
- var updateStandalonePricesParameters = import_zod21.z.object({
7666
- id: import_zod21.z.string().optional(),
7667
- key: import_zod21.z.string().optional(),
7668
- version: import_zod21.z.number().optional(),
7669
- actions: import_zod21.z.array(import_zod21.z.record(import_zod21.z.any())).optional()
8654
+ var updateStandalonePricesParameters = import_zod24.z.object({
8655
+ id: import_zod24.z.string().optional(),
8656
+ key: import_zod24.z.string().optional(),
8657
+ version: import_zod24.z.number().optional(),
8658
+ actions: import_zod24.z.array(import_zod24.z.record(import_zod24.z.any())).optional()
7670
8659
  });
7671
- var deleteStandalonePricesParameters = import_zod21.z.object({
7672
- id: import_zod21.z.string().optional(),
7673
- key: import_zod21.z.string().optional(),
7674
- version: import_zod21.z.number().optional()
8660
+ var deleteStandalonePricesParameters = import_zod24.z.object({
8661
+ id: import_zod24.z.string().optional(),
8662
+ key: import_zod24.z.string().optional(),
8663
+ version: import_zod24.z.number().optional()
7675
8664
  });
7676
8665
  // src/resources/standalone-prices/standalone-prices.prompt.ts
7677
8666
  var readStandalonePricesPrompt = "Read standalone prices parameters";
@@ -7987,30 +8976,30 @@ function deleteStandalonePrices(context, apiClientFactory) {
7987
8976
  })();
7988
8977
  }
7989
8978
  // src/resources/states/states.schema.ts
7990
- var import_zod22 = require("zod");
7991
- var readStatesParameters = import_zod22.z.object({
7992
- id: import_zod22.z.string().optional(),
7993
- key: import_zod22.z.string().optional(),
7994
- where: import_zod22.z.array(import_zod22.z.string()).optional(),
7995
- sort: import_zod22.z.array(import_zod22.z.string()).optional(),
7996
- limit: import_zod22.z.number().int().min(1).max(500).optional(),
7997
- offset: import_zod22.z.number().int().optional(),
7998
- expand: import_zod22.z.array(import_zod22.z.string()).optional(),
7999
- withTotal: import_zod22.z.boolean().optional()
8979
+ var import_zod25 = require("zod");
8980
+ var readStatesParameters = import_zod25.z.object({
8981
+ id: import_zod25.z.string().optional(),
8982
+ key: import_zod25.z.string().optional(),
8983
+ where: import_zod25.z.array(import_zod25.z.string()).optional(),
8984
+ sort: import_zod25.z.array(import_zod25.z.string()).optional(),
8985
+ limit: import_zod25.z.number().int().min(1).max(500).optional(),
8986
+ offset: import_zod25.z.number().int().optional(),
8987
+ expand: import_zod25.z.array(import_zod25.z.string()).optional(),
8988
+ withTotal: import_zod25.z.boolean().optional()
8000
8989
  });
8001
- var createStatesParameters = import_zod22.z.object({
8002
- body: import_zod22.z.record(import_zod22.z.any())
8990
+ var createStatesParameters = import_zod25.z.object({
8991
+ body: import_zod25.z.record(import_zod25.z.any())
8003
8992
  });
8004
- var updateStatesParameters = import_zod22.z.object({
8005
- id: import_zod22.z.string().optional(),
8006
- key: import_zod22.z.string().optional(),
8007
- version: import_zod22.z.number().optional(),
8008
- actions: import_zod22.z.array(import_zod22.z.record(import_zod22.z.any())).optional()
8993
+ var updateStatesParameters = import_zod25.z.object({
8994
+ id: import_zod25.z.string().optional(),
8995
+ key: import_zod25.z.string().optional(),
8996
+ version: import_zod25.z.number().optional(),
8997
+ actions: import_zod25.z.array(import_zod25.z.record(import_zod25.z.any())).optional()
8009
8998
  });
8010
- var deleteStatesParameters = import_zod22.z.object({
8011
- id: import_zod22.z.string().optional(),
8012
- key: import_zod22.z.string().optional(),
8013
- version: import_zod22.z.number().optional()
8999
+ var deleteStatesParameters = import_zod25.z.object({
9000
+ id: import_zod25.z.string().optional(),
9001
+ key: import_zod25.z.string().optional(),
9002
+ version: import_zod25.z.number().optional()
8014
9003
  });
8015
9004
  // src/resources/states/states.prompt.ts
8016
9005
  var readStatesPrompt = "\nRead States by ID, key, or query predicates. States model finite-state machines used for Orders, Products, Reviews, etc.\n\nOptional arguments:\n- id (string): fetch a single State by ID\n- key (string): fetch a single State by key\n- where (array[string]): query predicates, e.g. ['type=\"ProductState\"']\n- sort (array[string]): sort criteria\n- limit (int): 1-500\n- offset (int)\n- expand (array[string])\n- withTotal (boolean): include total count\n";
@@ -8330,29 +9319,29 @@ function deleteStates(context, apiClientFactory) {
8330
9319
  })();
8331
9320
  }
8332
9321
  // src/resources/stores/stores.schema.ts
8333
- var import_zod23 = require("zod");
8334
- var readStoresParameters = import_zod23.z.object({
8335
- id: import_zod23.z.string().optional(),
8336
- key: import_zod23.z.string().optional(),
8337
- where: import_zod23.z.array(import_zod23.z.string()).optional(),
8338
- sort: import_zod23.z.array(import_zod23.z.string()).optional(),
8339
- limit: import_zod23.z.number().int().min(1).max(500).optional(),
8340
- offset: import_zod23.z.number().int().optional(),
8341
- expand: import_zod23.z.array(import_zod23.z.string()).optional()
9322
+ var import_zod26 = require("zod");
9323
+ var readStoresParameters = import_zod26.z.object({
9324
+ id: import_zod26.z.string().optional(),
9325
+ key: import_zod26.z.string().optional(),
9326
+ where: import_zod26.z.array(import_zod26.z.string()).optional(),
9327
+ sort: import_zod26.z.array(import_zod26.z.string()).optional(),
9328
+ limit: import_zod26.z.number().int().min(1).max(500).optional(),
9329
+ offset: import_zod26.z.number().int().optional(),
9330
+ expand: import_zod26.z.array(import_zod26.z.string()).optional()
8342
9331
  });
8343
- var createStoresParameters = import_zod23.z.object({
8344
- body: import_zod23.z.record(import_zod23.z.any())
9332
+ var createStoresParameters = import_zod26.z.object({
9333
+ body: import_zod26.z.record(import_zod26.z.any())
8345
9334
  });
8346
- var updateStoresParameters = import_zod23.z.object({
8347
- id: import_zod23.z.string().optional(),
8348
- key: import_zod23.z.string().optional(),
8349
- version: import_zod23.z.number().optional(),
8350
- actions: import_zod23.z.array(import_zod23.z.record(import_zod23.z.any())).optional()
9335
+ var updateStoresParameters = import_zod26.z.object({
9336
+ id: import_zod26.z.string().optional(),
9337
+ key: import_zod26.z.string().optional(),
9338
+ version: import_zod26.z.number().optional(),
9339
+ actions: import_zod26.z.array(import_zod26.z.record(import_zod26.z.any())).optional()
8351
9340
  });
8352
- var deleteStoresParameters = import_zod23.z.object({
8353
- id: import_zod23.z.string().optional(),
8354
- key: import_zod23.z.string().optional(),
8355
- version: import_zod23.z.number().optional()
9341
+ var deleteStoresParameters = import_zod26.z.object({
9342
+ id: import_zod26.z.string().optional(),
9343
+ key: import_zod26.z.string().optional(),
9344
+ version: import_zod26.z.number().optional()
8356
9345
  });
8357
9346
  // src/resources/stores/stores.prompt.ts
8358
9347
  var readStoresPrompt = "Read stores parameters";
@@ -8670,29 +9659,29 @@ function deleteStores(context, apiClientFactory) {
8670
9659
  })();
8671
9660
  }
8672
9661
  // src/resources/subscriptions/subscriptions.schema.ts
8673
- var import_zod24 = require("zod");
8674
- var readSubscriptionsParameters = import_zod24.z.object({
8675
- id: import_zod24.z.string().optional(),
8676
- key: import_zod24.z.string().optional(),
8677
- where: import_zod24.z.array(import_zod24.z.string()).optional(),
8678
- sort: import_zod24.z.array(import_zod24.z.string()).optional(),
8679
- limit: import_zod24.z.number().int().min(1).max(500).optional(),
8680
- offset: import_zod24.z.number().int().optional(),
8681
- expand: import_zod24.z.array(import_zod24.z.string()).optional()
9662
+ var import_zod27 = require("zod");
9663
+ var readSubscriptionsParameters = import_zod27.z.object({
9664
+ id: import_zod27.z.string().optional(),
9665
+ key: import_zod27.z.string().optional(),
9666
+ where: import_zod27.z.array(import_zod27.z.string()).optional(),
9667
+ sort: import_zod27.z.array(import_zod27.z.string()).optional(),
9668
+ limit: import_zod27.z.number().int().min(1).max(500).optional(),
9669
+ offset: import_zod27.z.number().int().optional(),
9670
+ expand: import_zod27.z.array(import_zod27.z.string()).optional()
8682
9671
  });
8683
- var createSubscriptionsParameters = import_zod24.z.object({
8684
- body: import_zod24.z.record(import_zod24.z.any())
9672
+ var createSubscriptionsParameters = import_zod27.z.object({
9673
+ body: import_zod27.z.record(import_zod27.z.any())
8685
9674
  });
8686
- var updateSubscriptionsParameters = import_zod24.z.object({
8687
- id: import_zod24.z.string().optional(),
8688
- key: import_zod24.z.string().optional(),
8689
- version: import_zod24.z.number().optional(),
8690
- actions: import_zod24.z.array(import_zod24.z.record(import_zod24.z.any())).optional()
9675
+ var updateSubscriptionsParameters = import_zod27.z.object({
9676
+ id: import_zod27.z.string().optional(),
9677
+ key: import_zod27.z.string().optional(),
9678
+ version: import_zod27.z.number().optional(),
9679
+ actions: import_zod27.z.array(import_zod27.z.record(import_zod27.z.any())).optional()
8691
9680
  });
8692
- var deleteSubscriptionsParameters = import_zod24.z.object({
8693
- id: import_zod24.z.string().optional(),
8694
- key: import_zod24.z.string().optional(),
8695
- version: import_zod24.z.number().optional()
9681
+ var deleteSubscriptionsParameters = import_zod27.z.object({
9682
+ id: import_zod27.z.string().optional(),
9683
+ key: import_zod27.z.string().optional(),
9684
+ version: import_zod27.z.number().optional()
8696
9685
  });
8697
9686
  // src/resources/subscriptions/subscriptions.prompt.ts
8698
9687
  var readSubscriptionsPrompt = "\nRead Subscriptions by id, key or query. Subscriptions send notifications to external destinations (SQS/SNS/EventBridge/GooglePubSub/etc).\n\nOptional arguments:\n- id (string): fetch a single Subscription by ID\n- key (string): fetch a single Subscription by key\n- where (array[string]): query predicates\n- sort (array[string])\n- limit (int)\n- offset (int)\n- expand (array[string])\n\nNotes:\n- Subscriptions have complex destination configuration. Use create/update only if you supply a valid SubscriptionDraft.\n";
@@ -9010,44 +9999,44 @@ function deleteSubscriptions(context, apiClientFactory) {
9010
9999
  })();
9011
10000
  }
9012
10001
  // src/resources/tax-categories/tax-categories.schema.ts
9013
- var import_zod25 = require("zod");
9014
- var readTaxCategoriesParameters = import_zod25.z.object({
9015
- id: import_zod25.z.string().optional().describe("Tax Category ID"),
9016
- key: import_zod25.z.string().optional().describe("Tax Category key"),
9017
- where: import_zod25.z.array(import_zod25.z.string()).optional().describe('Query predicates specified as strings. Example: ["name = \\"Standard\\""]'),
9018
- sort: import_zod25.z.array(import_zod25.z.string()).optional().describe('Sort criteria for the results. Example: ["name asc", "createdAt desc"]'),
9019
- limit: import_zod25.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
9020
- offset: import_zod25.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
9021
- expand: import_zod25.z.array(import_zod25.z.string()).optional().describe("Fields to expand. Example: []")
10002
+ var import_zod28 = require("zod");
10003
+ var readTaxCategoriesParameters = import_zod28.z.object({
10004
+ id: import_zod28.z.string().optional().describe("Tax Category ID"),
10005
+ key: import_zod28.z.string().optional().describe("Tax Category key"),
10006
+ where: import_zod28.z.array(import_zod28.z.string()).optional().describe('Query predicates specified as strings. Example: ["name = \\"Standard\\""]'),
10007
+ sort: import_zod28.z.array(import_zod28.z.string()).optional().describe('Sort criteria for the results. Example: ["name asc", "createdAt desc"]'),
10008
+ limit: import_zod28.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
10009
+ offset: import_zod28.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
10010
+ expand: import_zod28.z.array(import_zod28.z.string()).optional().describe("Fields to expand. Example: []")
9022
10011
  });
9023
- var createTaxCategoriesParameters = import_zod25.z.object({
9024
- key: import_zod25.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the tax category"),
9025
- name: import_zod25.z.string().describe("Tax Category name"),
9026
- description: import_zod25.z.string().optional().describe("Tax Category description"),
9027
- rates: import_zod25.z.array(import_zod25.z.object({
9028
- name: import_zod25.z.string().describe("Tax rate name"),
9029
- amount: import_zod25.z.number().min(0).max(1).optional().describe("Tax rate amount (0-1)"),
9030
- includedInPrice: import_zod25.z.boolean().optional().describe("Whether the tax is included in the price"),
9031
- country: import_zod25.z.string().describe("Country code (ISO 3166-1 alpha-2)"),
9032
- state: import_zod25.z.string().optional().describe("State within the country"),
9033
- subRates: import_zod25.z.array(import_zod25.z.object({
9034
- name: import_zod25.z.string(),
9035
- amount: import_zod25.z.number().min(0).max(1).optional()
10012
+ var createTaxCategoriesParameters = import_zod28.z.object({
10013
+ key: import_zod28.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the tax category"),
10014
+ name: import_zod28.z.string().describe("Tax Category name"),
10015
+ description: import_zod28.z.string().optional().describe("Tax Category description"),
10016
+ rates: import_zod28.z.array(import_zod28.z.object({
10017
+ name: import_zod28.z.string().describe("Tax rate name"),
10018
+ amount: import_zod28.z.number().min(0).max(1).optional().describe("Tax rate amount (0-1)"),
10019
+ includedInPrice: import_zod28.z.boolean().optional().describe("Whether the tax is included in the price"),
10020
+ country: import_zod28.z.string().describe("Country code (ISO 3166-1 alpha-2)"),
10021
+ state: import_zod28.z.string().optional().describe("State within the country"),
10022
+ subRates: import_zod28.z.array(import_zod28.z.object({
10023
+ name: import_zod28.z.string(),
10024
+ amount: import_zod28.z.number().min(0).max(1).optional()
9036
10025
  })).optional().describe("Sub-rates for the tax rate")
9037
10026
  })).optional().describe("Array of tax rates")
9038
10027
  });
9039
- var updateTaxCategoriesParameters = import_zod25.z.object({
9040
- id: import_zod25.z.string().optional().describe("The ID of the tax category to update"),
9041
- key: import_zod25.z.string().optional().describe("The key of the tax category to update"),
9042
- version: import_zod25.z.number().int().describe("The current version of the tax category"),
9043
- actions: import_zod25.z.array(import_zod25.z.object({
9044
- action: import_zod25.z.string().describe("The name of the update action to perform")
9045
- }).and(import_zod25.z.record(import_zod25.z.string(), import_zod25.z.any()).optional()).describe('Array of update actions to perform on the tax category. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
10028
+ var updateTaxCategoriesParameters = import_zod28.z.object({
10029
+ id: import_zod28.z.string().optional().describe("The ID of the tax category to update"),
10030
+ key: import_zod28.z.string().optional().describe("The key of the tax category to update"),
10031
+ version: import_zod28.z.number().int().describe("The current version of the tax category"),
10032
+ actions: import_zod28.z.array(import_zod28.z.object({
10033
+ action: import_zod28.z.string().describe("The name of the update action to perform")
10034
+ }).and(import_zod28.z.record(import_zod28.z.string(), import_zod28.z.any()).optional()).describe('Array of update actions to perform on the tax category. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
9046
10035
  });
9047
- var deleteTaxCategoriesParameters = import_zod25.z.object({
9048
- id: import_zod25.z.string().optional().describe("Tax Category ID"),
9049
- key: import_zod25.z.string().optional().describe("Tax Category key"),
9050
- version: import_zod25.z.number().int().describe("Current version (for optimistic locking)")
10036
+ var deleteTaxCategoriesParameters = import_zod28.z.object({
10037
+ id: import_zod28.z.string().optional().describe("Tax Category ID"),
10038
+ key: import_zod28.z.string().optional().describe("Tax Category key"),
10039
+ version: import_zod28.z.number().int().describe("Current version (for optimistic locking)")
9051
10040
  });
9052
10041
  // src/resources/tax-categories/tax-categories.prompt.ts
9053
10042
  var readTaxCategoriesPrompt = '\nThis tool will fetch a Tax Category by ID or key (if provided) from commercetools or query all available tax categories in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the tax category to fetch.\n- key (string, optional): The key of the tax category to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["name = \\"Standard\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["name asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand.\n';
@@ -9392,44 +10381,44 @@ function deleteTaxCategories(context, apiClientFactory) {
9392
10381
  })();
9393
10382
  }
9394
10383
  // src/resources/types/types.schema.ts
9395
- var import_zod26 = require("zod");
9396
- var readTypesParameters = import_zod26.z.object({
9397
- id: import_zod26.z.string().optional().describe("Type ID"),
9398
- key: import_zod26.z.string().optional().describe("Type key"),
9399
- where: import_zod26.z.array(import_zod26.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-type\\""]'),
9400
- sort: import_zod26.z.array(import_zod26.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
9401
- limit: import_zod26.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
9402
- offset: import_zod26.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
9403
- expand: import_zod26.z.array(import_zod26.z.string()).optional().describe("Fields to expand. Example: []")
10384
+ var import_zod29 = require("zod");
10385
+ var readTypesParameters = import_zod29.z.object({
10386
+ id: import_zod29.z.string().optional().describe("Type ID"),
10387
+ key: import_zod29.z.string().optional().describe("Type key"),
10388
+ where: import_zod29.z.array(import_zod29.z.string()).optional().describe('Query predicates specified as strings. Example: ["key = \\"my-type\\""]'),
10389
+ sort: import_zod29.z.array(import_zod29.z.string()).optional().describe('Sort criteria for the results. Example: ["key asc", "createdAt desc"]'),
10390
+ limit: import_zod29.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
10391
+ offset: import_zod29.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
10392
+ expand: import_zod29.z.array(import_zod29.z.string()).optional().describe("Fields to expand. Example: []")
9404
10393
  });
9405
- var createTypesParameters = import_zod26.z.object({
9406
- key: import_zod26.z.string().min(2).max(256).describe("User-defined unique identifier for the type"),
9407
- name: import_zod26.z.record(import_zod26.z.string()).describe("Type name (localized string, object with language codes as keys)"),
9408
- description: import_zod26.z.record(import_zod26.z.string()).optional().describe("Type description (localized string)"),
9409
- resourceTypeIds: import_zod26.z.array(import_zod26.z.string()).describe('Resource types that can be customized with this type. Example: ["category", "product"]'),
9410
- fieldDefinitions: import_zod26.z.array(import_zod26.z.object({
9411
- name: import_zod26.z.string().describe("Field name"),
9412
- label: import_zod26.z.record(import_zod26.z.string()).describe("Localized label for the field"),
9413
- required: import_zod26.z.boolean().optional().describe("Whether the field is required"),
9414
- inputHint: import_zod26.z.enum([
10394
+ var createTypesParameters = import_zod29.z.object({
10395
+ key: import_zod29.z.string().min(2).max(256).describe("User-defined unique identifier for the type"),
10396
+ name: import_zod29.z.record(import_zod29.z.string()).describe("Type name (localized string, object with language codes as keys)"),
10397
+ description: import_zod29.z.record(import_zod29.z.string()).optional().describe("Type description (localized string)"),
10398
+ resourceTypeIds: import_zod29.z.array(import_zod29.z.string()).describe('Resource types that can be customized with this type. Example: ["category", "product"]'),
10399
+ fieldDefinitions: import_zod29.z.array(import_zod29.z.object({
10400
+ name: import_zod29.z.string().describe("Field name"),
10401
+ label: import_zod29.z.record(import_zod29.z.string()).describe("Localized label for the field"),
10402
+ required: import_zod29.z.boolean().optional().describe("Whether the field is required"),
10403
+ inputHint: import_zod29.z.enum([
9415
10404
  "SingleLine",
9416
10405
  "MultiLine"
9417
10406
  ]).optional().describe("Input hint for String fields"),
9418
- type: import_zod26.z.any().describe("Field type definition")
10407
+ type: import_zod29.z.any().describe("Field type definition")
9419
10408
  })).optional().describe("Array of field definitions")
9420
10409
  });
9421
- var updateTypesParameters = import_zod26.z.object({
9422
- id: import_zod26.z.string().optional().describe("The ID of the type to update"),
9423
- key: import_zod26.z.string().optional().describe("The key of the type to update"),
9424
- version: import_zod26.z.number().int().describe("The current version of the type"),
9425
- actions: import_zod26.z.array(import_zod26.z.object({
9426
- action: import_zod26.z.string().describe("The name of the update action to perform")
9427
- }).and(import_zod26.z.record(import_zod26.z.string(), import_zod26.z.any()).optional()).describe('Array of update actions to perform on the type. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
10410
+ var updateTypesParameters = import_zod29.z.object({
10411
+ id: import_zod29.z.string().optional().describe("The ID of the type to update"),
10412
+ key: import_zod29.z.string().optional().describe("The key of the type to update"),
10413
+ version: import_zod29.z.number().int().describe("The current version of the type"),
10414
+ actions: import_zod29.z.array(import_zod29.z.object({
10415
+ action: import_zod29.z.string().describe("The name of the update action to perform")
10416
+ }).and(import_zod29.z.record(import_zod29.z.string(), import_zod29.z.any()).optional()).describe('Array of update actions to perform on the type. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
9428
10417
  });
9429
- var deleteTypesParameters = import_zod26.z.object({
9430
- id: import_zod26.z.string().optional().describe("Type ID"),
9431
- key: import_zod26.z.string().optional().describe("Type key"),
9432
- version: import_zod26.z.number().int().describe("Current version (for optimistic locking)")
10418
+ var deleteTypesParameters = import_zod29.z.object({
10419
+ id: import_zod29.z.string().optional().describe("Type ID"),
10420
+ key: import_zod29.z.string().optional().describe("Type key"),
10421
+ version: import_zod29.z.number().int().describe("Current version (for optimistic locking)")
9433
10422
  });
9434
10423
  // src/resources/types/types.prompt.ts
9435
10424
  var readTypesPrompt = '\nThis tool will fetch a Type by ID or key (if provided) from commercetools or query all available types in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the type to fetch.\n- key (string, optional): The key of the type to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["key = \\"my-type\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["key asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand.\n';
@@ -9774,37 +10763,37 @@ function deleteTypes(context, apiClientFactory) {
9774
10763
  })();
9775
10764
  }
9776
10765
  // src/resources/zones/zones.schema.ts
9777
- var import_zod27 = require("zod");
9778
- var readZonesParameters = import_zod27.z.object({
9779
- id: import_zod27.z.string().optional().describe("Zone ID"),
9780
- key: import_zod27.z.string().optional().describe("Zone key"),
9781
- where: import_zod27.z.array(import_zod27.z.string()).optional().describe('Query predicates specified as strings. Example: ["name = \\"Europe\\""]'),
9782
- sort: import_zod27.z.array(import_zod27.z.string()).optional().describe('Sort criteria for the results. Example: ["name asc", "createdAt desc"]'),
9783
- limit: import_zod27.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
9784
- offset: import_zod27.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
9785
- expand: import_zod27.z.array(import_zod27.z.string()).optional().describe("Fields to expand. Example: []")
10766
+ var import_zod30 = require("zod");
10767
+ var readZonesParameters = import_zod30.z.object({
10768
+ id: import_zod30.z.string().optional().describe("Zone ID"),
10769
+ key: import_zod30.z.string().optional().describe("Zone key"),
10770
+ where: import_zod30.z.array(import_zod30.z.string()).optional().describe('Query predicates specified as strings. Example: ["name = \\"Europe\\""]'),
10771
+ sort: import_zod30.z.array(import_zod30.z.string()).optional().describe('Sort criteria for the results. Example: ["name asc", "createdAt desc"]'),
10772
+ limit: import_zod30.z.number().int().min(1).max(500).optional().describe("A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."),
10773
+ offset: import_zod30.z.number().int().min(0).optional().describe("The number of items to skip before starting to collect the result set."),
10774
+ expand: import_zod30.z.array(import_zod30.z.string()).optional().describe("Fields to expand. Example: []")
9786
10775
  });
9787
- var createZonesParameters = import_zod27.z.object({
9788
- key: import_zod27.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the zone"),
9789
- name: import_zod27.z.string().describe("Zone name"),
9790
- description: import_zod27.z.string().optional().describe("Zone description"),
9791
- locations: import_zod27.z.array(import_zod27.z.object({
9792
- country: import_zod27.z.string().describe("Country code (ISO 3166-1 alpha-2)"),
9793
- state: import_zod27.z.string().optional().describe("State within the country")
10776
+ var createZonesParameters = import_zod30.z.object({
10777
+ key: import_zod30.z.string().min(2).max(256).optional().describe("User-defined unique identifier for the zone"),
10778
+ name: import_zod30.z.string().describe("Zone name"),
10779
+ description: import_zod30.z.string().optional().describe("Zone description"),
10780
+ locations: import_zod30.z.array(import_zod30.z.object({
10781
+ country: import_zod30.z.string().describe("Country code (ISO 3166-1 alpha-2)"),
10782
+ state: import_zod30.z.string().optional().describe("State within the country")
9794
10783
  })).optional().describe("Array of locations (countries and optionally states)")
9795
10784
  });
9796
- var updateZonesParameters = import_zod27.z.object({
9797
- id: import_zod27.z.string().optional().describe("The ID of the zone to update"),
9798
- key: import_zod27.z.string().optional().describe("The key of the zone to update"),
9799
- version: import_zod27.z.number().int().describe("The current version of the zone"),
9800
- actions: import_zod27.z.array(import_zod27.z.object({
9801
- action: import_zod27.z.string().describe("The name of the update action to perform")
9802
- }).and(import_zod27.z.record(import_zod27.z.string(), import_zod27.z.any()).optional()).describe('Array of update actions to perform on the zone. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
10785
+ var updateZonesParameters = import_zod30.z.object({
10786
+ id: import_zod30.z.string().optional().describe("The ID of the zone to update"),
10787
+ key: import_zod30.z.string().optional().describe("The key of the zone to update"),
10788
+ version: import_zod30.z.number().int().describe("The current version of the zone"),
10789
+ actions: import_zod30.z.array(import_zod30.z.object({
10790
+ action: import_zod30.z.string().describe("The name of the update action to perform")
10791
+ }).and(import_zod30.z.record(import_zod30.z.string(), import_zod30.z.any()).optional()).describe('Array of update actions to perform on the zone. Each action should have an "action" field and other fields specific to that action type.')).describe("Update actions")
9803
10792
  });
9804
- var deleteZonesParameters = import_zod27.z.object({
9805
- id: import_zod27.z.string().optional().describe("Zone ID"),
9806
- key: import_zod27.z.string().optional().describe("Zone key"),
9807
- version: import_zod27.z.number().int().describe("Current version (for optimistic locking)")
10793
+ var deleteZonesParameters = import_zod30.z.object({
10794
+ id: import_zod30.z.string().optional().describe("Zone ID"),
10795
+ key: import_zod30.z.string().optional().describe("Zone key"),
10796
+ version: import_zod30.z.number().int().describe("Current version (for optimistic locking)")
9808
10797
  });
9809
10798
  // src/resources/zones/zones.prompt.ts
9810
10799
  var readZonesPrompt = '\nThis tool will fetch a Zone by ID or key (if provided) from commercetools or query all available zones in a commercetools project if no arguments or parameters are provided.\n\nIt takes these optional arguments:\n- id (string, optional): The ID of the zone to fetch.\n- key (string, optional): The key of the zone to fetch.\n- where (array of strings, optional): Query predicates specified as strings. Example: ["name = \\"Europe\\""]\n- sort (array of strings, optional): Sort criteria for the results. Example: ["name asc", "createdAt desc"]\n- limit (integer, optional): A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20.\n- offset (integer, optional): The number of items to skip before starting to collect the result set.\n- expand (array of strings, optional): Fields to expand.\n';
@@ -10153,11 +11142,15 @@ function deleteZones(context, apiClientFactory) {
10153
11142
  ApiClientFactory: ApiClientFactory,
10154
11143
  AttributeGroupsHandler: AttributeGroupsHandler,
10155
11144
  BaseResourceHandler: BaseResourceHandler,
11145
+ CartsHandler: CartsHandler,
10156
11146
  CategoriesHandler: CategoriesHandler,
10157
11147
  ChannelsHandler: ChannelsHandler,
10158
11148
  CommercetoolsAPIClient: CommercetoolsAPIClient,
10159
11149
  CustomObjectsHandler: CustomObjectsHandler,
11150
+ CustomerGroupsHandler: CustomerGroupsHandler,
11151
+ CustomerSearchHandler: CustomerSearchHandler,
10160
11152
  CustomersHandler: CustomersHandler,
11153
+ DEFAULT_API_URL: DEFAULT_API_URL,
10161
11154
  DiscountCodesHandler: DiscountCodesHandler,
10162
11155
  ExtensionsHandler: ExtensionsHandler,
10163
11156
  InventoryHandler: InventoryHandler,
@@ -10183,9 +11176,12 @@ function deleteZones(context, apiClientFactory) {
10183
11176
  TypesHandler: TypesHandler,
10184
11177
  ZonesHandler: ZonesHandler,
10185
11178
  createAttributeGroups: createAttributeGroups,
11179
+ createCarts: createCarts,
10186
11180
  createCategories: createCategories,
10187
11181
  createChannels: createChannels,
10188
11182
  createCustomObjects: createCustomObjects,
11183
+ createCustomerGroups: createCustomerGroups,
11184
+ createCustomerSearch: createCustomerSearch,
10189
11185
  createCustomers: createCustomers,
10190
11186
  createDiscountCodes: createDiscountCodes,
10191
11187
  createExtensions: createExtensions,
@@ -10207,9 +11203,12 @@ function deleteZones(context, apiClientFactory) {
10207
11203
  createTypes: createTypes,
10208
11204
  createZones: createZones,
10209
11205
  deleteAttributeGroups: deleteAttributeGroups,
11206
+ deleteCarts: deleteCarts,
10210
11207
  deleteCategories: deleteCategories,
10211
11208
  deleteChannels: deleteChannels,
10212
11209
  deleteCustomObjects: deleteCustomObjects,
11210
+ deleteCustomerGroups: deleteCustomerGroups,
11211
+ deleteCustomerSearch: deleteCustomerSearch,
10213
11212
  deleteCustomers: deleteCustomers,
10214
11213
  deleteDiscountCodes: deleteDiscountCodes,
10215
11214
  deleteExtensions: deleteExtensions,
@@ -10232,9 +11231,12 @@ function deleteZones(context, apiClientFactory) {
10232
11231
  deleteZones: deleteZones,
10233
11232
  getDecoratorRegisteredHandlers: getDecoratorRegisteredHandlers,
10234
11233
  readAttributeGroups: readAttributeGroups,
11234
+ readCarts: readCarts,
10235
11235
  readCategories: readCategories,
10236
11236
  readChannels: readChannels,
10237
11237
  readCustomObjects: readCustomObjects,
11238
+ readCustomerGroups: readCustomerGroups,
11239
+ readCustomerSearch: readCustomerSearch,
10238
11240
  readCustomers: readCustomers,
10239
11241
  readDiscountCodes: readDiscountCodes,
10240
11242
  readExtensions: readExtensions,
@@ -10257,9 +11259,12 @@ function deleteZones(context, apiClientFactory) {
10257
11259
  readTypes: readTypes,
10258
11260
  readZones: readZones,
10259
11261
  updateAttributeGroups: updateAttributeGroups,
11262
+ updateCarts: updateCarts,
10260
11263
  updateCategories: updateCategories,
10261
11264
  updateChannels: updateChannels,
10262
11265
  updateCustomObjects: updateCustomObjects,
11266
+ updateCustomerGroups: updateCustomerGroups,
11267
+ updateCustomerSearch: updateCustomerSearch,
10263
11268
  updateCustomers: updateCustomers,
10264
11269
  updateDiscountCodes: updateDiscountCodes,
10265
11270
  updateExtensions: updateExtensions,