@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.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // src/utils/constants.ts
2
2
  var TOOL_NAME_PREFIX = "";
3
3
  var OPERATIONS = ["read", "create", "update", "delete"];
4
+ var DEFAULT_API_URL = "https://api.europe-west1.gcp.commercetools.com";
4
5
 
5
6
  // src/handlers/base.handler.ts
6
7
  var BaseResourceHandler = class {
@@ -182,14 +183,9 @@ var CommercetoolsAPIClient = class {
182
183
  configuration;
183
184
  authToken;
184
185
  constructor(configuration, authToken) {
185
- this.configuration = {
186
- projectKey: configuration.projectKey,
187
- allowedTools: [],
188
- metadata: configuration.metadata,
189
- ...configuration
190
- };
191
186
  this.authToken = authToken;
192
187
  this.client = this.createClient();
188
+ this.configuration = configuration;
193
189
  if (!this.client) {
194
190
  throw new Error("Failed to create commercetools client");
195
191
  }
@@ -220,12 +216,12 @@ var CommercetoolsAPIClient = class {
220
216
  * Create commercetools client
221
217
  */
222
218
  createClient() {
223
- var _a;
224
- const apiUrl = ((_a = this.configuration.metadata) == null ? void 0 : _a.apiUrl) || "https://api.europe-west1.gcp.commercetools.com";
225
219
  const httpMiddlewareOptions = {
226
- host: apiUrl
220
+ host: DEFAULT_API_URL
227
221
  };
228
- const client = new ClientBuilder().withHttpMiddleware(httpMiddlewareOptions).withConcurrentModificationMiddleware().withCorrelationIdMiddleware().withUserAgentMiddleware({
222
+ const client = new ClientBuilder().withHttpMiddleware(httpMiddlewareOptions).withConcurrentModificationMiddleware().withCorrelationIdMiddleware({
223
+ generate: () => this.configuration.correlationId
224
+ }).withUserAgentMiddleware({
229
225
  libraryName: "multitenant-mcp-service",
230
226
  libraryVersion: "1.0.0"
231
227
  });
@@ -686,33 +682,302 @@ async function deleteCategories(context, apiClientFactory) {
686
682
  return handler.delete(context);
687
683
  }
688
684
 
685
+ // src/resources/carts/carts.schema.ts
686
+ import { z as z3 } from "zod";
687
+ var readCartParameters = z3.object({
688
+ id: z3.string().optional().describe("Cart ID"),
689
+ key: z3.string().optional().describe("Cart key (user-defined unique identifier)"),
690
+ storeKey: z3.string().optional().describe(
691
+ "Store key. When provided, the request is executed in the context of that store (store-specific carts). Omit for project-level carts."
692
+ ),
693
+ where: z3.array(z3.string()).optional().describe(
694
+ 'Query predicates specified as strings. Example: ["customerId = \\"customer-123\\""] or ["key = \\"cart-key-1\\""]'
695
+ ),
696
+ sort: z3.array(z3.string()).optional().describe(
697
+ 'Sort criteria for the results. Example: ["createdAt desc", "lastModifiedAt desc"]'
698
+ ),
699
+ limit: z3.number().int().min(1).max(500).optional().describe(
700
+ "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
701
+ ),
702
+ offset: z3.number().int().min(0).optional().describe(
703
+ "The number of items to skip before starting to collect the result set."
704
+ ),
705
+ expand: z3.array(z3.string()).optional().describe(
706
+ 'Fields to expand. Example: ["lineItems[*].variant", "shippingInfo.shippingMethod", "discountCodes[*]"]'
707
+ )
708
+ });
709
+ var createCartParameters = z3.object({
710
+ storeKey: z3.string().optional().describe(
711
+ "Store key. When provided, the cart is created in the context of that store. Omit for project-level carts."
712
+ ),
713
+ body: z3.record(z3.any()).describe(
714
+ "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."
715
+ )
716
+ });
717
+ var updateCartParameters = z3.object({
718
+ id: z3.string().optional().describe("The ID of the cart to update"),
719
+ key: z3.string().optional().describe("The key of the cart to update"),
720
+ storeKey: z3.string().optional().describe("Store key when the cart is store-specific"),
721
+ version: z3.number().int().describe("The current version of the cart (for optimistic locking)"),
722
+ actions: z3.array(z3.record(z3.any())).optional().describe(
723
+ '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.'
724
+ )
725
+ });
726
+ var deleteCartParameters = z3.object({
727
+ id: z3.string().optional().describe("Cart ID (required if key is not provided)"),
728
+ key: z3.string().optional().describe("Cart key (required if id is not provided)"),
729
+ storeKey: z3.string().optional().describe("Store key when the cart is store-specific"),
730
+ version: z3.number().int().describe("Current version of the cart (for optimistic locking)"),
731
+ dataErasure: z3.boolean().optional().describe(
732
+ "When true, personal data (e.g. email, addresses) associated with the cart is deleted. Default is false."
733
+ )
734
+ });
735
+
736
+ // src/resources/carts/carts.prompt.ts
737
+ var readCartPrompt = `
738
+ This 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).
739
+
740
+ Carts hold line items, custom line items, shipping and billing addresses, and can be converted to orders. They can be project-level or store-specific.
741
+
742
+ It takes these optional arguments:
743
+ - id (string, optional): The ID of the cart to fetch.
744
+ - key (string, optional): The key of the cart to fetch (user-defined unique identifier).
745
+ - 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.
746
+ - where (array of strings, optional): Query predicates specified as strings. Example: ["customerId = \\"customer-123\\""] or ["key = \\"cart-key-1\\""]
747
+ - sort (array of strings, optional): Sort criteria for the results. Example: ["createdAt desc", "lastModifiedAt desc"]
748
+ - 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.
749
+ - offset (integer, optional): The number of items to skip before starting to collect the result set.
750
+ - expand (array of strings, optional): Fields to expand. Example: ["lineItems[*].variant", "shippingInfo.shippingMethod", "discountCodes[*]"]
751
+ `;
752
+ var createCartPrompt = `
753
+ This tool will create a new Cart in commercetools (optionally in a store when storeKey is provided).
754
+
755
+ A 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.
756
+
757
+ It takes these required arguments:
758
+ - body (object): Cart draft (CartDraft). Must include at least:
759
+ - currency (string): ISO 4217 currency code (e.g. "USD", "EUR").
760
+
761
+ It takes these optional arguments:
762
+ - 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.
763
+ - 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.
764
+ `;
765
+ var updateCartPrompt = `
766
+ This tool will update a Cart in commercetools using update actions.
767
+
768
+ It takes these required arguments:
769
+ - version (integer): The current version of the cart (for optimistic locking).
770
+ - Either id or key must be provided to identify the cart.
771
+
772
+ It takes these optional arguments:
773
+ - id (string, optional): The ID of the cart to update (required if key is not provided).
774
+ - key (string, optional): The key of the cart to update (required if id is not provided).
775
+ - storeKey (string, optional): The key of the store when the cart is store-specific.
776
+ - 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.
777
+
778
+ Example actions from the commercetools Cart API include:
779
+ - addLineItem: Add a line item. Fields: productId, variantId?, sku?, quantity?, supplyChannel?, distributionChannel?, custom?, addedAt?, shippingDetails?
780
+ - removeLineItem: Remove a line item. Fields: lineItemId, quantity?
781
+ - changeLineItemQuantity: Change line item quantity. Fields: lineItemId, quantity
782
+ - setLineItemShippingDetails: Set shipping details for a line item. Fields: lineItemId, shippingDetails?
783
+ - addCustomLineItem: Add a custom line item. Fields: name (LocalizedString), quantity, money, slug, taxCategory?, externalTaxRate?, custom?
784
+ - removeCustomLineItem: Remove a custom line item. Fields: customLineItemId
785
+ - setShippingAddress: Set shipping address. Fields: address?
786
+ - setBillingAddress: Set billing address. Fields: address?
787
+ - setShippingMethod: Set shipping method. Fields: shippingMethod?, externalTaxRate?
788
+ - addDiscountCode: Add a discount code. Fields: code
789
+ - removeDiscountCode: Remove a discount code. Fields: discountCode (Reference)
790
+ - recalculate: Recalculate cart (prices, taxes, totals). Fields: updateProductData?
791
+ - setKey: Set cart key. Fields: key?
792
+ - setCustomerId: Set customer ID. Fields: customerId?
793
+ - setCustomerEmail: Set customer email. Fields: email?
794
+ - setCustomType: Set custom type. Fields: type?, fields?
795
+ - setCustomField: Set custom field. Fields: name, value?
796
+ - setLocale: Set locale. Fields: locale?
797
+ - setDeleteDaysAfterLastModification: Set delete days. Fields: deleteDaysAfterLastModification?
798
+ - setItemShippingAddress: Set item shipping address. Fields: addressKey, address?
799
+ - addItemShippingAddress: Add item shipping address. Fields: address
800
+ - removeItemShippingAddress: Remove item shipping address. Fields: addressKey
801
+
802
+ Each action type requires specific fields according to the commercetools API documentation.
803
+ `;
804
+ var deleteCartPrompt = `
805
+ This tool will delete a Cart from commercetools.
806
+
807
+ It takes these required arguments:
808
+ - version (integer): The current version of the cart (for optimistic locking).
809
+ - Either id or key must be provided to identify the cart.
810
+
811
+ It takes these optional arguments:
812
+ - id (string, optional): The ID of the cart to delete (required if key is not provided).
813
+ - key (string, optional): The key of the cart to delete (required if id is not provided).
814
+ - storeKey (string, optional): The key of the store when the cart is store-specific.
815
+ - dataErasure (boolean, optional): When true, personal data (e.g. email, addresses) associated with the cart is deleted. Default is false.
816
+ `;
817
+
818
+ // src/resources/carts/carts.handler.ts
819
+ var CartsHandler = class extends CommercetoolsResourceHandler {
820
+ metadata = {
821
+ namespace: "carts",
822
+ description: "Manage carts in commercetools",
823
+ toolNamePrefix: TOOL_NAME_PREFIX,
824
+ schemas: {
825
+ read: readCartParameters,
826
+ create: createCartParameters,
827
+ update: updateCartParameters,
828
+ delete: deleteCartParameters
829
+ }
830
+ };
831
+ constructor(apiClientFactory) {
832
+ super(apiClientFactory);
833
+ }
834
+ getToolDefinition(operation) {
835
+ const prompts = {
836
+ read: readCartPrompt,
837
+ create: createCartPrompt,
838
+ update: updateCartPrompt,
839
+ delete: deleteCartPrompt
840
+ };
841
+ return {
842
+ name: this.getToolName(operation),
843
+ description: prompts[operation],
844
+ inputSchema: this.metadata.schemas[operation]
845
+ };
846
+ }
847
+ getCartsApi(api, storeKey) {
848
+ return storeKey ? api.inStoreKeyWithStoreKeyValue({ storeKey }).carts() : api.carts();
849
+ }
850
+ async read(context) {
851
+ const api = this.getApiRoot(context).withProjectKey({
852
+ projectKey: context.configuration.projectKey
853
+ });
854
+ const params = context.parameters;
855
+ try {
856
+ const cartsApi = this.getCartsApi(api, params.storeKey);
857
+ if (params == null ? void 0 : params.id) {
858
+ const res2 = await cartsApi.withId({ ID: params.id }).get({
859
+ queryArgs: { ...params.expand && { expand: params.expand } }
860
+ }).execute();
861
+ return res2.body;
862
+ }
863
+ if (params == null ? void 0 : params.key) {
864
+ const res2 = await cartsApi.withKey({ key: params.key }).get({
865
+ queryArgs: { ...params.expand && { expand: params.expand } }
866
+ }).execute();
867
+ return res2.body;
868
+ }
869
+ const res = await cartsApi.get({
870
+ queryArgs: {
871
+ limit: params.limit ?? 20,
872
+ ...params.offset != null && { offset: params.offset },
873
+ ...params.sort && { sort: params.sort },
874
+ ...params.where && { where: params.where },
875
+ ...params.expand && { expand: params.expand }
876
+ }
877
+ }).execute();
878
+ return res.body;
879
+ } catch (err) {
880
+ throw new ToolExecutionError("Failed to read cart", context, err);
881
+ }
882
+ }
883
+ async create(context) {
884
+ const api = this.getApiRoot(context).withProjectKey({
885
+ projectKey: context.configuration.projectKey
886
+ });
887
+ const params = context.parameters;
888
+ try {
889
+ const cartsApi = this.getCartsApi(api, params.storeKey);
890
+ const created = await cartsApi.post({
891
+ body: params.body
892
+ }).execute();
893
+ return created.body;
894
+ } catch (err) {
895
+ throw new ToolExecutionError("Failed to create cart", context, err);
896
+ }
897
+ }
898
+ async update(context) {
899
+ const api = this.getApiRoot(context).withProjectKey({
900
+ projectKey: context.configuration.projectKey
901
+ });
902
+ const params = context.parameters;
903
+ try {
904
+ const cartsApi = this.getCartsApi(api, params.storeKey);
905
+ let cartId;
906
+ let version = params.version;
907
+ if (params.id) {
908
+ cartId = params.id;
909
+ } else if (params.key) {
910
+ const res = await cartsApi.withKey({ key: params.key }).get().execute();
911
+ cartId = res.body.id;
912
+ version = res.body.version;
913
+ } else {
914
+ throw new ToolExecutionError(
915
+ "Either id or key must be provided",
916
+ context
917
+ );
918
+ }
919
+ const updated = await cartsApi.withId({ ID: cartId }).post({
920
+ body: {
921
+ version,
922
+ actions: params.actions ?? []
923
+ }
924
+ }).execute();
925
+ return updated.body;
926
+ } catch (err) {
927
+ throw new ToolExecutionError("Failed to update cart", context, err);
928
+ }
929
+ }
930
+ async delete(context) {
931
+ throw new ToolExecutionError(
932
+ "Delete operation not implemented for carts",
933
+ context
934
+ );
935
+ }
936
+ };
937
+ async function readCarts(context, apiClientFactory) {
938
+ const handler = new CartsHandler(apiClientFactory);
939
+ return handler.read(context);
940
+ }
941
+ async function createCarts(context, apiClientFactory) {
942
+ const handler = new CartsHandler(apiClientFactory);
943
+ return handler.create(context);
944
+ }
945
+ async function updateCarts(context, apiClientFactory) {
946
+ const handler = new CartsHandler(apiClientFactory);
947
+ return handler.update(context);
948
+ }
949
+ async function deleteCarts(context, apiClientFactory) {
950
+ const handler = new CartsHandler(apiClientFactory);
951
+ return handler.delete(context);
952
+ }
953
+
689
954
  // src/resources/channels/channels.handler.ts
690
- import { z as z4 } from "zod";
955
+ import { z as z5 } from "zod";
691
956
 
692
957
  // src/resources/channels/channels.schema.ts
693
- import { z as z3 } from "zod";
694
- var readChannelsParameters = z3.object({
695
- id: z3.string().optional(),
696
- key: z3.string().optional(),
697
- where: z3.array(z3.string()).optional(),
698
- sort: z3.array(z3.string()).optional(),
699
- limit: z3.number().int().min(1).max(500).optional(),
700
- offset: z3.number().int().optional(),
701
- expand: z3.array(z3.string()).optional()
958
+ import { z as z4 } from "zod";
959
+ var readChannelsParameters = z4.object({
960
+ id: z4.string().optional(),
961
+ key: z4.string().optional(),
962
+ where: z4.array(z4.string()).optional(),
963
+ sort: z4.array(z4.string()).optional(),
964
+ limit: z4.number().int().min(1).max(500).optional(),
965
+ offset: z4.number().int().optional(),
966
+ expand: z4.array(z4.string()).optional()
702
967
  });
703
- var createChannelsParameters = z3.object({
704
- body: z3.record(z3.any())
968
+ var createChannelsParameters = z4.object({
969
+ body: z4.record(z4.any())
705
970
  });
706
- var updateChannelsParameters = z3.object({
707
- id: z3.string().optional(),
708
- key: z3.string().optional(),
709
- version: z3.number().optional(),
710
- actions: z3.array(z3.record(z3.any())).optional()
971
+ var updateChannelsParameters = z4.object({
972
+ id: z4.string().optional(),
973
+ key: z4.string().optional(),
974
+ version: z4.number().optional(),
975
+ actions: z4.array(z4.record(z4.any())).optional()
711
976
  });
712
- var deleteChannelsParameters = z3.object({
713
- id: z3.string().optional(),
714
- key: z3.string().optional(),
715
- version: z3.number().optional()
977
+ var deleteChannelsParameters = z4.object({
978
+ id: z4.string().optional(),
979
+ key: z4.string().optional(),
980
+ version: z4.number().optional()
716
981
  });
717
982
 
718
983
  // src/resources/channels/channels.prompt.ts
@@ -798,7 +1063,7 @@ var ChannelsHandler = class extends CommercetoolsResourceHandler {
798
1063
  read: readChannelsParameters,
799
1064
  create: createChannelsParameters,
800
1065
  update: updateChannelsParameters,
801
- delete: z4.object({})
1066
+ delete: z5.object({})
802
1067
  }
803
1068
  };
804
1069
  constructor(apiClientFactory) {
@@ -908,34 +1173,34 @@ async function deleteChannels(context, apiClientFactory) {
908
1173
  }
909
1174
 
910
1175
  // src/resources/custom-objects/custom-objects.schema.ts
911
- import { z as z5 } from "zod";
912
- var readCustomObjectsParameters = z5.object({
913
- container: z5.string().optional(),
914
- key: z5.string().optional(),
915
- id: z5.string().optional(),
916
- where: z5.array(z5.string()).optional(),
917
- sort: z5.array(z5.string()).optional(),
918
- limit: z5.number().int().min(1).max(500).optional(),
919
- offset: z5.number().int().optional(),
920
- expand: z5.array(z5.string()).optional()
1176
+ import { z as z6 } from "zod";
1177
+ var readCustomObjectsParameters = z6.object({
1178
+ container: z6.string().optional(),
1179
+ key: z6.string().optional(),
1180
+ id: z6.string().optional(),
1181
+ where: z6.array(z6.string()).optional(),
1182
+ sort: z6.array(z6.string()).optional(),
1183
+ limit: z6.number().int().min(1).max(500).optional(),
1184
+ offset: z6.number().int().optional(),
1185
+ expand: z6.array(z6.string()).optional()
921
1186
  });
922
- var createCustomObjectsParameters = z5.object({
923
- container: z5.string().describe("Container name (namespace)"),
924
- key: z5.string().describe("User-defined key"),
925
- value: z5.any().describe("JSON-serializable value")
1187
+ var createCustomObjectsParameters = z6.object({
1188
+ container: z6.string().describe("Container name (namespace)"),
1189
+ key: z6.string().describe("User-defined key"),
1190
+ value: z6.any().describe("JSON-serializable value")
926
1191
  });
927
- var updateCustomObjectsParameters = z5.object({
928
- container: z5.string().optional(),
929
- key: z5.string().optional(),
930
- id: z5.string().optional(),
931
- version: z5.number().optional(),
932
- value: z5.any().optional()
1192
+ var updateCustomObjectsParameters = z6.object({
1193
+ container: z6.string().optional(),
1194
+ key: z6.string().optional(),
1195
+ id: z6.string().optional(),
1196
+ version: z6.number().optional(),
1197
+ value: z6.any().optional()
933
1198
  });
934
- var deleteCustomObjectsParameters = z5.object({
935
- container: z5.string().optional(),
936
- key: z5.string().optional(),
937
- id: z5.string().optional(),
938
- version: z5.number().optional()
1199
+ var deleteCustomObjectsParameters = z6.object({
1200
+ container: z6.string().optional(),
1201
+ key: z6.string().optional(),
1202
+ id: z6.string().optional(),
1203
+ version: z6.number().optional()
939
1204
  });
940
1205
 
941
1206
  // src/resources/custom-objects/custom-objects.prompt.ts
@@ -1172,7 +1437,7 @@ var CustomObjectsHandler = class extends CommercetoolsResourceHandler {
1172
1437
  }
1173
1438
  async delete(context) {
1174
1439
  throw new ToolExecutionError(
1175
- "Delete not supported for custom objects",
1440
+ "Delete operation not implemented for custom objects",
1176
1441
  context
1177
1442
  );
1178
1443
  }
@@ -1195,94 +1460,94 @@ async function deleteCustomObjects(context, apiClientFactory) {
1195
1460
  }
1196
1461
 
1197
1462
  // src/resources/customers/customers.schema.ts
1198
- import { z as z6 } from "zod";
1199
- var readCustomerParameters = z6.object({
1200
- id: z6.string().optional().describe("Customer ID"),
1201
- key: z6.string().optional().describe("Customer key"),
1202
- storeKey: z6.string().optional().describe("Store key"),
1203
- where: z6.array(z6.string()).optional().describe(
1463
+ import { z as z7 } from "zod";
1464
+ var readCustomerParameters = z7.object({
1465
+ id: z7.string().optional().describe("Customer ID"),
1466
+ key: z7.string().optional().describe("Customer key"),
1467
+ storeKey: z7.string().optional().describe("Store key"),
1468
+ where: z7.array(z7.string()).optional().describe(
1204
1469
  'Query predicates specified as strings. Example: ["email = \\"customer@example.com\\""]'
1205
1470
  ),
1206
- sort: z6.array(z6.string()).optional().describe(
1471
+ sort: z7.array(z7.string()).optional().describe(
1207
1472
  'Sort criteria for the results. Example: ["firstName asc", "createdAt desc"]'
1208
1473
  ),
1209
- limit: z6.number().int().min(1).max(500).optional().describe(
1474
+ limit: z7.number().int().min(1).max(500).optional().describe(
1210
1475
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10."
1211
1476
  ),
1212
- offset: z6.number().int().min(0).optional().describe(
1477
+ offset: z7.number().int().min(0).optional().describe(
1213
1478
  "The number of items to skip before starting to collect the result set."
1214
1479
  ),
1215
- expand: z6.array(z6.string()).optional().describe('Fields to expand. Example: ["customerGroup"]')
1480
+ expand: z7.array(z7.string()).optional().describe('Fields to expand. Example: ["customerGroup"]')
1216
1481
  });
1217
- var createCustomerParameters = z6.object({
1218
- email: z6.string().email().describe("Customer email address"),
1219
- storeKey: z6.string().optional().describe("Store key"),
1220
- password: z6.string().describe("Customer password"),
1221
- firstName: z6.string().optional().describe("Customer first name"),
1222
- lastName: z6.string().optional().describe("Customer last name"),
1223
- middleName: z6.string().optional().describe("Customer middle name"),
1224
- title: z6.string().optional().describe("Customer title (e.g., Mr., Mrs., Dr.)"),
1225
- dateOfBirth: z6.string().optional().describe("Customer date of birth in ISO 8601 format (YYYY-MM-DD)"),
1226
- companyName: z6.string().optional().describe("Customer company name"),
1227
- vatId: z6.string().optional().describe("Customer VAT identification number"),
1228
- addresses: z6.array(
1229
- z6.object({
1230
- streetName: z6.string().describe("Street name"),
1231
- streetNumber: z6.string().optional().describe("Street number"),
1232
- additionalStreetInfo: z6.string().optional().describe("Additional street information"),
1233
- postalCode: z6.string().describe("Postal code"),
1234
- city: z6.string().describe("City"),
1235
- region: z6.string().optional().describe("Region"),
1236
- state: z6.string().optional().describe("State"),
1237
- country: z6.string().describe("Country code (ISO 3166-1 alpha-2)"),
1238
- company: z6.string().optional().describe("Company name"),
1239
- department: z6.string().optional().describe("Department"),
1240
- building: z6.string().optional().describe("Building"),
1241
- apartment: z6.string().optional().describe("Apartment"),
1242
- pOBox: z6.string().optional().describe("P.O. Box"),
1243
- phone: z6.string().optional().describe("Phone"),
1244
- mobile: z6.string().optional().describe("Mobile phone"),
1245
- email: z6.string().email().optional().describe("Email"),
1246
- fax: z6.string().optional().describe("Fax"),
1247
- additionalAddressInfo: z6.string().optional().describe("Additional address information")
1482
+ var createCustomerParameters = z7.object({
1483
+ email: z7.string().email().describe("Customer email address"),
1484
+ storeKey: z7.string().optional().describe("Store key"),
1485
+ password: z7.string().describe("Customer password"),
1486
+ firstName: z7.string().optional().describe("Customer first name"),
1487
+ lastName: z7.string().optional().describe("Customer last name"),
1488
+ middleName: z7.string().optional().describe("Customer middle name"),
1489
+ title: z7.string().optional().describe("Customer title (e.g., Mr., Mrs., Dr.)"),
1490
+ dateOfBirth: z7.string().optional().describe("Customer date of birth in ISO 8601 format (YYYY-MM-DD)"),
1491
+ companyName: z7.string().optional().describe("Customer company name"),
1492
+ vatId: z7.string().optional().describe("Customer VAT identification number"),
1493
+ addresses: z7.array(
1494
+ z7.object({
1495
+ streetName: z7.string().describe("Street name"),
1496
+ streetNumber: z7.string().optional().describe("Street number"),
1497
+ additionalStreetInfo: z7.string().optional().describe("Additional street information"),
1498
+ postalCode: z7.string().describe("Postal code"),
1499
+ city: z7.string().describe("City"),
1500
+ region: z7.string().optional().describe("Region"),
1501
+ state: z7.string().optional().describe("State"),
1502
+ country: z7.string().describe("Country code (ISO 3166-1 alpha-2)"),
1503
+ company: z7.string().optional().describe("Company name"),
1504
+ department: z7.string().optional().describe("Department"),
1505
+ building: z7.string().optional().describe("Building"),
1506
+ apartment: z7.string().optional().describe("Apartment"),
1507
+ pOBox: z7.string().optional().describe("P.O. Box"),
1508
+ phone: z7.string().optional().describe("Phone"),
1509
+ mobile: z7.string().optional().describe("Mobile phone"),
1510
+ email: z7.string().email().optional().describe("Email"),
1511
+ fax: z7.string().optional().describe("Fax"),
1512
+ additionalAddressInfo: z7.string().optional().describe("Additional address information")
1248
1513
  })
1249
1514
  ).optional().describe("Customer addresses"),
1250
- defaultShippingAddress: z6.number().int().optional().describe("Index of default shipping address in the addresses array"),
1251
- defaultBillingAddress: z6.number().int().optional().describe("Index of default billing address in the addresses array"),
1252
- shippingAddresses: z6.array(z6.number().int()).optional().describe("Indices of shipping addresses in the addresses array"),
1253
- billingAddresses: z6.array(z6.number().int()).optional().describe("Indices of billing addresses in the addresses array"),
1254
- isEmailVerified: z6.boolean().optional().describe("Whether the customer email is verified"),
1255
- externalId: z6.string().optional().describe("Customer external ID"),
1256
- customerGroup: z6.object({
1257
- id: z6.string(),
1258
- typeId: z6.literal("customer-group")
1515
+ defaultShippingAddress: z7.number().int().optional().describe("Index of default shipping address in the addresses array"),
1516
+ defaultBillingAddress: z7.number().int().optional().describe("Index of default billing address in the addresses array"),
1517
+ shippingAddresses: z7.array(z7.number().int()).optional().describe("Indices of shipping addresses in the addresses array"),
1518
+ billingAddresses: z7.array(z7.number().int()).optional().describe("Indices of billing addresses in the addresses array"),
1519
+ isEmailVerified: z7.boolean().optional().describe("Whether the customer email is verified"),
1520
+ externalId: z7.string().optional().describe("Customer external ID"),
1521
+ customerGroup: z7.object({
1522
+ id: z7.string(),
1523
+ typeId: z7.literal("customer-group")
1259
1524
  }).optional().describe("Customer group reference"),
1260
- custom: z6.object({
1261
- type: z6.object({
1262
- id: z6.string(),
1263
- typeId: z6.literal("type")
1525
+ custom: z7.object({
1526
+ type: z7.object({
1527
+ id: z7.string(),
1528
+ typeId: z7.literal("type")
1264
1529
  }),
1265
- fields: z6.record(z6.string(), z6.any())
1530
+ fields: z7.record(z7.string(), z7.any())
1266
1531
  }).optional().describe("Custom fields"),
1267
- locale: z6.string().optional().describe("Customer locale"),
1268
- salutation: z6.string().optional().describe("Customer salutation"),
1269
- key: z6.string().optional().describe("Customer key")
1532
+ locale: z7.string().optional().describe("Customer locale"),
1533
+ salutation: z7.string().optional().describe("Customer salutation"),
1534
+ key: z7.string().optional().describe("Customer key")
1270
1535
  });
1271
- var updateCustomerParameters = z6.object({
1272
- id: z6.string().describe("The ID of the customer to update"),
1273
- version: z6.number().int().describe("The current version of the customer"),
1274
- actions: z6.array(
1275
- z6.object({
1276
- action: z6.string().describe("The name of the update action to perform")
1277
- }).and(z6.record(z6.string(), z6.any()).optional()).describe(
1536
+ var updateCustomerParameters = z7.object({
1537
+ id: z7.string().describe("The ID of the customer to update"),
1538
+ version: z7.number().int().describe("The current version of the customer"),
1539
+ actions: z7.array(
1540
+ z7.object({
1541
+ action: z7.string().describe("The name of the update action to perform")
1542
+ }).and(z7.record(z7.string(), z7.any()).optional()).describe(
1278
1543
  'Array of update actions to perform on the customer. Each action should have an "action" field and other fields specific to that action type.'
1279
1544
  )
1280
1545
  ).describe("Update actions")
1281
1546
  });
1282
- var deleteCustomerParameters = z6.object({
1283
- id: z6.string().describe("Customer ID"),
1284
- version: z6.number().int().describe("Current version (for optimistic locking)"),
1285
- dataErasure: z6.boolean().optional().describe("Delete personal data")
1547
+ var deleteCustomerParameters = z7.object({
1548
+ id: z7.string().describe("Customer ID"),
1549
+ version: z7.number().int().describe("Current version (for optimistic locking)"),
1550
+ dataErasure: z7.boolean().optional().describe("Delete personal data")
1286
1551
  });
1287
1552
 
1288
1553
  // src/resources/customers/customers.prompt.ts
@@ -1439,135 +1704,552 @@ var CustomersHandler = class extends CommercetoolsResourceHandler {
1439
1704
  );
1440
1705
  }
1441
1706
  }
1442
- async create(context) {
1707
+ async create(context) {
1708
+ const api = this.getApiRoot(context).withProjectKey({
1709
+ projectKey: context.configuration.projectKey
1710
+ });
1711
+ const params = context.parameters;
1712
+ try {
1713
+ const customer = await this.getCustomersApi(api, params.storeKey).post({
1714
+ body: params
1715
+ }).execute();
1716
+ return customer.body;
1717
+ } catch (error) {
1718
+ throw new ToolExecutionError(
1719
+ "Failed to create customers",
1720
+ context,
1721
+ error
1722
+ );
1723
+ }
1724
+ }
1725
+ async update(context) {
1726
+ const api = this.getApiRoot(context).withProjectKey({
1727
+ projectKey: context.configuration.projectKey
1728
+ });
1729
+ const params = context.parameters;
1730
+ try {
1731
+ const customer = await api.customers().withId({ ID: params.id }).get().execute();
1732
+ const currentVersion = customer.body.version;
1733
+ const updatedCustomer = await api.customers().withId({ ID: params.id }).post({
1734
+ body: {
1735
+ version: currentVersion,
1736
+ actions: params.actions
1737
+ }
1738
+ }).execute();
1739
+ return updatedCustomer.body;
1740
+ } catch (error) {
1741
+ throw new ToolExecutionError(
1742
+ "Failed to update customers",
1743
+ context,
1744
+ error
1745
+ );
1746
+ }
1747
+ }
1748
+ async delete(context) {
1749
+ throw new ToolExecutionError("Delete operation not implemented", context);
1750
+ }
1751
+ };
1752
+ async function readCustomers(context, apiClientFactory) {
1753
+ const handler = new CustomersHandler(apiClientFactory);
1754
+ return handler.read(context);
1755
+ }
1756
+ async function createCustomers(context, apiClientFactory) {
1757
+ const handler = new CustomersHandler(apiClientFactory);
1758
+ return handler.create(context);
1759
+ }
1760
+ async function updateCustomers(context, apiClientFactory) {
1761
+ const handler = new CustomersHandler(apiClientFactory);
1762
+ return handler.update(context);
1763
+ }
1764
+ async function deleteCustomers(context, apiClientFactory) {
1765
+ const handler = new CustomersHandler(apiClientFactory);
1766
+ return handler.delete(context);
1767
+ }
1768
+
1769
+ // src/resources/customer-groups/customer-groups.schema.ts
1770
+ import { z as z8 } from "zod";
1771
+ var readCustomerGroupsParameters = z8.object({
1772
+ id: z8.string().optional().describe("Customer group ID"),
1773
+ key: z8.string().optional().describe("Customer group key"),
1774
+ where: z8.array(z8.string()).optional().describe(
1775
+ 'Query predicates specified as strings. Example: ["key = \\"vip\\""] or ["name = \\"VIP Customers\\""]'
1776
+ ),
1777
+ sort: z8.array(z8.string()).optional().describe(
1778
+ 'Sort criteria for the results. Example: ["name asc", "createdAt desc", "key asc"]'
1779
+ ),
1780
+ limit: z8.number().int().min(1).max(500).optional().describe(
1781
+ "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
1782
+ ),
1783
+ offset: z8.number().int().min(0).optional().describe(
1784
+ "The number of items to skip before starting to collect the result set."
1785
+ ),
1786
+ expand: z8.array(z8.string()).optional().describe(
1787
+ "Fields to expand. Customer groups have no reference expansions by default."
1788
+ )
1789
+ });
1790
+ var createCustomerGroupsParameters = z8.object({
1791
+ groupName: z8.string().min(1).describe(
1792
+ "Unique name of the customer group. Must be different from any existing group name in the project."
1793
+ ),
1794
+ key: z8.string().min(2).max(256).optional().describe(
1795
+ "User-defined unique identifier for the customer group (2-256 characters, alphanumeric with underscores/hyphens)."
1796
+ ),
1797
+ custom: z8.object({
1798
+ type: z8.object({
1799
+ id: z8.string().describe("ID of the custom type"),
1800
+ typeId: z8.literal("type")
1801
+ }),
1802
+ fields: z8.record(z8.string(), z8.any()).optional().describe("Custom field values")
1803
+ }).optional().describe(
1804
+ 'Custom fields for the customer group. Requires a Type with resourceTypeIds including "customer-group".'
1805
+ )
1806
+ });
1807
+ var updateCustomerGroupsParameters = z8.object({
1808
+ id: z8.string().optional().describe("The ID of the customer group to update"),
1809
+ key: z8.string().optional().describe("The key of the customer group to update"),
1810
+ version: z8.number().int().describe(
1811
+ "The current version of the customer group (for optimistic locking)"
1812
+ ),
1813
+ actions: z8.array(
1814
+ z8.object({
1815
+ action: z8.string().describe("The name of the update action to perform")
1816
+ }).and(z8.record(z8.string(), z8.any()).optional()).describe(
1817
+ '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").'
1818
+ )
1819
+ ).describe("Update actions")
1820
+ });
1821
+ var deleteCustomerGroupsParameters = z8.object({
1822
+ id: z8.string().optional().describe("Customer group ID (required if key is not provided)"),
1823
+ key: z8.string().optional().describe("Customer group key (required if id is not provided)"),
1824
+ version: z8.number().int().describe(
1825
+ "Current version of the customer group (for optimistic locking)."
1826
+ )
1827
+ });
1828
+
1829
+ // src/resources/customer-groups/customer-groups.prompt.ts
1830
+ var readCustomerGroupsPrompt = `
1831
+ This 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.
1832
+
1833
+ Customer 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.
1834
+
1835
+ It takes these optional arguments:
1836
+ - id (string, optional): The ID of the customer group to fetch.
1837
+ - key (string, optional): The key of the customer group to fetch.
1838
+ - where (array of strings, optional): Query predicates specified as strings. Example: ["key = \\"vip\\""] or ["name = \\"VIP Customers\\""]
1839
+ - sort (array of strings, optional): Sort criteria for the results. Example: ["name asc", "createdAt desc", "key asc"]
1840
+ - 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.
1841
+ - offset (integer, optional): The number of items to skip before starting to collect the result set.
1842
+ - expand (array of strings, optional): Fields to expand. Customer groups typically have no reference fields to expand.
1843
+ `;
1844
+ var createCustomerGroupsPrompt = `
1845
+ This tool will create a new Customer Group in commercetools.
1846
+
1847
+ Customer groups segment customers for pricing, promotions, or reporting. Common examples include "VIP", "Wholesale", or "B2B".
1848
+
1849
+ It takes these required arguments:
1850
+ - groupName (string): Unique name of the customer group. Must be different from any existing group name in the project.
1851
+
1852
+ It takes these optional arguments:
1853
+ - 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.
1854
+ - 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".
1855
+ `;
1856
+ var updateCustomerGroupsPrompt = `
1857
+ This tool will update a Customer Group in commercetools using update actions from the commercetools API.
1858
+
1859
+ It takes these required arguments:
1860
+ - version (integer): The current version of the customer group (for optimistic locking).
1861
+ - 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.
1862
+
1863
+ It takes these optional arguments:
1864
+ - id (string, optional): The ID of the customer group to update (required if key is not provided).
1865
+ - key (string, optional): The key of the customer group to update (required if id is not provided).
1866
+
1867
+ Example actions from the commercetools API include:
1868
+ - changeName: Change the name of the customer group. Requires "name" (string).
1869
+ - setKey: Set or change the key. Requires "key" (string, optional; omit or set to null to remove).
1870
+ - setCustomType: Set custom type and fields. Requires "type" (object with "id", "typeId") and optionally "fields" (object).
1871
+ - setCustomField: Set a custom field value. Requires "name" (string) and "value" (any; use null to remove).
1872
+
1873
+ Each action type requires specific fields according to the commercetools API documentation.
1874
+ `;
1875
+ var deleteCustomerGroupsPrompt = `
1876
+ This tool will delete a Customer Group from commercetools.
1877
+
1878
+ Deleting 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.
1879
+
1880
+ It takes these required arguments:
1881
+ - version (integer): The current version of the customer group (for optimistic locking).
1882
+
1883
+ It takes these optional arguments:
1884
+ - id (string, optional): The ID of the customer group to delete (required if key is not provided).
1885
+ - key (string, optional): The key of the customer group to delete (required if id is not provided).
1886
+ `;
1887
+
1888
+ // src/resources/customer-groups/customer-groups.handler.ts
1889
+ var CustomerGroupsHandler = class extends CommercetoolsResourceHandler {
1890
+ metadata = {
1891
+ namespace: "customer-groups",
1892
+ description: "Manage customer groups in commercetools",
1893
+ toolNamePrefix: TOOL_NAME_PREFIX,
1894
+ schemas: {
1895
+ read: readCustomerGroupsParameters,
1896
+ create: createCustomerGroupsParameters,
1897
+ update: updateCustomerGroupsParameters,
1898
+ delete: deleteCustomerGroupsParameters
1899
+ }
1900
+ };
1901
+ constructor(apiClientFactory) {
1902
+ super(apiClientFactory);
1903
+ }
1904
+ getToolDefinition(operation) {
1905
+ const prompts = {
1906
+ read: readCustomerGroupsPrompt,
1907
+ create: createCustomerGroupsPrompt,
1908
+ update: updateCustomerGroupsPrompt,
1909
+ delete: deleteCustomerGroupsPrompt
1910
+ };
1911
+ return {
1912
+ name: this.getToolName(operation),
1913
+ description: prompts[operation],
1914
+ inputSchema: this.metadata.schemas[operation]
1915
+ };
1916
+ }
1917
+ getCustomerGroupsApi(api) {
1918
+ return api.customerGroups();
1919
+ }
1920
+ async read(context) {
1921
+ const api = this.getApiRoot(context).withProjectKey({
1922
+ projectKey: context.configuration.projectKey
1923
+ });
1924
+ const params = context.parameters;
1925
+ try {
1926
+ const apiResource = this.getCustomerGroupsApi(api);
1927
+ if (params == null ? void 0 : params.id) {
1928
+ const res2 = await apiResource.withId({ ID: params.id }).get({
1929
+ queryArgs: { ...params.expand && { expand: params.expand } }
1930
+ }).execute();
1931
+ return res2.body;
1932
+ }
1933
+ if (params == null ? void 0 : params.key) {
1934
+ const res2 = await apiResource.withKey({ key: params.key }).get({
1935
+ queryArgs: { ...params.expand && { expand: params.expand } }
1936
+ }).execute();
1937
+ return res2.body;
1938
+ }
1939
+ const res = await apiResource.get({
1940
+ queryArgs: {
1941
+ limit: params.limit ?? 20,
1942
+ ...params.offset != null && { offset: params.offset },
1943
+ ...params.sort && { sort: params.sort },
1944
+ ...params.where && { where: params.where },
1945
+ ...params.expand && { expand: params.expand }
1946
+ }
1947
+ }).execute();
1948
+ return res.body;
1949
+ } catch (err) {
1950
+ throw new ToolExecutionError(
1951
+ "Failed to read customer groups",
1952
+ context,
1953
+ err
1954
+ );
1955
+ }
1956
+ }
1957
+ async create(context) {
1958
+ const api = this.getApiRoot(context).withProjectKey({
1959
+ projectKey: context.configuration.projectKey
1960
+ });
1961
+ const params = context.parameters;
1962
+ try {
1963
+ const body = {
1964
+ groupName: params.groupName,
1965
+ ...params.key != null && { key: params.key },
1966
+ ...params.custom != null && { custom: params.custom }
1967
+ };
1968
+ const created = await this.getCustomerGroupsApi(api).post({
1969
+ body
1970
+ }).execute();
1971
+ return created.body;
1972
+ } catch (err) {
1973
+ throw new ToolExecutionError(
1974
+ "Failed to create customer group",
1975
+ context,
1976
+ err
1977
+ );
1978
+ }
1979
+ }
1980
+ async update(context) {
1981
+ const api = this.getApiRoot(context).withProjectKey({
1982
+ projectKey: context.configuration.projectKey
1983
+ });
1984
+ const params = context.parameters;
1985
+ try {
1986
+ const apiResource = this.getCustomerGroupsApi(api);
1987
+ let groupId;
1988
+ let version = params.version;
1989
+ if (params.id) {
1990
+ groupId = params.id;
1991
+ } else if (params.key) {
1992
+ const res = await apiResource.withKey({ key: params.key }).get().execute();
1993
+ groupId = res.body.id;
1994
+ version = res.body.version;
1995
+ } else {
1996
+ throw new ToolExecutionError(
1997
+ "Either id or key must be provided",
1998
+ context
1999
+ );
2000
+ }
2001
+ const updated = await apiResource.withId({ ID: groupId }).post({
2002
+ body: {
2003
+ version,
2004
+ actions: params.actions ?? []
2005
+ }
2006
+ }).execute();
2007
+ return updated.body;
2008
+ } catch (err) {
2009
+ throw new ToolExecutionError(
2010
+ "Failed to update customer group",
2011
+ context,
2012
+ err
2013
+ );
2014
+ }
2015
+ }
2016
+ async delete(context) {
2017
+ throw new ToolExecutionError(
2018
+ "Delete operation not implemented for customer groups",
2019
+ context
2020
+ );
2021
+ }
2022
+ };
2023
+ async function readCustomerGroups(context, apiClientFactory) {
2024
+ const handler = new CustomerGroupsHandler(apiClientFactory);
2025
+ return handler.read(context);
2026
+ }
2027
+ async function createCustomerGroups(context, apiClientFactory) {
2028
+ const handler = new CustomerGroupsHandler(apiClientFactory);
2029
+ return handler.create(context);
2030
+ }
2031
+ async function updateCustomerGroups(context, apiClientFactory) {
2032
+ const handler = new CustomerGroupsHandler(apiClientFactory);
2033
+ return handler.update(context);
2034
+ }
2035
+ async function deleteCustomerGroups(context, apiClientFactory) {
2036
+ const handler = new CustomerGroupsHandler(apiClientFactory);
2037
+ return handler.delete(context);
2038
+ }
2039
+
2040
+ // src/resources/customer-search/customer-search.schema.ts
2041
+ import { z as z9 } from "zod";
2042
+ var readCustomerSearchParameters = z9.object({
2043
+ query: z9.record(z9.any()).optional().describe(
2044
+ "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."
2045
+ ),
2046
+ sort: z9.array(z9.record(z9.any())).optional().describe(
2047
+ 'Sort criteria (SearchSorting). If not provided, results are sorted by relevance descending. Example: [{"field": "createdAt", "order": "desc"}]'
2048
+ ),
2049
+ limit: z9.number().int().min(1).max(100).optional().describe(
2050
+ "Maximum number of search results. Default: 20. Minimum: 1, Maximum: 100."
2051
+ ),
2052
+ offset: z9.number().int().min(0).max(9900).optional().describe(
2053
+ "Number of search results to skip for pagination. Default: 0. Minimum: 0, Maximum: 9900."
2054
+ )
2055
+ });
2056
+ var createCustomerSearchParameters = z9.object({}).describe("Customer Search does not support create operations");
2057
+ var updateCustomerSearchParameters = z9.object({}).describe("Customer Search does not support update operations");
2058
+ var deleteCustomerSearchParameters = z9.object({}).describe("Customer Search does not support delete operations");
2059
+
2060
+ // src/resources/customer-search/customer-search.prompt.ts
2061
+ var readCustomerSearchPrompt = `
2062
+ This 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.
2063
+
2064
+ The 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.
2065
+
2066
+ Customer 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.
2067
+
2068
+ It takes these optional arguments:
2069
+ - query (object, optional): Search query in the [Search Query Language](https://docs.commercetools.com/api/search-query-language). Examples:
2070
+ - Full-text on a field: { "fullText": { "field": "firstName", "value": "john" } }
2071
+ - Search in all text fields: { "fullText": { "field": "all", "value": "example" } }
2072
+ - Exact match (keyword): { "exact": { "field": "email", "value": "user@example.com" } } or { "exact": { "field": "id", "value": "customer-id" } }
2073
+ - Range (date/number): { "range": { "field": "createdAt", "gte": "2023-12-01T00:00:00.000Z", "lt": "2024-01-01T00:00:00.000Z" } }
2074
+ - Compound: { "and": [ { "fullText": { "field": "firstName", "value": "john" } }, { "exact": { "field": "customerGroup.id", "value": "group-id" } } ] } or { "or": [ ... ] }
2075
+ 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.
2076
+ - sort (array of objects, optional): Sort criteria (SearchSorting). If not provided, results are sorted by relevance descending. Example: [{"field": "createdAt", "order": "desc"}].
2077
+ - limit (integer, optional): Maximum number of results. Default: 20. Min: 1, Max: 100.
2078
+ - offset (integer, optional): Number of results to skip for pagination. Default: 0. Min: 0, Max: 9900.
2079
+
2080
+ If the index is not ready or the feature is inactive, a SearchNotReady error is returned.
2081
+ `;
2082
+ var createCustomerSearchPrompt = `
2083
+ Customer Search does not support create operations. This is a read-only search API. Use the Customers API (customers.create) to create customers.
2084
+ `;
2085
+ var updateCustomerSearchPrompt = `
2086
+ Customer Search does not support update operations. This is a read-only search API. Use the Customers API (customers.update) to update customers.
2087
+ `;
2088
+ var deleteCustomerSearchPrompt = `
2089
+ Customer Search does not support delete operations. This is a read-only search API. Use the Customers API (customers.delete) to delete customers.
2090
+ `;
2091
+
2092
+ // src/resources/customer-search/customer-search.handler.ts
2093
+ var CustomerSearchHandler = class extends CommercetoolsResourceHandler {
2094
+ metadata = {
2095
+ namespace: "customer-search",
2096
+ description: "Search customers in commercetools (back-office, ID-first)",
2097
+ toolNamePrefix: TOOL_NAME_PREFIX,
2098
+ schemas: {
2099
+ read: readCustomerSearchParameters,
2100
+ create: createCustomerSearchParameters,
2101
+ update: updateCustomerSearchParameters,
2102
+ delete: deleteCustomerSearchParameters
2103
+ }
2104
+ };
2105
+ constructor(apiClientFactory) {
2106
+ super(apiClientFactory);
2107
+ }
2108
+ getToolDefinition(operation) {
2109
+ const prompts = {
2110
+ read: readCustomerSearchPrompt,
2111
+ create: createCustomerSearchPrompt,
2112
+ update: updateCustomerSearchPrompt,
2113
+ delete: deleteCustomerSearchPrompt
2114
+ };
2115
+ return {
2116
+ name: this.getToolName(operation),
2117
+ description: prompts[operation],
2118
+ inputSchema: this.metadata.schemas[operation]
2119
+ };
2120
+ }
2121
+ getCustomerSearchApi(api) {
2122
+ return api.customers().search();
2123
+ }
2124
+ async read(context) {
1443
2125
  const api = this.getApiRoot(context).withProjectKey({
1444
2126
  projectKey: context.configuration.projectKey
1445
2127
  });
1446
2128
  const params = context.parameters;
1447
2129
  try {
1448
- const customer = await this.getCustomersApi(api, params.storeKey).post({
1449
- body: params
1450
- }).execute();
1451
- return customer.body;
1452
- } catch (error) {
2130
+ const body = {
2131
+ ...params.query != null && {
2132
+ query: params.query
2133
+ },
2134
+ ...params.sort != null && {
2135
+ sort: params.sort
2136
+ },
2137
+ ...params.limit != null && { limit: params.limit },
2138
+ ...params.offset != null && { offset: params.offset }
2139
+ };
2140
+ const searchResponse = await this.getCustomerSearchApi(api).post({ body }).execute();
2141
+ return searchResponse.body;
2142
+ } catch (err) {
1453
2143
  throw new ToolExecutionError(
1454
- "Failed to create customers",
2144
+ err.message || "Failed to search customers",
1455
2145
  context,
1456
- error
2146
+ err
1457
2147
  );
1458
2148
  }
1459
2149
  }
2150
+ async create(context) {
2151
+ throw new ToolExecutionError(
2152
+ "Create operation not supported for customer-search",
2153
+ context
2154
+ );
2155
+ }
1460
2156
  async update(context) {
1461
- const api = this.getApiRoot(context).withProjectKey({
1462
- projectKey: context.configuration.projectKey
1463
- });
1464
- const params = context.parameters;
1465
- try {
1466
- const customer = await api.customers().withId({ ID: params.id }).get().execute();
1467
- const currentVersion = customer.body.version;
1468
- const updatedCustomer = await api.customers().withId({ ID: params.id }).post({
1469
- body: {
1470
- version: currentVersion,
1471
- actions: params.actions
1472
- }
1473
- }).execute();
1474
- return updatedCustomer.body;
1475
- } catch (error) {
1476
- throw new ToolExecutionError(
1477
- "Failed to update customers",
1478
- context,
1479
- error
1480
- );
1481
- }
2157
+ throw new ToolExecutionError(
2158
+ "Update operation not supported for customer-search",
2159
+ context
2160
+ );
1482
2161
  }
1483
2162
  async delete(context) {
1484
- throw new ToolExecutionError("Delete operation not implemented", context);
2163
+ throw new ToolExecutionError(
2164
+ "Delete operation not supported for customer-search",
2165
+ context
2166
+ );
1485
2167
  }
1486
2168
  };
1487
- async function readCustomers(context, apiClientFactory) {
1488
- const handler = new CustomersHandler(apiClientFactory);
2169
+ async function readCustomerSearch(context, apiClientFactory) {
2170
+ const handler = new CustomerSearchHandler(apiClientFactory);
1489
2171
  return handler.read(context);
1490
2172
  }
1491
- async function createCustomers(context, apiClientFactory) {
1492
- const handler = new CustomersHandler(apiClientFactory);
2173
+ async function createCustomerSearch(context, apiClientFactory) {
2174
+ const handler = new CustomerSearchHandler(apiClientFactory);
1493
2175
  return handler.create(context);
1494
2176
  }
1495
- async function updateCustomers(context, apiClientFactory) {
1496
- const handler = new CustomersHandler(apiClientFactory);
2177
+ async function updateCustomerSearch(context, apiClientFactory) {
2178
+ const handler = new CustomerSearchHandler(apiClientFactory);
1497
2179
  return handler.update(context);
1498
2180
  }
1499
- async function deleteCustomers(context, apiClientFactory) {
1500
- const handler = new CustomersHandler(apiClientFactory);
2181
+ async function deleteCustomerSearch(context, apiClientFactory) {
2182
+ const handler = new CustomerSearchHandler(apiClientFactory);
1501
2183
  return handler.delete(context);
1502
2184
  }
1503
2185
 
1504
2186
  // src/resources/discount-codes/discount-codes.schema.ts
1505
- import { z as z7 } from "zod";
1506
- var readDiscountCodesParameters = z7.object({
1507
- id: z7.string().optional().describe("Discount Code ID"),
1508
- key: z7.string().optional().describe("Discount Code key"),
1509
- where: z7.array(z7.string()).optional().describe(
2187
+ import { z as z10 } from "zod";
2188
+ var readDiscountCodesParameters = z10.object({
2189
+ id: z10.string().optional().describe("Discount Code ID"),
2190
+ key: z10.string().optional().describe("Discount Code key"),
2191
+ where: z10.array(z10.string()).optional().describe(
1510
2192
  'Query predicates specified as strings. Example: ["code = \\"SUMMER2024\\""]'
1511
2193
  ),
1512
- sort: z7.array(z7.string()).optional().describe(
2194
+ sort: z10.array(z10.string()).optional().describe(
1513
2195
  'Sort criteria for the results. Example: ["code asc", "createdAt desc"]'
1514
2196
  ),
1515
- limit: z7.number().int().min(1).max(500).optional().describe(
2197
+ limit: z10.number().int().min(1).max(500).optional().describe(
1516
2198
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
1517
2199
  ),
1518
- offset: z7.number().int().min(0).optional().describe(
2200
+ offset: z10.number().int().min(0).optional().describe(
1519
2201
  "The number of items to skip before starting to collect the result set."
1520
2202
  ),
1521
- expand: z7.array(z7.string()).optional().describe('Fields to expand. Example: ["cartDiscounts[*]"]')
2203
+ expand: z10.array(z10.string()).optional().describe('Fields to expand. Example: ["cartDiscounts[*]"]')
1522
2204
  });
1523
- var createDiscountCodesParameters = z7.object({
1524
- key: z7.string().min(2).max(256).optional().describe("User-defined unique identifier for the discount code"),
1525
- name: z7.record(z7.string()).optional().describe("Localized name of the Discount Code"),
1526
- description: z7.record(z7.string()).optional().describe("Localized description"),
1527
- code: z7.string().describe(
2205
+ var createDiscountCodesParameters = z10.object({
2206
+ key: z10.string().min(2).max(256).optional().describe("User-defined unique identifier for the discount code"),
2207
+ name: z10.record(z10.string()).optional().describe("Localized name of the Discount Code"),
2208
+ description: z10.record(z10.string()).optional().describe("Localized description"),
2209
+ code: z10.string().describe(
1528
2210
  "User-defined unique identifier added to a Cart to apply related Cart Discounts"
1529
2211
  ),
1530
- cartDiscounts: z7.array(
1531
- z7.object({
1532
- id: z7.string().optional(),
1533
- key: z7.string().optional(),
1534
- typeId: z7.literal("cart-discount")
2212
+ cartDiscounts: z10.array(
2213
+ z10.object({
2214
+ id: z10.string().optional(),
2215
+ key: z10.string().optional(),
2216
+ typeId: z10.literal("cart-discount")
1535
2217
  })
1536
2218
  ).describe(
1537
2219
  "Array of references to up to 10 CartDiscounts that apply when the code is used"
1538
2220
  ),
1539
- cartPredicate: z7.string().optional().describe("Optional predicate defining which Carts the code can apply to"),
1540
- isActive: z7.boolean().optional().describe("Whether the code can be applied (defaults to false)"),
1541
- maxApplications: z7.number().int().min(0).optional().describe("Total number of times the code can be applied"),
1542
- maxApplicationsPerCustomer: z7.number().int().min(0).optional().describe("Times the code can be applied per customer"),
1543
- groups: z7.array(z7.string()).optional().describe("Tags for grouping and organizing Discount Codes"),
1544
- validFrom: z7.string().optional().describe("Date/time when the code becomes valid (ISO 8601 format)"),
1545
- validUntil: z7.string().optional().describe("Date/time when the code expires (ISO 8601 format)"),
1546
- custom: z7.object({
1547
- type: z7.object({
1548
- id: z7.string(),
1549
- typeId: z7.literal("type")
2221
+ cartPredicate: z10.string().optional().describe("Optional predicate defining which Carts the code can apply to"),
2222
+ isActive: z10.boolean().optional().describe("Whether the code can be applied (defaults to false)"),
2223
+ maxApplications: z10.number().int().min(0).optional().describe("Total number of times the code can be applied"),
2224
+ maxApplicationsPerCustomer: z10.number().int().min(0).optional().describe("Times the code can be applied per customer"),
2225
+ groups: z10.array(z10.string()).optional().describe("Tags for grouping and organizing Discount Codes"),
2226
+ validFrom: z10.string().optional().describe("Date/time when the code becomes valid (ISO 8601 format)"),
2227
+ validUntil: z10.string().optional().describe("Date/time when the code expires (ISO 8601 format)"),
2228
+ custom: z10.object({
2229
+ type: z10.object({
2230
+ id: z10.string(),
2231
+ typeId: z10.literal("type")
1550
2232
  }).optional(),
1551
- fields: z7.record(z7.string(), z7.any()).optional()
2233
+ fields: z10.record(z10.string(), z10.any()).optional()
1552
2234
  }).optional().describe("Custom fields for the discount code")
1553
2235
  });
1554
- var updateDiscountCodesParameters = z7.object({
1555
- id: z7.string().optional().describe("The ID of the discount code to update"),
1556
- key: z7.string().optional().describe("The key of the discount code to update"),
1557
- version: z7.number().int().describe("The current version of the discount code"),
1558
- actions: z7.array(
1559
- z7.object({
1560
- action: z7.string().describe("The name of the update action to perform")
1561
- }).and(z7.record(z7.string(), z7.any()).optional()).describe(
2236
+ var updateDiscountCodesParameters = z10.object({
2237
+ id: z10.string().optional().describe("The ID of the discount code to update"),
2238
+ key: z10.string().optional().describe("The key of the discount code to update"),
2239
+ version: z10.number().int().describe("The current version of the discount code"),
2240
+ actions: z10.array(
2241
+ z10.object({
2242
+ action: z10.string().describe("The name of the update action to perform")
2243
+ }).and(z10.record(z10.string(), z10.any()).optional()).describe(
1562
2244
  '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.'
1563
2245
  )
1564
2246
  ).describe("Update actions")
1565
2247
  });
1566
- var deleteDiscountCodesParameters = z7.object({
1567
- id: z7.string().optional().describe("Discount Code ID"),
1568
- key: z7.string().optional().describe("Discount Code key"),
1569
- version: z7.number().int().describe("Current version (for optimistic locking)"),
1570
- dataErasure: z7.boolean().optional().describe("Delete personal data")
2248
+ var deleteDiscountCodesParameters = z10.object({
2249
+ id: z10.string().optional().describe("Discount Code ID"),
2250
+ key: z10.string().optional().describe("Discount Code key"),
2251
+ version: z10.number().int().describe("Current version (for optimistic locking)"),
2252
+ dataErasure: z10.boolean().optional().describe("Delete personal data")
1571
2253
  });
1572
2254
 
1573
2255
  // src/resources/discount-codes/discount-codes.prompt.ts
@@ -1771,7 +2453,10 @@ var DiscountCodesHandler = class extends CommercetoolsResourceHandler {
1771
2453
  }
1772
2454
  }
1773
2455
  async delete(context) {
1774
- throw new ToolExecutionError("Not implemented", context);
2456
+ throw new ToolExecutionError(
2457
+ "Delete operation not implemented for discount codes",
2458
+ context
2459
+ );
1775
2460
  }
1776
2461
  };
1777
2462
  async function readDiscountCodes(context, apiClientFactory) {
@@ -1792,44 +2477,44 @@ async function deleteDiscountCodes(context, apiClientFactory) {
1792
2477
  }
1793
2478
 
1794
2479
  // src/resources/extensions/extensions.schema.ts
1795
- import { z as z8 } from "zod";
1796
- var readExtensionsParameters = z8.object({
1797
- id: z8.string().optional().describe("Extension ID"),
1798
- key: z8.string().optional().describe("Extension key"),
1799
- where: z8.array(z8.string()).optional().describe(
2480
+ import { z as z11 } from "zod";
2481
+ var readExtensionsParameters = z11.object({
2482
+ id: z11.string().optional().describe("Extension ID"),
2483
+ key: z11.string().optional().describe("Extension key"),
2484
+ where: z11.array(z11.string()).optional().describe(
1800
2485
  'Query predicates specified as strings. Example: ["key = \\"my-extension\\""]'
1801
2486
  ),
1802
- sort: z8.array(z8.string()).optional().describe(
2487
+ sort: z11.array(z11.string()).optional().describe(
1803
2488
  'Sort criteria for the results. Example: ["key asc", "createdAt desc"]'
1804
2489
  ),
1805
- limit: z8.number().int().min(1).max(500).optional().describe(
2490
+ limit: z11.number().int().min(1).max(500).optional().describe(
1806
2491
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
1807
2492
  ),
1808
- offset: z8.number().int().min(0).optional().describe(
2493
+ offset: z11.number().int().min(0).optional().describe(
1809
2494
  "The number of items to skip before starting to collect the result set."
1810
2495
  ),
1811
- expand: z8.array(z8.string()).optional().describe('Fields to expand. Example: ["destination", "triggers"]')
2496
+ expand: z11.array(z11.string()).optional().describe('Fields to expand. Example: ["destination", "triggers"]')
1812
2497
  });
1813
- var createExtensionsParameters = z8.object({
1814
- key: z8.string().min(2).max(256).optional().describe("User-defined unique identifier for the extension"),
1815
- destination: z8.object({
1816
- type: z8.enum(["HTTP", "AWSLambda", "GoogleCloudFunction"]),
1817
- url: z8.string().optional().describe("URL of the HTTP endpoint or Google Cloud Function"),
1818
- arn: z8.string().optional().describe("ARN of the AWS Lambda function"),
1819
- accessKey: z8.string().optional().describe("AWS access key or Azure Event Grid access key"),
1820
- accessSecret: z8.string().optional().describe("AWS access secret"),
1821
- region: z8.string().optional().describe("AWS region or Google Cloud region"),
1822
- authentication: z8.object({
1823
- type: z8.enum(["AuthorizationHeader", "AzureFunctions"]),
1824
- headerValue: z8.string().optional().describe("Header value for authorization"),
1825
- key: z8.string().optional().describe("Function key for authentication")
2498
+ var createExtensionsParameters = z11.object({
2499
+ key: z11.string().min(2).max(256).optional().describe("User-defined unique identifier for the extension"),
2500
+ destination: z11.object({
2501
+ type: z11.enum(["HTTP", "AWSLambda", "GoogleCloudFunction"]),
2502
+ url: z11.string().optional().describe("URL of the HTTP endpoint or Google Cloud Function"),
2503
+ arn: z11.string().optional().describe("ARN of the AWS Lambda function"),
2504
+ accessKey: z11.string().optional().describe("AWS access key or Azure Event Grid access key"),
2505
+ accessSecret: z11.string().optional().describe("AWS access secret"),
2506
+ region: z11.string().optional().describe("AWS region or Google Cloud region"),
2507
+ authentication: z11.object({
2508
+ type: z11.enum(["AuthorizationHeader", "AzureFunctions"]),
2509
+ headerValue: z11.string().optional().describe("Header value for authorization"),
2510
+ key: z11.string().optional().describe("Function key for authentication")
1826
2511
  }).optional().describe("Authentication configuration"),
1827
- connectionString: z8.string().optional().describe("Azure Service Bus connection string"),
1828
- uri: z8.string().optional().describe("RabbitMQ URI or Azure Event Grid URI")
2512
+ connectionString: z11.string().optional().describe("Azure Service Bus connection string"),
2513
+ uri: z11.string().optional().describe("RabbitMQ URI or Azure Event Grid URI")
1829
2514
  }).describe("Destination configuration for the extension"),
1830
- triggers: z8.array(
1831
- z8.object({
1832
- resourceTypeId: z8.enum([
2515
+ triggers: z11.array(
2516
+ z11.object({
2517
+ resourceTypeId: z11.enum([
1833
2518
  "cart",
1834
2519
  "order",
1835
2520
  "payment",
@@ -1842,30 +2527,30 @@ var createExtensionsParameters = z8.object({
1842
2527
  "business-unit",
1843
2528
  "shopping-list"
1844
2529
  ]).describe("Resource type that triggers the extension"),
1845
- actions: z8.array(z8.enum(["Create", "Update"])).describe("Actions that trigger the extension"),
1846
- condition: z8.string().optional().describe("Conditional predicate for triggering")
2530
+ actions: z11.array(z11.enum(["Create", "Update"])).describe("Actions that trigger the extension"),
2531
+ condition: z11.string().optional().describe("Conditional predicate for triggering")
1847
2532
  })
1848
2533
  ).describe("Describes what triggers the extension"),
1849
- timeoutInMs: z8.number().int().min(1).max(1e4).optional().describe(
2534
+ timeoutInMs: z11.number().int().min(1).max(1e4).optional().describe(
1850
2535
  "Maximum time in milliseconds for the extension to respond (default: 2000, max: 10000)"
1851
2536
  )
1852
2537
  });
1853
- var updateExtensionsParameters = z8.object({
1854
- id: z8.string().optional().describe("The ID of the extension to update"),
1855
- key: z8.string().optional().describe("The key of the extension to update"),
1856
- version: z8.number().int().describe("The current version of the extension"),
1857
- actions: z8.array(
1858
- z8.object({
1859
- action: z8.string().describe("The name of the update action to perform")
1860
- }).and(z8.record(z8.string(), z8.any()).optional()).describe(
2538
+ var updateExtensionsParameters = z11.object({
2539
+ id: z11.string().optional().describe("The ID of the extension to update"),
2540
+ key: z11.string().optional().describe("The key of the extension to update"),
2541
+ version: z11.number().int().describe("The current version of the extension"),
2542
+ actions: z11.array(
2543
+ z11.object({
2544
+ action: z11.string().describe("The name of the update action to perform")
2545
+ }).and(z11.record(z11.string(), z11.any()).optional()).describe(
1861
2546
  'Array of update actions to perform on the extension. Each action should have an "action" field and other fields specific to that action type.'
1862
2547
  )
1863
2548
  ).describe("Update actions")
1864
2549
  });
1865
- var deleteExtensionsParameters = z8.object({
1866
- id: z8.string().optional().describe("Extension ID"),
1867
- key: z8.string().optional().describe("Extension key"),
1868
- version: z8.number().int().describe("Current version (for optimistic locking)")
2550
+ var deleteExtensionsParameters = z11.object({
2551
+ id: z11.string().optional().describe("Extension ID"),
2552
+ key: z11.string().optional().describe("Extension key"),
2553
+ version: z11.number().int().describe("Current version (for optimistic locking)")
1869
2554
  });
1870
2555
 
1871
2556
  // src/resources/extensions/extensions.prompt.ts
@@ -2072,60 +2757,60 @@ async function deleteExtensions(context, apiClientFactory) {
2072
2757
  }
2073
2758
 
2074
2759
  // src/resources/inventory/inventory.schema.ts
2075
- import { z as z9 } from "zod";
2076
- var readInventoryParameters = z9.object({
2077
- id: z9.string().optional().describe("Inventory Entry ID"),
2078
- key: z9.string().optional().describe("Inventory Entry key"),
2079
- sku: z9.string().optional().describe("SKU of the product variant"),
2080
- where: z9.array(z9.string()).optional().describe(
2760
+ import { z as z12 } from "zod";
2761
+ var readInventoryParameters = z12.object({
2762
+ id: z12.string().optional().describe("Inventory Entry ID"),
2763
+ key: z12.string().optional().describe("Inventory Entry key"),
2764
+ sku: z12.string().optional().describe("SKU of the product variant"),
2765
+ where: z12.array(z12.string()).optional().describe(
2081
2766
  'Query predicates specified as strings. Example: ["sku = \\"SKU-123\\""]'
2082
2767
  ),
2083
- sort: z9.array(z9.string()).optional().describe(
2768
+ sort: z12.array(z12.string()).optional().describe(
2084
2769
  'Sort criteria for the results. Example: ["quantityOnStock desc", "createdAt asc"]'
2085
2770
  ),
2086
- limit: z9.number().int().min(1).max(500).optional().describe(
2771
+ limit: z12.number().int().min(1).max(500).optional().describe(
2087
2772
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 10."
2088
2773
  ),
2089
- offset: z9.number().int().min(0).optional().describe(
2774
+ offset: z12.number().int().min(0).optional().describe(
2090
2775
  "The number of items to skip before starting to collect the result set."
2091
2776
  ),
2092
- expand: z9.array(z9.string()).optional().describe('Fields to expand. Example: ["supplyChannel"]')
2777
+ expand: z12.array(z12.string()).optional().describe('Fields to expand. Example: ["supplyChannel"]')
2093
2778
  });
2094
- var createInventoryParameters = z9.object({
2095
- sku: z9.string().describe("SKU of the product variant"),
2096
- quantityOnStock: z9.number().int().min(0).describe("Quantity available in stock"),
2097
- key: z9.string().optional().describe("User-defined unique identifier"),
2098
- supplyChannel: z9.object({
2099
- id: z9.string().optional(),
2100
- key: z9.string().optional(),
2101
- typeId: z9.literal("channel")
2779
+ var createInventoryParameters = z12.object({
2780
+ sku: z12.string().describe("SKU of the product variant"),
2781
+ quantityOnStock: z12.number().int().min(0).describe("Quantity available in stock"),
2782
+ key: z12.string().optional().describe("User-defined unique identifier"),
2783
+ supplyChannel: z12.object({
2784
+ id: z12.string().optional(),
2785
+ key: z12.string().optional(),
2786
+ typeId: z12.literal("channel")
2102
2787
  }).optional().describe("Supply channel reference"),
2103
- expectedDelivery: z9.string().optional().describe(
2788
+ expectedDelivery: z12.string().optional().describe(
2104
2789
  "Expected delivery date in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ)"
2105
2790
  ),
2106
- restockableInDays: z9.number().int().min(0).optional().describe("Number of days until the item is restockable"),
2107
- custom: z9.object({
2108
- type: z9.object({
2109
- id: z9.string(),
2110
- typeId: z9.literal("type")
2791
+ restockableInDays: z12.number().int().min(0).optional().describe("Number of days until the item is restockable"),
2792
+ custom: z12.object({
2793
+ type: z12.object({
2794
+ id: z12.string(),
2795
+ typeId: z12.literal("type")
2111
2796
  }).optional(),
2112
- fields: z9.record(z9.string(), z9.any()).optional()
2797
+ fields: z12.record(z12.string(), z12.any()).optional()
2113
2798
  }).optional().describe("Custom fields")
2114
2799
  });
2115
- var updateInventoryParameters = z9.object({
2116
- id: z9.string().optional().describe("The ID of the inventory entry to update"),
2117
- key: z9.string().optional().describe("The key of the inventory entry to update"),
2118
- version: z9.number().int().describe("The current version of the inventory entry"),
2119
- actions: z9.array(
2120
- z9.object({
2121
- action: z9.string().describe("The name of the update action")
2122
- }).and(z9.record(z9.string(), z9.unknown()))
2800
+ var updateInventoryParameters = z12.object({
2801
+ id: z12.string().optional().describe("The ID of the inventory entry to update"),
2802
+ key: z12.string().optional().describe("The key of the inventory entry to update"),
2803
+ version: z12.number().int().describe("The current version of the inventory entry"),
2804
+ actions: z12.array(
2805
+ z12.object({
2806
+ action: z12.string().describe("The name of the update action")
2807
+ }).and(z12.record(z12.string(), z12.unknown()))
2123
2808
  ).describe("Update actions")
2124
2809
  });
2125
- var deleteInventoryParameters = z9.object({
2126
- id: z9.string().optional().describe("Inventory Entry ID"),
2127
- key: z9.string().optional().describe("Inventory Entry key"),
2128
- version: z9.number().int().describe("Current version")
2810
+ var deleteInventoryParameters = z12.object({
2811
+ id: z12.string().optional().describe("Inventory Entry ID"),
2812
+ key: z12.string().optional().describe("Inventory Entry key"),
2813
+ version: z12.number().int().describe("Current version")
2129
2814
  });
2130
2815
 
2131
2816
  // src/resources/inventory/inventory.prompt.ts
@@ -2347,18 +3032,18 @@ async function deleteInventory(context, apiClientFactory) {
2347
3032
  }
2348
3033
 
2349
3034
  // src/resources/messages/messages.schema.ts
2350
- import { z as z10 } from "zod";
2351
- var readMessagesParameters = z10.object({
2352
- id: z10.string().optional(),
2353
- where: z10.array(z10.string()).optional(),
2354
- sort: z10.array(z10.string()).optional(),
2355
- limit: z10.number().int().min(1).max(500).optional(),
2356
- offset: z10.number().int().optional(),
2357
- expand: z10.array(z10.string()).optional()
3035
+ import { z as z13 } from "zod";
3036
+ var readMessagesParameters = z13.object({
3037
+ id: z13.string().optional(),
3038
+ where: z13.array(z13.string()).optional(),
3039
+ sort: z13.array(z13.string()).optional(),
3040
+ limit: z13.number().int().min(1).max(500).optional(),
3041
+ offset: z13.number().int().optional(),
3042
+ expand: z13.array(z13.string()).optional()
2358
3043
  });
2359
- var createMessagesParameters = z10.object({});
2360
- var updateMessagesParameters = z10.object({});
2361
- var deleteMessagesParameters = z10.object({});
3044
+ var createMessagesParameters = z13.object({});
3045
+ var updateMessagesParameters = z13.object({});
3046
+ var deleteMessagesParameters = z13.object({});
2362
3047
 
2363
3048
  // src/resources/messages/messages.prompt.ts
2364
3049
  var readMessagesPrompt = `
@@ -2469,52 +3154,52 @@ async function deleteMessages(_context, apiClientFactory) {
2469
3154
  }
2470
3155
 
2471
3156
  // src/resources/product-discounts/product-discounts.schema.ts
2472
- import { z as z11 } from "zod";
2473
- var readProductDiscountsParameters = z11.object({
2474
- id: z11.string().optional().describe("Product Discount ID"),
2475
- key: z11.string().optional().describe("Product Discount key"),
2476
- where: z11.array(z11.string()).optional().describe(
3157
+ import { z as z14 } from "zod";
3158
+ var readProductDiscountsParameters = z14.object({
3159
+ id: z14.string().optional().describe("Product Discount ID"),
3160
+ key: z14.string().optional().describe("Product Discount key"),
3161
+ where: z14.array(z14.string()).optional().describe(
2477
3162
  'Query predicates specified as strings. Example: ["key = \\"summer-sale\\""]'
2478
3163
  ),
2479
- sort: z11.array(z11.string()).optional().describe(
3164
+ sort: z14.array(z14.string()).optional().describe(
2480
3165
  'Sort criteria for the results. Example: ["key asc", "createdAt desc"]'
2481
3166
  ),
2482
- limit: z11.number().int().min(1).max(500).optional().describe(
3167
+ limit: z14.number().int().min(1).max(500).optional().describe(
2483
3168
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
2484
3169
  ),
2485
- offset: z11.number().int().min(0).optional().describe(
3170
+ offset: z14.number().int().min(0).optional().describe(
2486
3171
  "The number of items to skip before starting to collect the result set."
2487
3172
  ),
2488
- expand: z11.array(z11.string()).optional().describe("Fields to expand. Example: []")
3173
+ expand: z14.array(z14.string()).optional().describe("Fields to expand. Example: []")
2489
3174
  });
2490
- var createProductDiscountsParameters = z11.object({
2491
- key: z11.string().min(2).max(256).optional().describe("User-defined unique identifier for the product discount"),
2492
- name: z11.record(z11.string()).describe("Product Discount name (localized string)"),
2493
- description: z11.record(z11.string()).optional().describe("Product Discount description (localized string)"),
2494
- value: z11.any().describe("Value of the product discount"),
2495
- predicate: z11.string().describe("Valid ProductDiscount predicate"),
2496
- sortOrder: z11.string().describe("String value used to order ProductDiscounts"),
2497
- isActive: z11.boolean().optional().describe("Whether the product discount is active (defaults to true)"),
2498
- validFrom: z11.string().optional().describe("Date/time when the discount becomes valid (ISO 8601 format)"),
2499
- validUntil: z11.string().optional().describe("Date/time when the discount expires (ISO 8601 format)"),
2500
- references: z11.array(z11.any()).optional().describe("References to other resources")
3175
+ var createProductDiscountsParameters = z14.object({
3176
+ key: z14.string().min(2).max(256).optional().describe("User-defined unique identifier for the product discount"),
3177
+ name: z14.record(z14.string()).describe("Product Discount name (localized string)"),
3178
+ description: z14.record(z14.string()).optional().describe("Product Discount description (localized string)"),
3179
+ value: z14.any().describe("Value of the product discount"),
3180
+ predicate: z14.string().describe("Valid ProductDiscount predicate"),
3181
+ sortOrder: z14.string().describe("String value used to order ProductDiscounts"),
3182
+ isActive: z14.boolean().optional().describe("Whether the product discount is active (defaults to true)"),
3183
+ validFrom: z14.string().optional().describe("Date/time when the discount becomes valid (ISO 8601 format)"),
3184
+ validUntil: z14.string().optional().describe("Date/time when the discount expires (ISO 8601 format)"),
3185
+ references: z14.array(z14.any()).optional().describe("References to other resources")
2501
3186
  });
2502
- var updateProductDiscountsParameters = z11.object({
2503
- id: z11.string().optional().describe("The ID of the product discount to update"),
2504
- key: z11.string().optional().describe("The key of the product discount to update"),
2505
- version: z11.number().int().describe("The current version of the product discount"),
2506
- actions: z11.array(
2507
- z11.object({
2508
- action: z11.string().describe("The name of the update action to perform")
2509
- }).and(z11.record(z11.string(), z11.any()).optional()).describe(
3187
+ var updateProductDiscountsParameters = z14.object({
3188
+ id: z14.string().optional().describe("The ID of the product discount to update"),
3189
+ key: z14.string().optional().describe("The key of the product discount to update"),
3190
+ version: z14.number().int().describe("The current version of the product discount"),
3191
+ actions: z14.array(
3192
+ z14.object({
3193
+ action: z14.string().describe("The name of the update action to perform")
3194
+ }).and(z14.record(z14.string(), z14.any()).optional()).describe(
2510
3195
  '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.'
2511
3196
  )
2512
3197
  ).describe("Update actions")
2513
3198
  });
2514
- var deleteProductDiscountsParameters = z11.object({
2515
- id: z11.string().optional().describe("Product Discount ID"),
2516
- key: z11.string().optional().describe("Product Discount key"),
2517
- version: z11.number().int().describe("Current version (for optimistic locking)")
3199
+ var deleteProductDiscountsParameters = z14.object({
3200
+ id: z14.string().optional().describe("Product Discount ID"),
3201
+ key: z14.string().optional().describe("Product Discount key"),
3202
+ version: z14.number().int().describe("Current version (for optimistic locking)")
2518
3203
  });
2519
3204
 
2520
3205
  // src/resources/product-discounts/product-discounts.prompt.ts
@@ -2731,20 +3416,20 @@ async function deleteProductDiscounts(context, apiClientFactory) {
2731
3416
  }
2732
3417
 
2733
3418
  // src/resources/product-projections/product-projections.schema.ts
2734
- import { z as z12 } from "zod";
2735
- var readProductProjectionsParameters = z12.object({
2736
- id: z12.string().optional(),
2737
- key: z12.string().optional(),
2738
- where: z12.array(z12.string()).optional(),
2739
- sort: z12.array(z12.string()).optional(),
2740
- limit: z12.number().int().min(1).max(500).optional(),
2741
- offset: z12.number().int().optional(),
2742
- expand: z12.array(z12.string()).optional(),
2743
- fuzzy: z12.boolean().optional()
3419
+ import { z as z15 } from "zod";
3420
+ var readProductProjectionsParameters = z15.object({
3421
+ id: z15.string().optional(),
3422
+ key: z15.string().optional(),
3423
+ where: z15.array(z15.string()).optional(),
3424
+ sort: z15.array(z15.string()).optional(),
3425
+ limit: z15.number().int().min(1).max(500).optional(),
3426
+ offset: z15.number().int().optional(),
3427
+ expand: z15.array(z15.string()).optional(),
3428
+ fuzzy: z15.boolean().optional()
2744
3429
  });
2745
- var createProductProjectionsParameters = z12.object({});
2746
- var updateProductProjectionsParameters = z12.object({});
2747
- var deleteProductProjectionsParameters = z12.object({});
3430
+ var createProductProjectionsParameters = z15.object({});
3431
+ var updateProductProjectionsParameters = z15.object({});
3432
+ var deleteProductProjectionsParameters = z15.object({});
2748
3433
 
2749
3434
  // src/resources/product-projections/product-projections.prompt.ts
2750
3435
  var readProductProjectionsPrompt = `
@@ -2878,30 +3563,30 @@ async function deleteProductProjections(_context, apiClientFactory) {
2878
3563
  }
2879
3564
 
2880
3565
  // src/resources/product-search/product-search.schema.ts
2881
- import { z as z13 } from "zod";
2882
- var readProductSearchParameters = z13.object({
2883
- query: z13.string().optional().describe("Search query in the search query language"),
2884
- filter: z13.array(z13.string()).optional().describe("Filter expressions"),
2885
- facet: z13.array(z13.string()).optional().describe("Facet expressions"),
2886
- sort: z13.array(z13.string()).optional().describe("Sort criteria for the results"),
2887
- limit: z13.number().int().min(1).max(500).optional().describe(
3566
+ import { z as z16 } from "zod";
3567
+ var readProductSearchParameters = z16.object({
3568
+ query: z16.string().optional().describe("Search query in the search query language"),
3569
+ filter: z16.array(z16.string()).optional().describe("Filter expressions"),
3570
+ facet: z16.array(z16.string()).optional().describe("Facet expressions"),
3571
+ sort: z16.array(z16.string()).optional().describe("Sort criteria for the results"),
3572
+ limit: z16.number().int().min(1).max(500).optional().describe(
2888
3573
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
2889
3574
  ),
2890
- offset: z13.number().int().min(0).optional().describe(
3575
+ offset: z16.number().int().min(0).optional().describe(
2891
3576
  "The number of items to skip before starting to collect the result set."
2892
3577
  ),
2893
- markMatchingVariants: z13.boolean().optional().describe("Whether to mark matching variants"),
2894
- priceCurrency: z13.string().optional().describe("Currency code for price selection"),
2895
- priceCountry: z13.string().optional().describe("Country code for price selection"),
2896
- priceCustomerGroup: z13.string().optional().describe("Customer group ID for price selection"),
2897
- priceChannel: z13.string().optional().describe("Channel ID for price selection"),
2898
- localeProjection: z13.string().optional().describe("Locale for projection"),
2899
- storeProjection: z13.string().optional().describe("Store key for projection"),
2900
- expand: z13.array(z13.string()).optional().describe("Fields to expand")
3578
+ markMatchingVariants: z16.boolean().optional().describe("Whether to mark matching variants"),
3579
+ priceCurrency: z16.string().optional().describe("Currency code for price selection"),
3580
+ priceCountry: z16.string().optional().describe("Country code for price selection"),
3581
+ priceCustomerGroup: z16.string().optional().describe("Customer group ID for price selection"),
3582
+ priceChannel: z16.string().optional().describe("Channel ID for price selection"),
3583
+ localeProjection: z16.string().optional().describe("Locale for projection"),
3584
+ storeProjection: z16.string().optional().describe("Store key for projection"),
3585
+ expand: z16.array(z16.string()).optional().describe("Fields to expand")
2901
3586
  });
2902
- var createProductSearchParameters = z13.object({}).describe("Product Search does not support create operations");
2903
- var updateProductSearchParameters = z13.object({}).describe("Product Search does not support update operations");
2904
- var deleteProductSearchParameters = z13.object({}).describe("Product Search does not support delete operations");
3587
+ var createProductSearchParameters = z16.object({}).describe("Product Search does not support create operations");
3588
+ var updateProductSearchParameters = z16.object({}).describe("Product Search does not support update operations");
3589
+ var deleteProductSearchParameters = z16.object({}).describe("Product Search does not support delete operations");
2905
3590
 
2906
3591
  // src/resources/product-search/product-search.prompt.ts
2907
3592
  var readProductSearchPrompt = `
@@ -3020,54 +3705,54 @@ async function deleteProductSearch(context, apiClientFactory) {
3020
3705
  }
3021
3706
 
3022
3707
  // src/resources/product-selections/product-selections.schema.ts
3023
- import { z as z14 } from "zod";
3024
- var readProductSelectionsParameters = z14.object({
3025
- id: z14.string().optional().describe("Product Selection ID"),
3026
- key: z14.string().optional().describe("Product Selection key"),
3027
- where: z14.array(z14.string()).optional().describe(
3708
+ import { z as z17 } from "zod";
3709
+ var readProductSelectionsParameters = z17.object({
3710
+ id: z17.string().optional().describe("Product Selection ID"),
3711
+ key: z17.string().optional().describe("Product Selection key"),
3712
+ where: z17.array(z17.string()).optional().describe(
3028
3713
  'Query predicates specified as strings. Example: ["key = \\"my-selection\\""]'
3029
3714
  ),
3030
- sort: z14.array(z14.string()).optional().describe(
3715
+ sort: z17.array(z17.string()).optional().describe(
3031
3716
  'Sort criteria for the results. Example: ["key asc", "createdAt desc"]'
3032
3717
  ),
3033
- limit: z14.number().int().min(1).max(500).optional().describe(
3718
+ limit: z17.number().int().min(1).max(500).optional().describe(
3034
3719
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
3035
3720
  ),
3036
- offset: z14.number().int().min(0).optional().describe(
3721
+ offset: z17.number().int().min(0).optional().describe(
3037
3722
  "The number of items to skip before starting to collect the result set."
3038
3723
  ),
3039
- expand: z14.array(z14.string()).optional().describe("Fields to expand. Example: []")
3724
+ expand: z17.array(z17.string()).optional().describe("Fields to expand. Example: []")
3040
3725
  });
3041
- var createProductSelectionsParameters = z14.object({
3042
- key: z14.string().min(2).max(256).optional().describe("User-defined unique identifier for the product selection"),
3043
- name: z14.record(z14.string()).describe("Product Selection name (localized string)"),
3044
- mode: z14.enum(["Individual", "IndividualExclusion"]).optional().describe(
3726
+ var createProductSelectionsParameters = z17.object({
3727
+ key: z17.string().min(2).max(256).optional().describe("User-defined unique identifier for the product selection"),
3728
+ name: z17.record(z17.string()).describe("Product Selection name (localized string)"),
3729
+ mode: z17.enum(["Individual", "IndividualExclusion"]).optional().describe(
3045
3730
  "Selection mode: Individual (explicitly includes) or IndividualExclusion (explicitly excludes)"
3046
3731
  ),
3047
- custom: z14.object({
3048
- type: z14.object({
3049
- id: z14.string(),
3050
- typeId: z14.literal("type")
3732
+ custom: z17.object({
3733
+ type: z17.object({
3734
+ id: z17.string(),
3735
+ typeId: z17.literal("type")
3051
3736
  }).optional(),
3052
- fields: z14.record(z14.string(), z14.any()).optional()
3737
+ fields: z17.record(z17.string(), z17.any()).optional()
3053
3738
  }).optional().describe("Custom fields for the product selection")
3054
3739
  });
3055
- var updateProductSelectionsParameters = z14.object({
3056
- id: z14.string().optional().describe("The ID of the product selection to update"),
3057
- key: z14.string().optional().describe("The key of the product selection to update"),
3058
- version: z14.number().int().describe("The current version of the product selection"),
3059
- actions: z14.array(
3060
- z14.object({
3061
- action: z14.string().describe("The name of the update action to perform")
3062
- }).and(z14.record(z14.string(), z14.any()).optional()).describe(
3740
+ var updateProductSelectionsParameters = z17.object({
3741
+ id: z17.string().optional().describe("The ID of the product selection to update"),
3742
+ key: z17.string().optional().describe("The key of the product selection to update"),
3743
+ version: z17.number().int().describe("The current version of the product selection"),
3744
+ actions: z17.array(
3745
+ z17.object({
3746
+ action: z17.string().describe("The name of the update action to perform")
3747
+ }).and(z17.record(z17.string(), z17.any()).optional()).describe(
3063
3748
  '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.'
3064
3749
  )
3065
3750
  ).describe("Update actions")
3066
3751
  });
3067
- var deleteProductSelectionsParameters = z14.object({
3068
- id: z14.string().optional().describe("Product Selection ID"),
3069
- key: z14.string().optional().describe("Product Selection key"),
3070
- version: z14.number().int().describe("Current version (for optimistic locking)")
3752
+ var deleteProductSelectionsParameters = z17.object({
3753
+ id: z17.string().optional().describe("Product Selection ID"),
3754
+ key: z17.string().optional().describe("Product Selection key"),
3755
+ version: z17.number().int().describe("Current version (for optimistic locking)")
3071
3756
  });
3072
3757
 
3073
3758
  // src/resources/product-selections/product-selections.prompt.ts
@@ -3275,67 +3960,67 @@ async function deleteProductSelections(context, apiClientFactory) {
3275
3960
  }
3276
3961
 
3277
3962
  // src/resources/product-tailoring/product-tailoring.schema.ts
3278
- import { z as z15 } from "zod";
3279
- var readProductTailoringParameters = z15.object({
3280
- id: z15.string().optional().describe("Product Tailoring ID"),
3281
- key: z15.string().optional().describe("Product Tailoring key"),
3282
- productId: z15.string().optional().describe("Product ID"),
3283
- productKey: z15.string().optional().describe("Product key"),
3284
- storeKey: z15.string().optional().describe("Store key"),
3285
- where: z15.array(z15.string()).optional().describe(
3963
+ import { z as z18 } from "zod";
3964
+ var readProductTailoringParameters = z18.object({
3965
+ id: z18.string().optional().describe("Product Tailoring ID"),
3966
+ key: z18.string().optional().describe("Product Tailoring key"),
3967
+ productId: z18.string().optional().describe("Product ID"),
3968
+ productKey: z18.string().optional().describe("Product key"),
3969
+ storeKey: z18.string().optional().describe("Store key"),
3970
+ where: z18.array(z18.string()).optional().describe(
3286
3971
  'Query predicates specified as strings. Example: ["productKey = \\"product-123\\""]'
3287
3972
  ),
3288
- sort: z15.array(z15.string()).optional().describe(
3973
+ sort: z18.array(z18.string()).optional().describe(
3289
3974
  'Sort criteria for the results. Example: ["productKey asc", "createdAt desc"]'
3290
3975
  ),
3291
- limit: z15.number().int().min(1).max(500).optional().describe(
3976
+ limit: z18.number().int().min(1).max(500).optional().describe(
3292
3977
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
3293
3978
  ),
3294
- offset: z15.number().int().min(0).optional().describe(
3979
+ offset: z18.number().int().min(0).optional().describe(
3295
3980
  "The number of items to skip before starting to collect the result set."
3296
3981
  ),
3297
- expand: z15.array(z15.string()).optional().describe("Fields to expand. Example: []")
3982
+ expand: z18.array(z18.string()).optional().describe("Fields to expand. Example: []")
3298
3983
  });
3299
- var createProductTailoringParameters = z15.object({
3300
- productKey: z15.string().describe("Product key"),
3301
- storeKey: z15.string().describe("Store key"),
3302
- name: z15.record(z15.string()).optional().describe("Tailored product name (localized string)"),
3303
- description: z15.record(z15.string()).optional().describe("Tailored product description (localized string)"),
3304
- slug: z15.record(z15.string()).optional().describe("Tailored product slug (localized string)"),
3305
- metaTitle: z15.record(z15.string()).optional().describe("Tailored meta title (localized string)"),
3306
- metaDescription: z15.record(z15.string()).optional().describe("Tailored meta description (localized string)"),
3307
- metaKeywords: z15.record(z15.string()).optional().describe("Tailored meta keywords (localized string)"),
3308
- variantTailoring: z15.array(
3309
- z15.object({
3310
- id: z15.number().int().describe("Variant ID"),
3311
- images: z15.array(z15.any()).optional().describe("Tailored images for the variant"),
3312
- assets: z15.array(z15.any()).optional().describe("Tailored assets for the variant"),
3313
- attributes: z15.record(z15.any()).optional().describe("Tailored attributes for the variant")
3984
+ var createProductTailoringParameters = z18.object({
3985
+ productKey: z18.string().describe("Product key"),
3986
+ storeKey: z18.string().describe("Store key"),
3987
+ name: z18.record(z18.string()).optional().describe("Tailored product name (localized string)"),
3988
+ description: z18.record(z18.string()).optional().describe("Tailored product description (localized string)"),
3989
+ slug: z18.record(z18.string()).optional().describe("Tailored product slug (localized string)"),
3990
+ metaTitle: z18.record(z18.string()).optional().describe("Tailored meta title (localized string)"),
3991
+ metaDescription: z18.record(z18.string()).optional().describe("Tailored meta description (localized string)"),
3992
+ metaKeywords: z18.record(z18.string()).optional().describe("Tailored meta keywords (localized string)"),
3993
+ variantTailoring: z18.array(
3994
+ z18.object({
3995
+ id: z18.number().int().describe("Variant ID"),
3996
+ images: z18.array(z18.any()).optional().describe("Tailored images for the variant"),
3997
+ assets: z18.array(z18.any()).optional().describe("Tailored assets for the variant"),
3998
+ attributes: z18.record(z18.any()).optional().describe("Tailored attributes for the variant")
3314
3999
  })
3315
4000
  ).optional().describe("Variant tailoring data")
3316
4001
  });
3317
- var updateProductTailoringParameters = z15.object({
3318
- id: z15.string().optional().describe("Product Tailoring ID"),
3319
- key: z15.string().optional().describe("Product Tailoring key"),
3320
- productId: z15.string().optional().describe("Product ID"),
3321
- productKey: z15.string().optional().describe("Product key"),
3322
- storeKey: z15.string().optional().describe("Store key"),
3323
- version: z15.number().int().describe("The current version of the product tailoring"),
3324
- actions: z15.array(
3325
- z15.object({
3326
- action: z15.string().describe("The name of the update action to perform")
3327
- }).and(z15.record(z15.string(), z15.any()).optional()).describe(
4002
+ var updateProductTailoringParameters = z18.object({
4003
+ id: z18.string().optional().describe("Product Tailoring ID"),
4004
+ key: z18.string().optional().describe("Product Tailoring key"),
4005
+ productId: z18.string().optional().describe("Product ID"),
4006
+ productKey: z18.string().optional().describe("Product key"),
4007
+ storeKey: z18.string().optional().describe("Store key"),
4008
+ version: z18.number().int().describe("The current version of the product tailoring"),
4009
+ actions: z18.array(
4010
+ z18.object({
4011
+ action: z18.string().describe("The name of the update action to perform")
4012
+ }).and(z18.record(z18.string(), z18.any()).optional()).describe(
3328
4013
  '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.'
3329
4014
  )
3330
4015
  ).describe("Update actions")
3331
4016
  });
3332
- var deleteProductTailoringParameters = z15.object({
3333
- id: z15.string().optional().describe("Product Tailoring ID"),
3334
- key: z15.string().optional().describe("Product Tailoring key"),
3335
- productId: z15.string().optional().describe("Product ID"),
3336
- productKey: z15.string().optional().describe("Product key"),
3337
- storeKey: z15.string().optional().describe("Store key"),
3338
- version: z15.number().int().describe("Current version (for optimistic locking)")
4017
+ var deleteProductTailoringParameters = z18.object({
4018
+ id: z18.string().optional().describe("Product Tailoring ID"),
4019
+ key: z18.string().optional().describe("Product Tailoring key"),
4020
+ productId: z18.string().optional().describe("Product ID"),
4021
+ productKey: z18.string().optional().describe("Product key"),
4022
+ storeKey: z18.string().optional().describe("Store key"),
4023
+ version: z18.number().int().describe("Current version (for optimistic locking)")
3339
4024
  });
3340
4025
 
3341
4026
  // src/resources/product-tailoring/product-tailoring.prompt.ts
@@ -3617,57 +4302,57 @@ async function deleteProductTailoring(context, apiClientFactory) {
3617
4302
  }
3618
4303
 
3619
4304
  // src/resources/product-types/product-types.schema.ts
3620
- import { z as z16 } from "zod";
3621
- var readProductTypesParameters = z16.object({
3622
- id: z16.string().optional().describe("Product Type ID"),
3623
- key: z16.string().optional().describe("Product Type key"),
3624
- where: z16.array(z16.string()).optional().describe(
4305
+ import { z as z19 } from "zod";
4306
+ var readProductTypesParameters = z19.object({
4307
+ id: z19.string().optional().describe("Product Type ID"),
4308
+ key: z19.string().optional().describe("Product Type key"),
4309
+ where: z19.array(z19.string()).optional().describe(
3625
4310
  'Query predicates specified as strings. Example: ["key = \\"my-product-type\\""]'
3626
4311
  ),
3627
- sort: z16.array(z16.string()).optional().describe(
4312
+ sort: z19.array(z19.string()).optional().describe(
3628
4313
  'Sort criteria for the results. Example: ["key asc", "createdAt desc"]'
3629
4314
  ),
3630
- limit: z16.number().int().min(1).max(500).optional().describe(
4315
+ limit: z19.number().int().min(1).max(500).optional().describe(
3631
4316
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
3632
4317
  ),
3633
- offset: z16.number().int().min(0).optional().describe(
4318
+ offset: z19.number().int().min(0).optional().describe(
3634
4319
  "The number of items to skip before starting to collect the result set."
3635
4320
  ),
3636
- expand: z16.array(z16.string()).optional().describe("Fields to expand. Example: []")
4321
+ expand: z19.array(z19.string()).optional().describe("Fields to expand. Example: []")
3637
4322
  });
3638
- var createProductTypesParameters = z16.object({
3639
- key: z16.string().min(2).max(256).describe("User-defined unique identifier for the product type"),
3640
- name: z16.string().describe("Product Type name"),
3641
- description: z16.string().optional().describe("Product Type description"),
3642
- attributes: z16.array(
3643
- z16.object({
3644
- name: z16.string().describe("Attribute name"),
3645
- label: z16.record(z16.string()).optional().describe("Localized label for the attribute"),
3646
- isRequired: z16.boolean().optional().describe("Whether the attribute is required"),
3647
- isSearchable: z16.boolean().optional().describe("Whether the attribute is searchable"),
3648
- type: z16.any().describe("Attribute type definition"),
3649
- attributeConstraint: z16.enum(["None", "Unique", "CombinationUnique", "SameForAll"]).optional().describe("Attribute constraint"),
3650
- inputHint: z16.enum(["SingleLine", "MultiLine"]).optional().describe("Input hint for String attributes"),
3651
- inputTip: z16.record(z16.string()).optional().describe("Input tip for the attribute (localized)")
4323
+ var createProductTypesParameters = z19.object({
4324
+ key: z19.string().min(2).max(256).describe("User-defined unique identifier for the product type"),
4325
+ name: z19.string().describe("Product Type name"),
4326
+ description: z19.string().optional().describe("Product Type description"),
4327
+ attributes: z19.array(
4328
+ z19.object({
4329
+ name: z19.string().describe("Attribute name"),
4330
+ label: z19.record(z19.string()).optional().describe("Localized label for the attribute"),
4331
+ isRequired: z19.boolean().optional().describe("Whether the attribute is required"),
4332
+ isSearchable: z19.boolean().optional().describe("Whether the attribute is searchable"),
4333
+ type: z19.any().describe("Attribute type definition"),
4334
+ attributeConstraint: z19.enum(["None", "Unique", "CombinationUnique", "SameForAll"]).optional().describe("Attribute constraint"),
4335
+ inputHint: z19.enum(["SingleLine", "MultiLine"]).optional().describe("Input hint for String attributes"),
4336
+ inputTip: z19.record(z19.string()).optional().describe("Input tip for the attribute (localized)")
3652
4337
  })
3653
4338
  ).optional().describe("Array of attribute definitions")
3654
4339
  });
3655
- var updateProductTypesParameters = z16.object({
3656
- id: z16.string().optional().describe("The ID of the product type to update"),
3657
- key: z16.string().optional().describe("The key of the product type to update"),
3658
- version: z16.number().int().describe("The current version of the product type"),
3659
- actions: z16.array(
3660
- z16.object({
3661
- action: z16.string().describe("The name of the update action to perform")
3662
- }).and(z16.record(z16.string(), z16.any()).optional()).describe(
4340
+ var updateProductTypesParameters = z19.object({
4341
+ id: z19.string().optional().describe("The ID of the product type to update"),
4342
+ key: z19.string().optional().describe("The key of the product type to update"),
4343
+ version: z19.number().int().describe("The current version of the product type"),
4344
+ actions: z19.array(
4345
+ z19.object({
4346
+ action: z19.string().describe("The name of the update action to perform")
4347
+ }).and(z19.record(z19.string(), z19.any()).optional()).describe(
3663
4348
  '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.'
3664
4349
  )
3665
4350
  ).describe("Update actions")
3666
4351
  });
3667
- var deleteProductTypesParameters = z16.object({
3668
- id: z16.string().optional().describe("Product Type ID"),
3669
- key: z16.string().optional().describe("Product Type key"),
3670
- version: z16.number().int().describe("Current version (for optimistic locking)")
4352
+ var deleteProductTypesParameters = z19.object({
4353
+ id: z19.string().optional().describe("Product Type ID"),
4354
+ key: z19.string().optional().describe("Product Type key"),
4355
+ version: z19.number().int().describe("Current version (for optimistic locking)")
3671
4356
  });
3672
4357
 
3673
4358
  // src/resources/product-types/product-types.prompt.ts
@@ -3887,84 +4572,84 @@ async function deleteProductTypes(context, apiClientFactory) {
3887
4572
  }
3888
4573
 
3889
4574
  // src/resources/products/products.schema.ts
3890
- import { z as z17 } from "zod";
3891
- var readProductsParameters = z17.object({
3892
- id: z17.string().optional().describe("Product ID"),
3893
- key: z17.string().optional().describe("Product key"),
3894
- where: z17.array(z17.string()).optional().describe(
4575
+ import { z as z20 } from "zod";
4576
+ var readProductsParameters = z20.object({
4577
+ id: z20.string().optional().describe("Product ID"),
4578
+ key: z20.string().optional().describe("Product key"),
4579
+ where: z20.array(z20.string()).optional().describe(
3895
4580
  'Query predicates specified as strings. Example: ["key = \\"product-key\\""]'
3896
4581
  ),
3897
- sort: z17.array(z17.string()).optional().describe(
4582
+ sort: z20.array(z20.string()).optional().describe(
3898
4583
  'Sort criteria for the results. Example: ["name asc", "createdAt desc"]'
3899
4584
  ),
3900
- limit: z17.number().int().min(1).max(500).optional().describe(
4585
+ limit: z20.number().int().min(1).max(500).optional().describe(
3901
4586
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
3902
4587
  ),
3903
- offset: z17.number().int().min(0).optional().describe(
4588
+ offset: z20.number().int().min(0).optional().describe(
3904
4589
  "The number of items to skip before starting to collect the result set."
3905
4590
  ),
3906
- expand: z17.array(z17.string()).optional().describe('Fields to expand. Example: ["productType", "categories[*]"]'),
3907
- priceCurrency: z17.string().optional().describe("Currency code for price selection"),
3908
- priceCountry: z17.string().optional().describe("Country code for price selection"),
3909
- priceCustomerGroup: z17.string().optional().describe("Customer group ID for price selection"),
3910
- priceChannel: z17.string().optional().describe("Channel ID for price selection"),
3911
- localeProjection: z17.string().optional().describe("Locale for projection"),
3912
- storeProjection: z17.string().optional().describe("Store key for projection")
4591
+ expand: z20.array(z20.string()).optional().describe('Fields to expand. Example: ["productType", "categories[*]"]'),
4592
+ priceCurrency: z20.string().optional().describe("Currency code for price selection"),
4593
+ priceCountry: z20.string().optional().describe("Country code for price selection"),
4594
+ priceCustomerGroup: z20.string().optional().describe("Customer group ID for price selection"),
4595
+ priceChannel: z20.string().optional().describe("Channel ID for price selection"),
4596
+ localeProjection: z20.string().optional().describe("Locale for projection"),
4597
+ storeProjection: z20.string().optional().describe("Store key for projection")
3913
4598
  });
3914
- var createProductsParameters = z17.object({
3915
- key: z17.string().min(2).max(256).optional().describe("User-defined unique identifier for the product"),
3916
- productType: z17.object({
3917
- id: z17.string().optional(),
3918
- key: z17.string().optional(),
3919
- typeId: z17.literal("product-type")
4599
+ var createProductsParameters = z20.object({
4600
+ key: z20.string().min(2).max(256).optional().describe("User-defined unique identifier for the product"),
4601
+ productType: z20.object({
4602
+ id: z20.string().optional(),
4603
+ key: z20.string().optional(),
4604
+ typeId: z20.literal("product-type")
3920
4605
  }).describe("Product Type reference"),
3921
- name: z17.record(z17.string()).describe("Product name (localized string)"),
3922
- description: z17.record(z17.string()).optional().describe("Product description (localized string)"),
3923
- slug: z17.record(z17.string()).describe("Product slug (localized string)"),
3924
- categories: z17.array(
3925
- z17.object({
3926
- id: z17.string().optional(),
3927
- key: z17.string().optional(),
3928
- typeId: z17.literal("category")
4606
+ name: z20.record(z20.string()).describe("Product name (localized string)"),
4607
+ description: z20.record(z20.string()).optional().describe("Product description (localized string)"),
4608
+ slug: z20.record(z20.string()).describe("Product slug (localized string)"),
4609
+ categories: z20.array(
4610
+ z20.object({
4611
+ id: z20.string().optional(),
4612
+ key: z20.string().optional(),
4613
+ typeId: z20.literal("category")
3929
4614
  })
3930
4615
  ).optional().describe("Array of category references"),
3931
- categoryOrderHints: z17.record(z17.string()).optional().describe("Category order hints"),
3932
- metaTitle: z17.record(z17.string()).optional().describe("Meta title (localized string)"),
3933
- metaDescription: z17.record(z17.string()).optional().describe("Meta description (localized string)"),
3934
- metaKeywords: z17.record(z17.string()).optional().describe("Meta keywords (localized string)"),
3935
- masterVariant: z17.any().optional().describe("Master variant"),
3936
- variants: z17.array(z17.any()).optional().describe("Product variants"),
3937
- taxCategory: z17.object({
3938
- id: z17.string().optional(),
3939
- key: z17.string().optional(),
3940
- typeId: z17.literal("tax-category")
4616
+ categoryOrderHints: z20.record(z20.string()).optional().describe("Category order hints"),
4617
+ metaTitle: z20.record(z20.string()).optional().describe("Meta title (localized string)"),
4618
+ metaDescription: z20.record(z20.string()).optional().describe("Meta description (localized string)"),
4619
+ metaKeywords: z20.record(z20.string()).optional().describe("Meta keywords (localized string)"),
4620
+ masterVariant: z20.any().optional().describe("Master variant"),
4621
+ variants: z20.array(z20.any()).optional().describe("Product variants"),
4622
+ taxCategory: z20.object({
4623
+ id: z20.string().optional(),
4624
+ key: z20.string().optional(),
4625
+ typeId: z20.literal("tax-category")
3941
4626
  }).optional().describe("Tax category reference"),
3942
- state: z17.object({
3943
- id: z17.string().optional(),
3944
- key: z17.string().optional(),
3945
- typeId: z17.literal("state")
4627
+ state: z20.object({
4628
+ id: z20.string().optional(),
4629
+ key: z20.string().optional(),
4630
+ typeId: z20.literal("state")
3946
4631
  }).optional().describe("State reference"),
3947
- reviewRatingStatistics: z17.any().optional().describe("Review rating statistics"),
3948
- publish: z17.boolean().optional().describe("Whether to publish the product"),
3949
- priceMode: z17.enum(["Embedded", "Standalone"]).optional().describe("Price mode")
4632
+ reviewRatingStatistics: z20.any().optional().describe("Review rating statistics"),
4633
+ publish: z20.boolean().optional().describe("Whether to publish the product"),
4634
+ priceMode: z20.enum(["Embedded", "Standalone"]).optional().describe("Price mode")
3950
4635
  });
3951
- var updateProductsParameters = z17.object({
3952
- id: z17.string().optional().describe("The ID of the product to update"),
3953
- key: z17.string().optional().describe("The key of the product to update"),
3954
- version: z17.number().int().describe("The current version of the product"),
3955
- actions: z17.array(
3956
- z17.object({
3957
- action: z17.string().describe("The name of the update action to perform")
3958
- }).and(z17.record(z17.string(), z17.any()).optional()).describe(
4636
+ var updateProductsParameters = z20.object({
4637
+ id: z20.string().optional().describe("The ID of the product to update"),
4638
+ key: z20.string().optional().describe("The key of the product to update"),
4639
+ version: z20.number().int().describe("The current version of the product"),
4640
+ actions: z20.array(
4641
+ z20.object({
4642
+ action: z20.string().describe("The name of the update action to perform")
4643
+ }).and(z20.record(z20.string(), z20.any()).optional()).describe(
3959
4644
  'Array of update actions to perform on the product. Each action should have an "action" field and other fields specific to that action type.'
3960
4645
  )
3961
4646
  ).describe("Update actions")
3962
4647
  });
3963
- var deleteProductsParameters = z17.object({
3964
- id: z17.string().optional().describe("Product ID"),
3965
- key: z17.string().optional().describe("Product key"),
3966
- version: z17.number().int().describe("Current version (for optimistic locking)"),
3967
- priceMode: z17.enum(["Embedded", "Standalone"]).optional().describe("Price mode")
4648
+ var deleteProductsParameters = z20.object({
4649
+ id: z20.string().optional().describe("Product ID"),
4650
+ key: z20.string().optional().describe("Product key"),
4651
+ version: z20.number().int().describe("Current version (for optimistic locking)"),
4652
+ priceMode: z20.enum(["Embedded", "Standalone"]).optional().describe("Price mode")
3968
4653
  });
3969
4654
 
3970
4655
  // src/resources/products/products.prompt.ts
@@ -4265,158 +4950,158 @@ async function deleteProducts(context, apiClientFactory) {
4265
4950
  }
4266
4951
 
4267
4952
  // src/resources/project/project.handler.ts
4268
- import { z as z19 } from "zod";
4953
+ import { z as z22 } from "zod";
4269
4954
 
4270
4955
  // src/resources/project/project.schema.ts
4271
- import { z as z18 } from "zod";
4272
- var readProjectParameters = z18.object({
4273
- projectKey: z18.string().optional().describe(
4956
+ import { z as z21 } from "zod";
4957
+ var readProjectParameters = z21.object({
4958
+ projectKey: z21.string().optional().describe(
4274
4959
  "The key of the project to read. If not provided, the current project will be used."
4275
4960
  )
4276
4961
  });
4277
- var messagesConfigurationDraftSchema = z18.object({
4278
- enabled: z18.boolean().describe("When true, the Messages Query feature is active."),
4279
- deleteDaysAfterCreation: z18.number().min(1).max(90).optional().describe(
4962
+ var messagesConfigurationDraftSchema = z21.object({
4963
+ enabled: z21.boolean().describe("When true, the Messages Query feature is active."),
4964
+ deleteDaysAfterCreation: z21.number().min(1).max(90).optional().describe(
4280
4965
  "Specifies the number of days each Message should be available via the Messages Query API."
4281
4966
  )
4282
4967
  });
4283
- var cartsConfigurationSchema = z18.object({
4284
- deleteDaysAfterLastModification: z18.number().min(1).optional().describe(
4968
+ var cartsConfigurationSchema = z21.object({
4969
+ deleteDaysAfterLastModification: z21.number().min(1).optional().describe(
4285
4970
  "Default value for the deleteDaysAfterLastModification parameter of CartDraft and MyCartDraft."
4286
4971
  ),
4287
- countryTaxRateFallbackEnabled: z18.boolean().optional().describe(
4972
+ countryTaxRateFallbackEnabled: z21.boolean().optional().describe(
4288
4973
  "Indicates if country - no state Tax Rate fallback should be used."
4289
4974
  )
4290
4975
  });
4291
- var shoppingListsConfigurationSchema = z18.object({
4292
- deleteDaysAfterLastModification: z18.number().min(1).optional().describe(
4976
+ var shoppingListsConfigurationSchema = z21.object({
4977
+ deleteDaysAfterLastModification: z21.number().min(1).optional().describe(
4293
4978
  "Default value for the deleteDaysAfterLastModification parameter of ShoppingListDraft."
4294
4979
  )
4295
4980
  });
4296
- var customFieldLocalizedEnumValueSchema = z18.object({
4297
- key: z18.string().describe("The key of the enum value."),
4298
- label: z18.record(z18.string(), z18.string()).describe("The localized labels for the enum value.")
4981
+ var customFieldLocalizedEnumValueSchema = z21.object({
4982
+ key: z21.string().describe("The key of the enum value."),
4983
+ label: z21.record(z21.string(), z21.string()).describe("The localized labels for the enum value.")
4299
4984
  });
4300
- var shippingRateInputTypeSchema = z18.discriminatedUnion("type", [
4301
- z18.object({
4302
- type: z18.literal("CartValue")
4985
+ var shippingRateInputTypeSchema = z21.discriminatedUnion("type", [
4986
+ z21.object({
4987
+ type: z21.literal("CartValue")
4303
4988
  }),
4304
- z18.object({
4305
- type: z18.literal("CartClassification"),
4306
- values: z18.array(customFieldLocalizedEnumValueSchema).describe("The classification items for ShippingRatePriceTier.")
4989
+ z21.object({
4990
+ type: z21.literal("CartClassification"),
4991
+ values: z21.array(customFieldLocalizedEnumValueSchema).describe("The classification items for ShippingRatePriceTier.")
4307
4992
  }),
4308
- z18.object({
4309
- type: z18.literal("CartScore"),
4310
- score: z18.number().describe("The score mapping for available shipping rate tiers.")
4993
+ z21.object({
4994
+ type: z21.literal("CartScore"),
4995
+ score: z21.number().describe("The score mapping for available shipping rate tiers.")
4311
4996
  })
4312
4997
  ]);
4313
- var externalOAuthSchema = z18.object({
4314
- url: z18.string().url().describe("The URL of the token introspection endpoint."),
4315
- authorizationHeader: z18.string().describe(
4998
+ var externalOAuthSchema = z21.object({
4999
+ url: z21.string().url().describe("The URL of the token introspection endpoint."),
5000
+ authorizationHeader: z21.string().describe(
4316
5001
  "The authorization header to authenticate against the introspection endpoint."
4317
5002
  )
4318
5003
  });
4319
- var customerSearchStatusSchema = z18.enum(["Activated", "Deactivated"]);
4320
- var businessUnitSearchStatusSchema = z18.enum(["Activated", "Deactivated"]);
4321
- var orderSearchStatusSchema = z18.enum(["Activated", "Deactivated"]);
4322
- var productSearchIndexingModeSchema = z18.enum([
5004
+ var customerSearchStatusSchema = z21.enum(["Activated", "Deactivated"]);
5005
+ var businessUnitSearchStatusSchema = z21.enum(["Activated", "Deactivated"]);
5006
+ var orderSearchStatusSchema = z21.enum(["Activated", "Deactivated"]);
5007
+ var productSearchIndexingModeSchema = z21.enum([
4323
5008
  "ProductProjectionsSearch",
4324
5009
  "ProductsSearch"
4325
5010
  ]);
4326
- var businessUnitConfigurationStatusSchema = z18.enum([
5011
+ var businessUnitConfigurationStatusSchema = z21.enum([
4327
5012
  "Active",
4328
5013
  "Inactive",
4329
5014
  "Verification"
4330
5015
  ]);
4331
- var associateRoleResourceIdentifierSchema = z18.object({
4332
- typeId: z18.literal("associate-role"),
4333
- id: z18.string().optional().describe("The ID of the associate role."),
4334
- key: z18.string().optional().describe("The key of the associate role.")
5016
+ var associateRoleResourceIdentifierSchema = z21.object({
5017
+ typeId: z21.literal("associate-role"),
5018
+ id: z21.string().optional().describe("The ID of the associate role."),
5019
+ key: z21.string().optional().describe("The key of the associate role.")
4335
5020
  });
4336
- var changeNameSchema = z18.object({
4337
- action: z18.literal("changeName"),
4338
- name: z18.string().describe("New value to set.")
5021
+ var changeNameSchema = z21.object({
5022
+ action: z21.literal("changeName"),
5023
+ name: z21.string().describe("New value to set.")
4339
5024
  });
4340
- var changeCountriesSchema = z18.object({
4341
- action: z18.literal("changeCountries"),
4342
- countries: z18.array(z18.string()).describe("New value to set. Must not be empty.")
5025
+ var changeCountriesSchema = z21.object({
5026
+ action: z21.literal("changeCountries"),
5027
+ countries: z21.array(z21.string()).describe("New value to set. Must not be empty.")
4343
5028
  });
4344
- var changeCurrenciesSchema = z18.object({
4345
- action: z18.literal("changeCurrencies"),
4346
- currencies: z18.array(z18.string()).describe("New value to set. Must not be empty.")
5029
+ var changeCurrenciesSchema = z21.object({
5030
+ action: z21.literal("changeCurrencies"),
5031
+ currencies: z21.array(z21.string()).describe("New value to set. Must not be empty.")
4347
5032
  });
4348
- var changeLanguagesSchema = z18.object({
4349
- action: z18.literal("changeLanguages"),
4350
- languages: z18.array(z18.string()).describe("New value to set. Must not be empty.")
5033
+ var changeLanguagesSchema = z21.object({
5034
+ action: z21.literal("changeLanguages"),
5035
+ languages: z21.array(z21.string()).describe("New value to set. Must not be empty.")
4351
5036
  });
4352
- var changeMessagesConfigurationSchema = z18.object({
4353
- action: z18.literal("changeMessagesConfiguration"),
5037
+ var changeMessagesConfigurationSchema = z21.object({
5038
+ action: z21.literal("changeMessagesConfiguration"),
4354
5039
  messagesConfiguration: messagesConfigurationDraftSchema.describe(
4355
5040
  "Configuration for the Messages Query feature."
4356
5041
  )
4357
5042
  });
4358
- var changeCartsConfigurationSchema = z18.object({
4359
- action: z18.literal("changeCartsConfiguration"),
5043
+ var changeCartsConfigurationSchema = z21.object({
5044
+ action: z21.literal("changeCartsConfiguration"),
4360
5045
  cartsConfiguration: cartsConfigurationSchema.describe(
4361
5046
  "Configuration for the Carts feature."
4362
5047
  )
4363
5048
  });
4364
- var changeCountryTaxRateFallbackEnabledSchema = z18.object({
4365
- action: z18.literal("changeCountryTaxRateFallbackEnabled"),
4366
- countryTaxRateFallbackEnabled: z18.boolean().describe("When true, country - no state Tax Rate is used as fallback.")
5049
+ var changeCountryTaxRateFallbackEnabledSchema = z21.object({
5050
+ action: z21.literal("changeCountryTaxRateFallbackEnabled"),
5051
+ countryTaxRateFallbackEnabled: z21.boolean().describe("When true, country - no state Tax Rate is used as fallback.")
4367
5052
  });
4368
- var changeShoppingListsConfigurationSchema = z18.object({
4369
- action: z18.literal("changeShoppingListsConfiguration"),
5053
+ var changeShoppingListsConfigurationSchema = z21.object({
5054
+ action: z21.literal("changeShoppingListsConfiguration"),
4370
5055
  shoppingListsConfiguration: shoppingListsConfigurationSchema.describe(
4371
5056
  "Configuration for the Shopping Lists feature."
4372
5057
  )
4373
5058
  });
4374
- var changeMyBusinessUnitStatusOnCreationSchema = z18.object({
4375
- action: z18.literal("changeMyBusinessUnitStatusOnCreation"),
5059
+ var changeMyBusinessUnitStatusOnCreationSchema = z21.object({
5060
+ action: z21.literal("changeMyBusinessUnitStatusOnCreation"),
4376
5061
  status: businessUnitConfigurationStatusSchema.describe(
4377
5062
  "Status for Business Units created using the My Business Unit endpoint."
4378
5063
  )
4379
5064
  });
4380
- var setMyBusinessUnitAssociateRoleOnCreationSchema = z18.object({
4381
- action: z18.literal("setMyBusinessUnitAssociateRoleOnCreation"),
5065
+ var setMyBusinessUnitAssociateRoleOnCreationSchema = z21.object({
5066
+ action: z21.literal("setMyBusinessUnitAssociateRoleOnCreation"),
4382
5067
  associateRole: associateRoleResourceIdentifierSchema.describe(
4383
5068
  "Default Associate Role assigned to the Associate creating a Business Unit."
4384
5069
  )
4385
5070
  });
4386
- var setShippingRateInputTypeSchema = z18.object({
4387
- action: z18.literal("setShippingRateInputType"),
5071
+ var setShippingRateInputTypeSchema = z21.object({
5072
+ action: z21.literal("setShippingRateInputType"),
4388
5073
  shippingRateInputType: shippingRateInputTypeSchema.optional().describe("Value to set. If empty, any existing value will be removed.")
4389
5074
  });
4390
- var setExternalOAuthSchema = z18.object({
4391
- action: z18.literal("setExternalOAuth"),
5075
+ var setExternalOAuthSchema = z21.object({
5076
+ action: z21.literal("setExternalOAuth"),
4392
5077
  externalOAuth: externalOAuthSchema.optional().describe("Value to set. If empty, any existing value will be removed.")
4393
5078
  });
4394
- var changeProductSearchIndexingEnabledSchema = z18.object({
4395
- action: z18.literal("changeProductSearchIndexingEnabled"),
4396
- enabled: z18.boolean().describe("If false, the indexing of Product information will stop."),
5079
+ var changeProductSearchIndexingEnabledSchema = z21.object({
5080
+ action: z21.literal("changeProductSearchIndexingEnabled"),
5081
+ enabled: z21.boolean().describe("If false, the indexing of Product information will stop."),
4397
5082
  mode: productSearchIndexingModeSchema.optional().describe(
4398
5083
  "Controls whether the action should apply to Product Projection Search or to Product Search."
4399
5084
  )
4400
5085
  });
4401
- var changeOrderSearchStatusSchema = z18.object({
4402
- action: z18.literal("changeOrderSearchStatus"),
5086
+ var changeOrderSearchStatusSchema = z21.object({
5087
+ action: z21.literal("changeOrderSearchStatus"),
4403
5088
  status: orderSearchStatusSchema.describe(
4404
5089
  "Activates or deactivates the Order Search feature."
4405
5090
  )
4406
5091
  });
4407
- var changeCustomerSearchStatusSchema = z18.object({
4408
- action: z18.literal("changeCustomerSearchStatus"),
5092
+ var changeCustomerSearchStatusSchema = z21.object({
5093
+ action: z21.literal("changeCustomerSearchStatus"),
4409
5094
  status: customerSearchStatusSchema.describe(
4410
5095
  "Activates or deactivates the Customer Search feature."
4411
5096
  )
4412
5097
  });
4413
- var changeBusinessUnitSearchStatusSchema = z18.object({
4414
- action: z18.literal("changeBusinessUnitSearchStatus"),
5098
+ var changeBusinessUnitSearchStatusSchema = z21.object({
5099
+ action: z21.literal("changeBusinessUnitSearchStatus"),
4415
5100
  status: businessUnitSearchStatusSchema.describe(
4416
5101
  "Activates or deactivates the Search Business Units feature."
4417
5102
  )
4418
5103
  });
4419
- var updateActionSchema = z18.discriminatedUnion("action", [
5104
+ var updateActionSchema = z21.discriminatedUnion("action", [
4420
5105
  changeNameSchema,
4421
5106
  changeCountriesSchema,
4422
5107
  changeCurrenciesSchema,
@@ -4434,12 +5119,12 @@ var updateActionSchema = z18.discriminatedUnion("action", [
4434
5119
  changeCustomerSearchStatusSchema,
4435
5120
  changeBusinessUnitSearchStatusSchema
4436
5121
  ]);
4437
- var updateProjectParameters = z18.object({
4438
- version: z18.number().describe(
5122
+ var updateProjectParameters = z21.object({
5123
+ version: z21.number().describe(
4439
5124
  "The current version of the project. If not provided, the current version will be fetched automatically."
4440
5125
  ),
4441
- actions: z18.array(updateActionSchema).describe("The list of update actions to apply to the project."),
4442
- projectKey: z18.string().optional().describe(
5126
+ actions: z21.array(updateActionSchema).describe("The list of update actions to apply to the project."),
5127
+ projectKey: z21.string().optional().describe(
4443
5128
  "The key of the project to update. If not provided, the current project will be used."
4444
5129
  )
4445
5130
  });
@@ -4490,9 +5175,9 @@ var ProjectHandler = class extends CommercetoolsResourceHandler {
4490
5175
  schemas: {
4491
5176
  read: readProjectParameters,
4492
5177
  update: updateProjectParameters,
4493
- create: z19.object({}),
5178
+ create: z22.object({}),
4494
5179
  // Empty schema for unsupported operation
4495
- delete: z19.object({})
5180
+ delete: z22.object({})
4496
5181
  // Empty schema for unsupported operation
4497
5182
  }
4498
5183
  };
@@ -4555,72 +5240,72 @@ async function updateProject(context, apiClientFactory) {
4555
5240
  }
4556
5241
 
4557
5242
  // src/resources/reviews/reviews.schema.ts
4558
- import { z as z20 } from "zod";
4559
- var readReviewsParameters = z20.object({
4560
- id: z20.string().optional().describe("Review ID"),
4561
- key: z20.string().optional().describe("Review key"),
4562
- where: z20.array(z20.string()).optional().describe(
5243
+ import { z as z23 } from "zod";
5244
+ var readReviewsParameters = z23.object({
5245
+ id: z23.string().optional().describe("Review ID"),
5246
+ key: z23.string().optional().describe("Review key"),
5247
+ where: z23.array(z23.string()).optional().describe(
4563
5248
  'Query predicates specified as strings. Example: ["rating > 50"]'
4564
5249
  ),
4565
- sort: z20.array(z20.string()).optional().describe(
5250
+ sort: z23.array(z23.string()).optional().describe(
4566
5251
  'Sort criteria for the results. Example: ["rating desc", "createdAt asc"]'
4567
5252
  ),
4568
- limit: z20.number().int().min(1).max(500).optional().describe(
5253
+ limit: z23.number().int().min(1).max(500).optional().describe(
4569
5254
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
4570
5255
  ),
4571
- offset: z20.number().int().min(0).optional().describe(
5256
+ offset: z23.number().int().min(0).optional().describe(
4572
5257
  "The number of items to skip before starting to collect the result set."
4573
5258
  ),
4574
- expand: z20.array(z20.string()).optional().describe('Fields to expand. Example: ["customer", "target"]')
5259
+ expand: z23.array(z23.string()).optional().describe('Fields to expand. Example: ["customer", "target"]')
4575
5260
  });
4576
- var createReviewsParameters = z20.object({
4577
- key: z20.string().min(2).max(256).optional().describe("User-defined unique identifier for the review"),
4578
- uniquenessValue: z20.string().optional().describe("Must be unique among reviews"),
4579
- locale: z20.string().optional().describe("Language in which the content is written"),
4580
- authorName: z20.string().optional().describe("Name of the author"),
4581
- title: z20.string().optional().describe("Title of the review"),
4582
- text: z20.string().optional().describe("Text content of the review"),
4583
- target: z20.object({
4584
- id: z20.string().optional(),
4585
- key: z20.string().optional(),
4586
- typeId: z20.enum(["product", "channel"])
5261
+ var createReviewsParameters = z23.object({
5262
+ key: z23.string().min(2).max(256).optional().describe("User-defined unique identifier for the review"),
5263
+ uniquenessValue: z23.string().optional().describe("Must be unique among reviews"),
5264
+ locale: z23.string().optional().describe("Language in which the content is written"),
5265
+ authorName: z23.string().optional().describe("Name of the author"),
5266
+ title: z23.string().optional().describe("Title of the review"),
5267
+ text: z23.string().optional().describe("Text content of the review"),
5268
+ target: z23.object({
5269
+ id: z23.string().optional(),
5270
+ key: z23.string().optional(),
5271
+ typeId: z23.enum(["product", "channel"])
4587
5272
  }).optional().describe("Identifies the target of the review (Product or Channel)"),
4588
- state: z20.object({
4589
- id: z20.string().optional(),
4590
- key: z20.string().optional(),
4591
- typeId: z20.literal("state")
5273
+ state: z23.object({
5274
+ id: z23.string().optional(),
5275
+ key: z23.string().optional(),
5276
+ typeId: z23.literal("state")
4592
5277
  }).optional().describe("State of the review used for approval processes"),
4593
- rating: z20.number().int().min(-100).max(100).optional().describe("Rating of the Product or Channel, range -100 to 100"),
4594
- customer: z20.object({
4595
- id: z20.string().optional(),
4596
- key: z20.string().optional(),
4597
- typeId: z20.literal("customer")
5278
+ rating: z23.number().int().min(-100).max(100).optional().describe("Rating of the Product or Channel, range -100 to 100"),
5279
+ customer: z23.object({
5280
+ id: z23.string().optional(),
5281
+ key: z23.string().optional(),
5282
+ typeId: z23.literal("customer")
4598
5283
  }).optional().describe("Customer who created the review"),
4599
- custom: z20.object({
4600
- type: z20.object({
4601
- id: z20.string(),
4602
- typeId: z20.literal("type")
5284
+ custom: z23.object({
5285
+ type: z23.object({
5286
+ id: z23.string(),
5287
+ typeId: z23.literal("type")
4603
5288
  }).optional(),
4604
- fields: z20.record(z20.string(), z20.any()).optional()
5289
+ fields: z23.record(z23.string(), z23.any()).optional()
4605
5290
  }).optional().describe("Custom fields for the review")
4606
5291
  });
4607
- var updateReviewsParameters = z20.object({
4608
- id: z20.string().optional().describe("The ID of the review to update"),
4609
- key: z20.string().optional().describe("The key of the review to update"),
4610
- version: z20.number().int().describe("The current version of the review"),
4611
- actions: z20.array(
4612
- z20.object({
4613
- action: z20.string().describe("The name of the update action to perform")
4614
- }).and(z20.record(z20.string(), z20.any()).optional()).describe(
5292
+ var updateReviewsParameters = z23.object({
5293
+ id: z23.string().optional().describe("The ID of the review to update"),
5294
+ key: z23.string().optional().describe("The key of the review to update"),
5295
+ version: z23.number().int().describe("The current version of the review"),
5296
+ actions: z23.array(
5297
+ z23.object({
5298
+ action: z23.string().describe("The name of the update action to perform")
5299
+ }).and(z23.record(z23.string(), z23.any()).optional()).describe(
4615
5300
  'Array of update actions to perform on the review. Each action should have an "action" field and other fields specific to that action type.'
4616
5301
  )
4617
5302
  ).describe("Update actions")
4618
5303
  });
4619
- var deleteReviewsParameters = z20.object({
4620
- id: z20.string().optional().describe("Review ID"),
4621
- key: z20.string().optional().describe("Review key"),
4622
- version: z20.number().int().describe("Current version (for optimistic locking)"),
4623
- dataErasure: z20.boolean().optional().describe("Delete personal data")
5304
+ var deleteReviewsParameters = z23.object({
5305
+ id: z23.string().optional().describe("Review ID"),
5306
+ key: z23.string().optional().describe("Review key"),
5307
+ version: z23.number().int().describe("Current version (for optimistic locking)"),
5308
+ dataErasure: z23.boolean().optional().describe("Delete personal data")
4624
5309
  });
4625
5310
 
4626
5311
  // src/resources/reviews/reviews.prompt.ts
@@ -4831,30 +5516,30 @@ async function deleteReviews(context, apiClientFactory) {
4831
5516
  }
4832
5517
 
4833
5518
  // src/resources/standalone-prices/standalone-prices.schema.ts
4834
- import { z as z21 } from "zod";
4835
- var readStandalonePricesParameters = z21.object({
4836
- id: z21.string().optional(),
4837
- key: z21.string().optional(),
4838
- sku: z21.string().optional(),
4839
- where: z21.array(z21.string()).optional(),
4840
- sort: z21.array(z21.string()).optional(),
4841
- limit: z21.number().int().min(1).max(500).optional(),
4842
- offset: z21.number().int().optional(),
4843
- expand: z21.array(z21.string()).optional()
5519
+ import { z as z24 } from "zod";
5520
+ var readStandalonePricesParameters = z24.object({
5521
+ id: z24.string().optional(),
5522
+ key: z24.string().optional(),
5523
+ sku: z24.string().optional(),
5524
+ where: z24.array(z24.string()).optional(),
5525
+ sort: z24.array(z24.string()).optional(),
5526
+ limit: z24.number().int().min(1).max(500).optional(),
5527
+ offset: z24.number().int().optional(),
5528
+ expand: z24.array(z24.string()).optional()
4844
5529
  });
4845
- var createStandalonePricesParameters = z21.object({
4846
- body: z21.record(z21.any())
5530
+ var createStandalonePricesParameters = z24.object({
5531
+ body: z24.record(z24.any())
4847
5532
  });
4848
- var updateStandalonePricesParameters = z21.object({
4849
- id: z21.string().optional(),
4850
- key: z21.string().optional(),
4851
- version: z21.number().optional(),
4852
- actions: z21.array(z21.record(z21.any())).optional()
5533
+ var updateStandalonePricesParameters = z24.object({
5534
+ id: z24.string().optional(),
5535
+ key: z24.string().optional(),
5536
+ version: z24.number().optional(),
5537
+ actions: z24.array(z24.record(z24.any())).optional()
4853
5538
  });
4854
- var deleteStandalonePricesParameters = z21.object({
4855
- id: z21.string().optional(),
4856
- key: z21.string().optional(),
4857
- version: z21.number().optional()
5539
+ var deleteStandalonePricesParameters = z24.object({
5540
+ id: z24.string().optional(),
5541
+ key: z24.string().optional(),
5542
+ version: z24.number().optional()
4858
5543
  });
4859
5544
 
4860
5545
  // src/resources/standalone-prices/standalone-prices.prompt.ts
@@ -4999,30 +5684,30 @@ async function deleteStandalonePrices(context, apiClientFactory) {
4999
5684
  }
5000
5685
 
5001
5686
  // src/resources/states/states.schema.ts
5002
- import { z as z22 } from "zod";
5003
- var readStatesParameters = z22.object({
5004
- id: z22.string().optional(),
5005
- key: z22.string().optional(),
5006
- where: z22.array(z22.string()).optional(),
5007
- sort: z22.array(z22.string()).optional(),
5008
- limit: z22.number().int().min(1).max(500).optional(),
5009
- offset: z22.number().int().optional(),
5010
- expand: z22.array(z22.string()).optional(),
5011
- withTotal: z22.boolean().optional()
5687
+ import { z as z25 } from "zod";
5688
+ var readStatesParameters = z25.object({
5689
+ id: z25.string().optional(),
5690
+ key: z25.string().optional(),
5691
+ where: z25.array(z25.string()).optional(),
5692
+ sort: z25.array(z25.string()).optional(),
5693
+ limit: z25.number().int().min(1).max(500).optional(),
5694
+ offset: z25.number().int().optional(),
5695
+ expand: z25.array(z25.string()).optional(),
5696
+ withTotal: z25.boolean().optional()
5012
5697
  });
5013
- var createStatesParameters = z22.object({
5014
- body: z22.record(z22.any())
5698
+ var createStatesParameters = z25.object({
5699
+ body: z25.record(z25.any())
5015
5700
  });
5016
- var updateStatesParameters = z22.object({
5017
- id: z22.string().optional(),
5018
- key: z22.string().optional(),
5019
- version: z22.number().optional(),
5020
- actions: z22.array(z22.record(z22.any())).optional()
5701
+ var updateStatesParameters = z25.object({
5702
+ id: z25.string().optional(),
5703
+ key: z25.string().optional(),
5704
+ version: z25.number().optional(),
5705
+ actions: z25.array(z25.record(z25.any())).optional()
5021
5706
  });
5022
- var deleteStatesParameters = z22.object({
5023
- id: z22.string().optional(),
5024
- key: z22.string().optional(),
5025
- version: z22.number().optional()
5707
+ var deleteStatesParameters = z25.object({
5708
+ id: z25.string().optional(),
5709
+ key: z25.string().optional(),
5710
+ version: z25.number().optional()
5026
5711
  });
5027
5712
 
5028
5713
  // src/resources/states/states.prompt.ts
@@ -5198,29 +5883,29 @@ async function deleteStates(context, apiClientFactory) {
5198
5883
  }
5199
5884
 
5200
5885
  // src/resources/stores/stores.schema.ts
5201
- import { z as z23 } from "zod";
5202
- var readStoresParameters = z23.object({
5203
- id: z23.string().optional(),
5204
- key: z23.string().optional(),
5205
- where: z23.array(z23.string()).optional(),
5206
- sort: z23.array(z23.string()).optional(),
5207
- limit: z23.number().int().min(1).max(500).optional(),
5208
- offset: z23.number().int().optional(),
5209
- expand: z23.array(z23.string()).optional()
5886
+ import { z as z26 } from "zod";
5887
+ var readStoresParameters = z26.object({
5888
+ id: z26.string().optional(),
5889
+ key: z26.string().optional(),
5890
+ where: z26.array(z26.string()).optional(),
5891
+ sort: z26.array(z26.string()).optional(),
5892
+ limit: z26.number().int().min(1).max(500).optional(),
5893
+ offset: z26.number().int().optional(),
5894
+ expand: z26.array(z26.string()).optional()
5210
5895
  });
5211
- var createStoresParameters = z23.object({
5212
- body: z23.record(z23.any())
5896
+ var createStoresParameters = z26.object({
5897
+ body: z26.record(z26.any())
5213
5898
  });
5214
- var updateStoresParameters = z23.object({
5215
- id: z23.string().optional(),
5216
- key: z23.string().optional(),
5217
- version: z23.number().optional(),
5218
- actions: z23.array(z23.record(z23.any())).optional()
5899
+ var updateStoresParameters = z26.object({
5900
+ id: z26.string().optional(),
5901
+ key: z26.string().optional(),
5902
+ version: z26.number().optional(),
5903
+ actions: z26.array(z26.record(z26.any())).optional()
5219
5904
  });
5220
- var deleteStoresParameters = z23.object({
5221
- id: z23.string().optional(),
5222
- key: z23.string().optional(),
5223
- version: z23.number().optional()
5905
+ var deleteStoresParameters = z26.object({
5906
+ id: z26.string().optional(),
5907
+ key: z26.string().optional(),
5908
+ version: z26.number().optional()
5224
5909
  });
5225
5910
 
5226
5911
  // src/resources/stores/stores.prompt.ts
@@ -5351,29 +6036,29 @@ async function deleteStores(context, apiClientFactory) {
5351
6036
  }
5352
6037
 
5353
6038
  // src/resources/subscriptions/subscriptions.schema.ts
5354
- import { z as z24 } from "zod";
5355
- var readSubscriptionsParameters = z24.object({
5356
- id: z24.string().optional(),
5357
- key: z24.string().optional(),
5358
- where: z24.array(z24.string()).optional(),
5359
- sort: z24.array(z24.string()).optional(),
5360
- limit: z24.number().int().min(1).max(500).optional(),
5361
- offset: z24.number().int().optional(),
5362
- expand: z24.array(z24.string()).optional()
6039
+ import { z as z27 } from "zod";
6040
+ var readSubscriptionsParameters = z27.object({
6041
+ id: z27.string().optional(),
6042
+ key: z27.string().optional(),
6043
+ where: z27.array(z27.string()).optional(),
6044
+ sort: z27.array(z27.string()).optional(),
6045
+ limit: z27.number().int().min(1).max(500).optional(),
6046
+ offset: z27.number().int().optional(),
6047
+ expand: z27.array(z27.string()).optional()
5363
6048
  });
5364
- var createSubscriptionsParameters = z24.object({
5365
- body: z24.record(z24.any())
6049
+ var createSubscriptionsParameters = z27.object({
6050
+ body: z27.record(z27.any())
5366
6051
  });
5367
- var updateSubscriptionsParameters = z24.object({
5368
- id: z24.string().optional(),
5369
- key: z24.string().optional(),
5370
- version: z24.number().optional(),
5371
- actions: z24.array(z24.record(z24.any())).optional()
6052
+ var updateSubscriptionsParameters = z27.object({
6053
+ id: z27.string().optional(),
6054
+ key: z27.string().optional(),
6055
+ version: z27.number().optional(),
6056
+ actions: z27.array(z27.record(z27.any())).optional()
5372
6057
  });
5373
- var deleteSubscriptionsParameters = z24.object({
5374
- id: z24.string().optional(),
5375
- key: z24.string().optional(),
5376
- version: z24.number().optional()
6058
+ var deleteSubscriptionsParameters = z27.object({
6059
+ id: z27.string().optional(),
6060
+ key: z27.string().optional(),
6061
+ version: z27.number().optional()
5377
6062
  });
5378
6063
 
5379
6064
  // src/resources/subscriptions/subscriptions.prompt.ts
@@ -5561,60 +6246,60 @@ async function deleteSubscriptions(context, apiClientFactory) {
5561
6246
  }
5562
6247
 
5563
6248
  // src/resources/tax-categories/tax-categories.schema.ts
5564
- import { z as z25 } from "zod";
5565
- var readTaxCategoriesParameters = z25.object({
5566
- id: z25.string().optional().describe("Tax Category ID"),
5567
- key: z25.string().optional().describe("Tax Category key"),
5568
- where: z25.array(z25.string()).optional().describe(
6249
+ import { z as z28 } from "zod";
6250
+ var readTaxCategoriesParameters = z28.object({
6251
+ id: z28.string().optional().describe("Tax Category ID"),
6252
+ key: z28.string().optional().describe("Tax Category key"),
6253
+ where: z28.array(z28.string()).optional().describe(
5569
6254
  'Query predicates specified as strings. Example: ["name = \\"Standard\\""]'
5570
6255
  ),
5571
- sort: z25.array(z25.string()).optional().describe(
6256
+ sort: z28.array(z28.string()).optional().describe(
5572
6257
  'Sort criteria for the results. Example: ["name asc", "createdAt desc"]'
5573
6258
  ),
5574
- limit: z25.number().int().min(1).max(500).optional().describe(
6259
+ limit: z28.number().int().min(1).max(500).optional().describe(
5575
6260
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
5576
6261
  ),
5577
- offset: z25.number().int().min(0).optional().describe(
6262
+ offset: z28.number().int().min(0).optional().describe(
5578
6263
  "The number of items to skip before starting to collect the result set."
5579
6264
  ),
5580
- expand: z25.array(z25.string()).optional().describe("Fields to expand. Example: []")
6265
+ expand: z28.array(z28.string()).optional().describe("Fields to expand. Example: []")
5581
6266
  });
5582
- var createTaxCategoriesParameters = z25.object({
5583
- key: z25.string().min(2).max(256).optional().describe("User-defined unique identifier for the tax category"),
5584
- name: z25.string().describe("Tax Category name"),
5585
- description: z25.string().optional().describe("Tax Category description"),
5586
- rates: z25.array(
5587
- z25.object({
5588
- name: z25.string().describe("Tax rate name"),
5589
- amount: z25.number().min(0).max(1).optional().describe("Tax rate amount (0-1)"),
5590
- includedInPrice: z25.boolean().optional().describe("Whether the tax is included in the price"),
5591
- country: z25.string().describe("Country code (ISO 3166-1 alpha-2)"),
5592
- state: z25.string().optional().describe("State within the country"),
5593
- subRates: z25.array(
5594
- z25.object({
5595
- name: z25.string(),
5596
- amount: z25.number().min(0).max(1).optional()
6267
+ var createTaxCategoriesParameters = z28.object({
6268
+ key: z28.string().min(2).max(256).optional().describe("User-defined unique identifier for the tax category"),
6269
+ name: z28.string().describe("Tax Category name"),
6270
+ description: z28.string().optional().describe("Tax Category description"),
6271
+ rates: z28.array(
6272
+ z28.object({
6273
+ name: z28.string().describe("Tax rate name"),
6274
+ amount: z28.number().min(0).max(1).optional().describe("Tax rate amount (0-1)"),
6275
+ includedInPrice: z28.boolean().optional().describe("Whether the tax is included in the price"),
6276
+ country: z28.string().describe("Country code (ISO 3166-1 alpha-2)"),
6277
+ state: z28.string().optional().describe("State within the country"),
6278
+ subRates: z28.array(
6279
+ z28.object({
6280
+ name: z28.string(),
6281
+ amount: z28.number().min(0).max(1).optional()
5597
6282
  })
5598
6283
  ).optional().describe("Sub-rates for the tax rate")
5599
6284
  })
5600
6285
  ).optional().describe("Array of tax rates")
5601
6286
  });
5602
- var updateTaxCategoriesParameters = z25.object({
5603
- id: z25.string().optional().describe("The ID of the tax category to update"),
5604
- key: z25.string().optional().describe("The key of the tax category to update"),
5605
- version: z25.number().int().describe("The current version of the tax category"),
5606
- actions: z25.array(
5607
- z25.object({
5608
- action: z25.string().describe("The name of the update action to perform")
5609
- }).and(z25.record(z25.string(), z25.any()).optional()).describe(
6287
+ var updateTaxCategoriesParameters = z28.object({
6288
+ id: z28.string().optional().describe("The ID of the tax category to update"),
6289
+ key: z28.string().optional().describe("The key of the tax category to update"),
6290
+ version: z28.number().int().describe("The current version of the tax category"),
6291
+ actions: z28.array(
6292
+ z28.object({
6293
+ action: z28.string().describe("The name of the update action to perform")
6294
+ }).and(z28.record(z28.string(), z28.any()).optional()).describe(
5610
6295
  '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.'
5611
6296
  )
5612
6297
  ).describe("Update actions")
5613
6298
  });
5614
- var deleteTaxCategoriesParameters = z25.object({
5615
- id: z25.string().optional().describe("Tax Category ID"),
5616
- key: z25.string().optional().describe("Tax Category key"),
5617
- version: z25.number().int().describe("Current version (for optimistic locking)")
6299
+ var deleteTaxCategoriesParameters = z28.object({
6300
+ id: z28.string().optional().describe("Tax Category ID"),
6301
+ key: z28.string().optional().describe("Tax Category key"),
6302
+ version: z28.number().int().describe("Current version (for optimistic locking)")
5618
6303
  });
5619
6304
 
5620
6305
  // src/resources/tax-categories/tax-categories.prompt.ts
@@ -5818,59 +6503,59 @@ async function deleteTaxCategories(context, apiClientFactory) {
5818
6503
  }
5819
6504
 
5820
6505
  // src/resources/types/types.schema.ts
5821
- import { z as z26 } from "zod";
5822
- var readTypesParameters = z26.object({
5823
- id: z26.string().optional().describe("Type ID"),
5824
- key: z26.string().optional().describe("Type key"),
5825
- where: z26.array(z26.string()).optional().describe(
6506
+ import { z as z29 } from "zod";
6507
+ var readTypesParameters = z29.object({
6508
+ id: z29.string().optional().describe("Type ID"),
6509
+ key: z29.string().optional().describe("Type key"),
6510
+ where: z29.array(z29.string()).optional().describe(
5826
6511
  'Query predicates specified as strings. Example: ["key = \\"my-type\\""]'
5827
6512
  ),
5828
- sort: z26.array(z26.string()).optional().describe(
6513
+ sort: z29.array(z29.string()).optional().describe(
5829
6514
  'Sort criteria for the results. Example: ["key asc", "createdAt desc"]'
5830
6515
  ),
5831
- limit: z26.number().int().min(1).max(500).optional().describe(
6516
+ limit: z29.number().int().min(1).max(500).optional().describe(
5832
6517
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
5833
6518
  ),
5834
- offset: z26.number().int().min(0).optional().describe(
6519
+ offset: z29.number().int().min(0).optional().describe(
5835
6520
  "The number of items to skip before starting to collect the result set."
5836
6521
  ),
5837
- expand: z26.array(z26.string()).optional().describe("Fields to expand. Example: []")
6522
+ expand: z29.array(z29.string()).optional().describe("Fields to expand. Example: []")
5838
6523
  });
5839
- var createTypesParameters = z26.object({
5840
- key: z26.string().min(2).max(256).describe("User-defined unique identifier for the type"),
5841
- name: z26.record(z26.string()).describe(
6524
+ var createTypesParameters = z29.object({
6525
+ key: z29.string().min(2).max(256).describe("User-defined unique identifier for the type"),
6526
+ name: z29.record(z29.string()).describe(
5842
6527
  "Type name (localized string, object with language codes as keys)"
5843
6528
  ),
5844
- description: z26.record(z26.string()).optional().describe("Type description (localized string)"),
5845
- resourceTypeIds: z26.array(z26.string()).describe(
6529
+ description: z29.record(z29.string()).optional().describe("Type description (localized string)"),
6530
+ resourceTypeIds: z29.array(z29.string()).describe(
5846
6531
  'Resource types that can be customized with this type. Example: ["category", "product"]'
5847
6532
  ),
5848
- fieldDefinitions: z26.array(
5849
- z26.object({
5850
- name: z26.string().describe("Field name"),
5851
- label: z26.record(z26.string()).describe("Localized label for the field"),
5852
- required: z26.boolean().optional().describe("Whether the field is required"),
5853
- inputHint: z26.enum(["SingleLine", "MultiLine"]).optional().describe("Input hint for String fields"),
5854
- type: z26.any().describe("Field type definition")
6533
+ fieldDefinitions: z29.array(
6534
+ z29.object({
6535
+ name: z29.string().describe("Field name"),
6536
+ label: z29.record(z29.string()).describe("Localized label for the field"),
6537
+ required: z29.boolean().optional().describe("Whether the field is required"),
6538
+ inputHint: z29.enum(["SingleLine", "MultiLine"]).optional().describe("Input hint for String fields"),
6539
+ type: z29.any().describe("Field type definition")
5855
6540
  })
5856
6541
  ).optional().describe("Array of field definitions")
5857
6542
  });
5858
- var updateTypesParameters = z26.object({
5859
- id: z26.string().optional().describe("The ID of the type to update"),
5860
- key: z26.string().optional().describe("The key of the type to update"),
5861
- version: z26.number().int().describe("The current version of the type"),
5862
- actions: z26.array(
5863
- z26.object({
5864
- action: z26.string().describe("The name of the update action to perform")
5865
- }).and(z26.record(z26.string(), z26.any()).optional()).describe(
6543
+ var updateTypesParameters = z29.object({
6544
+ id: z29.string().optional().describe("The ID of the type to update"),
6545
+ key: z29.string().optional().describe("The key of the type to update"),
6546
+ version: z29.number().int().describe("The current version of the type"),
6547
+ actions: z29.array(
6548
+ z29.object({
6549
+ action: z29.string().describe("The name of the update action to perform")
6550
+ }).and(z29.record(z29.string(), z29.any()).optional()).describe(
5866
6551
  'Array of update actions to perform on the type. Each action should have an "action" field and other fields specific to that action type.'
5867
6552
  )
5868
6553
  ).describe("Update actions")
5869
6554
  });
5870
- var deleteTypesParameters = z26.object({
5871
- id: z26.string().optional().describe("Type ID"),
5872
- key: z26.string().optional().describe("Type key"),
5873
- version: z26.number().int().describe("Current version (for optimistic locking)")
6555
+ var deleteTypesParameters = z29.object({
6556
+ id: z29.string().optional().describe("Type ID"),
6557
+ key: z29.string().optional().describe("Type key"),
6558
+ version: z29.number().int().describe("Current version (for optimistic locking)")
5874
6559
  });
5875
6560
 
5876
6561
  // src/resources/types/types.prompt.ts
@@ -6068,51 +6753,51 @@ async function deleteTypes(context, apiClientFactory) {
6068
6753
  }
6069
6754
 
6070
6755
  // src/resources/zones/zones.schema.ts
6071
- import { z as z27 } from "zod";
6072
- var readZonesParameters = z27.object({
6073
- id: z27.string().optional().describe("Zone ID"),
6074
- key: z27.string().optional().describe("Zone key"),
6075
- where: z27.array(z27.string()).optional().describe(
6756
+ import { z as z30 } from "zod";
6757
+ var readZonesParameters = z30.object({
6758
+ id: z30.string().optional().describe("Zone ID"),
6759
+ key: z30.string().optional().describe("Zone key"),
6760
+ where: z30.array(z30.string()).optional().describe(
6076
6761
  'Query predicates specified as strings. Example: ["name = \\"Europe\\""]'
6077
6762
  ),
6078
- sort: z27.array(z27.string()).optional().describe(
6763
+ sort: z30.array(z30.string()).optional().describe(
6079
6764
  'Sort criteria for the results. Example: ["name asc", "createdAt desc"]'
6080
6765
  ),
6081
- limit: z27.number().int().min(1).max(500).optional().describe(
6766
+ limit: z30.number().int().min(1).max(500).optional().describe(
6082
6767
  "A limit on the number of objects to be returned. Limit can range between 1 and 500, and the default is 20."
6083
6768
  ),
6084
- offset: z27.number().int().min(0).optional().describe(
6769
+ offset: z30.number().int().min(0).optional().describe(
6085
6770
  "The number of items to skip before starting to collect the result set."
6086
6771
  ),
6087
- expand: z27.array(z27.string()).optional().describe("Fields to expand. Example: []")
6772
+ expand: z30.array(z30.string()).optional().describe("Fields to expand. Example: []")
6088
6773
  });
6089
- var createZonesParameters = z27.object({
6090
- key: z27.string().min(2).max(256).optional().describe("User-defined unique identifier for the zone"),
6091
- name: z27.string().describe("Zone name"),
6092
- description: z27.string().optional().describe("Zone description"),
6093
- locations: z27.array(
6094
- z27.object({
6095
- country: z27.string().describe("Country code (ISO 3166-1 alpha-2)"),
6096
- state: z27.string().optional().describe("State within the country")
6774
+ var createZonesParameters = z30.object({
6775
+ key: z30.string().min(2).max(256).optional().describe("User-defined unique identifier for the zone"),
6776
+ name: z30.string().describe("Zone name"),
6777
+ description: z30.string().optional().describe("Zone description"),
6778
+ locations: z30.array(
6779
+ z30.object({
6780
+ country: z30.string().describe("Country code (ISO 3166-1 alpha-2)"),
6781
+ state: z30.string().optional().describe("State within the country")
6097
6782
  })
6098
6783
  ).optional().describe("Array of locations (countries and optionally states)")
6099
6784
  });
6100
- var updateZonesParameters = z27.object({
6101
- id: z27.string().optional().describe("The ID of the zone to update"),
6102
- key: z27.string().optional().describe("The key of the zone to update"),
6103
- version: z27.number().int().describe("The current version of the zone"),
6104
- actions: z27.array(
6105
- z27.object({
6106
- action: z27.string().describe("The name of the update action to perform")
6107
- }).and(z27.record(z27.string(), z27.any()).optional()).describe(
6785
+ var updateZonesParameters = z30.object({
6786
+ id: z30.string().optional().describe("The ID of the zone to update"),
6787
+ key: z30.string().optional().describe("The key of the zone to update"),
6788
+ version: z30.number().int().describe("The current version of the zone"),
6789
+ actions: z30.array(
6790
+ z30.object({
6791
+ action: z30.string().describe("The name of the update action to perform")
6792
+ }).and(z30.record(z30.string(), z30.any()).optional()).describe(
6108
6793
  'Array of update actions to perform on the zone. Each action should have an "action" field and other fields specific to that action type.'
6109
6794
  )
6110
6795
  ).describe("Update actions")
6111
6796
  });
6112
- var deleteZonesParameters = z27.object({
6113
- id: z27.string().optional().describe("Zone ID"),
6114
- key: z27.string().optional().describe("Zone key"),
6115
- version: z27.number().int().describe("Current version (for optimistic locking)")
6797
+ var deleteZonesParameters = z30.object({
6798
+ id: z30.string().optional().describe("Zone ID"),
6799
+ key: z30.string().optional().describe("Zone key"),
6800
+ version: z30.number().int().describe("Current version (for optimistic locking)")
6116
6801
  });
6117
6802
 
6118
6803
  // src/resources/zones/zones.prompt.ts
@@ -6305,11 +6990,15 @@ export {
6305
6990
  ApiClientFactory,
6306
6991
  AttributeGroupsHandler,
6307
6992
  BaseResourceHandler,
6993
+ CartsHandler,
6308
6994
  CategoriesHandler,
6309
6995
  ChannelsHandler,
6310
6996
  CommercetoolsAPIClient,
6311
6997
  CustomObjectsHandler,
6998
+ CustomerGroupsHandler,
6999
+ CustomerSearchHandler,
6312
7000
  CustomersHandler,
7001
+ DEFAULT_API_URL,
6313
7002
  DiscountCodesHandler,
6314
7003
  ExtensionsHandler,
6315
7004
  InventoryHandler,
@@ -6335,9 +7024,12 @@ export {
6335
7024
  TypesHandler,
6336
7025
  ZonesHandler,
6337
7026
  createAttributeGroups,
7027
+ createCarts,
6338
7028
  createCategories,
6339
7029
  createChannels,
6340
7030
  createCustomObjects,
7031
+ createCustomerGroups,
7032
+ createCustomerSearch,
6341
7033
  createCustomers,
6342
7034
  createDiscountCodes,
6343
7035
  createExtensions,
@@ -6359,9 +7051,12 @@ export {
6359
7051
  createTypes,
6360
7052
  createZones,
6361
7053
  deleteAttributeGroups,
7054
+ deleteCarts,
6362
7055
  deleteCategories,
6363
7056
  deleteChannels,
6364
7057
  deleteCustomObjects,
7058
+ deleteCustomerGroups,
7059
+ deleteCustomerSearch,
6365
7060
  deleteCustomers,
6366
7061
  deleteDiscountCodes,
6367
7062
  deleteExtensions,
@@ -6384,9 +7079,12 @@ export {
6384
7079
  deleteZones,
6385
7080
  getDecoratorRegisteredHandlers,
6386
7081
  readAttributeGroups,
7082
+ readCarts,
6387
7083
  readCategories,
6388
7084
  readChannels,
6389
7085
  readCustomObjects,
7086
+ readCustomerGroups,
7087
+ readCustomerSearch,
6390
7088
  readCustomers,
6391
7089
  readDiscountCodes,
6392
7090
  readExtensions,
@@ -6409,9 +7107,12 @@ export {
6409
7107
  readTypes,
6410
7108
  readZones,
6411
7109
  updateAttributeGroups,
7110
+ updateCarts,
6412
7111
  updateCategories,
6413
7112
  updateChannels,
6414
7113
  updateCustomObjects,
7114
+ updateCustomerGroups,
7115
+ updateCustomerSearch,
6415
7116
  updateCustomers,
6416
7117
  updateDiscountCodes,
6417
7118
  updateExtensions,