@wix/auto_sdk_stores_customizations-v-3 1.0.78 → 1.0.79

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.
@@ -838,6 +838,1523 @@ function bulkUpdateCustomizations(payload) {
838
838
  import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
839
839
  import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
840
840
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
841
+
842
+ // src/stores-catalog-v3-customization-customizations-v-3.schemas.ts
843
+ import * as z from "zod";
844
+ var CreateCustomizationRequest = z.object({
845
+ customization: z.intersection(
846
+ z.object({
847
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
848
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
849
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
850
+ ).optional().nullable(),
851
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
852
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
853
+ key: z.string().describe(
854
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
855
+ ).min(1).max(50).optional().nullable(),
856
+ name: z.string().describe(
857
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
858
+ ).min(1).max(50),
859
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]),
860
+ customizationRenderType: z.enum([
861
+ "FREE_TEXT",
862
+ "TEXT_CHOICES",
863
+ "SWATCH_CHOICES"
864
+ ]),
865
+ assignedProductsCount: z.number().int().describe(
866
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
867
+ ).optional().nullable()
868
+ }),
869
+ z.xor([
870
+ z.object({
871
+ choicesSettings: z.never().optional(),
872
+ freeTextInput: z.object({
873
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
874
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
875
+ defaultAddedPrice: z.string().describe(
876
+ "Default amount added to a product's price when this choice is assigned to a modifier."
877
+ ).optional().nullable(),
878
+ title: z.string().describe(
879
+ "Title to display to customer for their free-text input."
880
+ ).min(1).max(100),
881
+ key: z.string().describe(
882
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
883
+ ).min(1).max(150).optional().nullable()
884
+ }).describe(
885
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
886
+ )
887
+ }),
888
+ z.object({
889
+ freeTextInput: z.never().optional(),
890
+ choicesSettings: z.object({
891
+ choices: z.array(
892
+ z.intersection(
893
+ z.object({
894
+ _id: z.string().describe("Choice ID.").regex(
895
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
896
+ "Must be a valid GUID"
897
+ ).optional(),
898
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
899
+ key: z.string().describe(
900
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
901
+ ).min(1).max(50).optional().nullable(),
902
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
903
+ defaultAddedPrice: z.string().describe(
904
+ "Default amount added to a product's price when this customization is assigned to a modifier."
905
+ ).optional().nullable()
906
+ }),
907
+ z.xor([
908
+ z.object({ colorCode: z.never().optional() }),
909
+ z.object({
910
+ colorCode: z.string().describe(
911
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
912
+ ).min(3).max(20)
913
+ })
914
+ ])
915
+ )
916
+ ).min(1).max(200)
917
+ }).describe(
918
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
919
+ )
920
+ })
921
+ ])
922
+ ).describe("Customization to create.")
923
+ });
924
+ var CreateCustomizationResponse = z.intersection(
925
+ z.object({
926
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
927
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
928
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
929
+ ).optional().nullable(),
930
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
931
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
932
+ key: z.string().describe(
933
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
934
+ ).min(1).max(50).optional().nullable(),
935
+ name: z.string().describe(
936
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
937
+ ).min(1).max(50).optional(),
938
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
939
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
940
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
941
+ ).optional(),
942
+ assignedProductsCount: z.number().int().describe(
943
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
944
+ ).optional().nullable()
945
+ }),
946
+ z.xor([
947
+ z.object({
948
+ freeTextInput: z.never().optional(),
949
+ choicesSettings: z.never().optional()
950
+ }),
951
+ z.object({
952
+ choicesSettings: z.never().optional(),
953
+ freeTextInput: z.object({
954
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
955
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
956
+ defaultAddedPrice: z.string().describe(
957
+ "Default amount added to a product's price when this choice is assigned to a modifier."
958
+ ).optional().nullable(),
959
+ title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
960
+ key: z.string().describe(
961
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
962
+ ).min(1).max(150).optional().nullable()
963
+ }).describe(
964
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
965
+ )
966
+ }),
967
+ z.object({
968
+ freeTextInput: z.never().optional(),
969
+ choicesSettings: z.object({
970
+ choices: z.array(
971
+ z.intersection(
972
+ z.object({
973
+ _id: z.string().describe("Choice ID.").regex(
974
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
975
+ "Must be a valid GUID"
976
+ ).optional(),
977
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
978
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
979
+ ).optional(),
980
+ key: z.string().describe(
981
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
982
+ ).min(1).max(50).optional().nullable(),
983
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
984
+ defaultAddedPrice: z.string().describe(
985
+ "Default amount added to a product's price when this customization is assigned to a modifier."
986
+ ).optional().nullable()
987
+ }),
988
+ z.xor([
989
+ z.object({ colorCode: z.never().optional() }),
990
+ z.object({
991
+ colorCode: z.string().describe(
992
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
993
+ ).min(3).max(20)
994
+ })
995
+ ])
996
+ )
997
+ ).min(1).max(200).optional()
998
+ }).describe(
999
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1000
+ )
1001
+ })
1002
+ ])
1003
+ );
1004
+ var GetCustomizationRequest = z.object({
1005
+ customizationId: z.string().describe("Customization ID.").regex(
1006
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1007
+ "Must be a valid GUID"
1008
+ ),
1009
+ options: z.object({
1010
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1011
+ }).optional()
1012
+ });
1013
+ var GetCustomizationResponse = z.intersection(
1014
+ z.object({
1015
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1016
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1017
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1018
+ ).optional().nullable(),
1019
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1020
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1021
+ key: z.string().describe(
1022
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1023
+ ).min(1).max(50).optional().nullable(),
1024
+ name: z.string().describe(
1025
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1026
+ ).min(1).max(50).optional(),
1027
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1028
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1029
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1030
+ ).optional(),
1031
+ assignedProductsCount: z.number().int().describe(
1032
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1033
+ ).optional().nullable()
1034
+ }),
1035
+ z.xor([
1036
+ z.object({
1037
+ freeTextInput: z.never().optional(),
1038
+ choicesSettings: z.never().optional()
1039
+ }),
1040
+ z.object({
1041
+ choicesSettings: z.never().optional(),
1042
+ freeTextInput: z.object({
1043
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1044
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1045
+ defaultAddedPrice: z.string().describe(
1046
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1047
+ ).optional().nullable(),
1048
+ title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
1049
+ key: z.string().describe(
1050
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1051
+ ).min(1).max(150).optional().nullable()
1052
+ }).describe(
1053
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1054
+ )
1055
+ }),
1056
+ z.object({
1057
+ freeTextInput: z.never().optional(),
1058
+ choicesSettings: z.object({
1059
+ choices: z.array(
1060
+ z.intersection(
1061
+ z.object({
1062
+ _id: z.string().describe("Choice ID.").regex(
1063
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1064
+ "Must be a valid GUID"
1065
+ ).optional(),
1066
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1067
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
1068
+ ).optional(),
1069
+ key: z.string().describe(
1070
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1071
+ ).min(1).max(50).optional().nullable(),
1072
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1073
+ defaultAddedPrice: z.string().describe(
1074
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1075
+ ).optional().nullable()
1076
+ }),
1077
+ z.xor([
1078
+ z.object({ colorCode: z.never().optional() }),
1079
+ z.object({
1080
+ colorCode: z.string().describe(
1081
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1082
+ ).min(3).max(20)
1083
+ })
1084
+ ])
1085
+ )
1086
+ ).min(1).max(200).optional()
1087
+ }).describe(
1088
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1089
+ )
1090
+ })
1091
+ ])
1092
+ );
1093
+ var UpdateCustomizationRequest = z.object({
1094
+ _id: z.string().describe("Customization ID.").min(1).max(36),
1095
+ customization: z.intersection(
1096
+ z.object({
1097
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1098
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1099
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1100
+ ),
1101
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1102
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1103
+ key: z.string().describe(
1104
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1105
+ ).min(1).max(50).optional().nullable(),
1106
+ name: z.string().describe(
1107
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1108
+ ).min(1).max(50).optional(),
1109
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
1110
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
1111
+ assignedProductsCount: z.number().int().describe(
1112
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1113
+ ).optional().nullable()
1114
+ }),
1115
+ z.xor([
1116
+ z.object({
1117
+ freeTextInput: z.never().optional(),
1118
+ choicesSettings: z.never().optional()
1119
+ }),
1120
+ z.object({
1121
+ choicesSettings: z.never().optional(),
1122
+ freeTextInput: z.object({
1123
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1124
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1125
+ defaultAddedPrice: z.string().describe(
1126
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1127
+ ).optional().nullable(),
1128
+ title: z.string().describe(
1129
+ "Title to display to customer for their free-text input."
1130
+ ).min(1).max(100).optional(),
1131
+ key: z.string().describe(
1132
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1133
+ ).min(1).max(150).optional().nullable()
1134
+ }).describe(
1135
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1136
+ )
1137
+ }),
1138
+ z.object({
1139
+ freeTextInput: z.never().optional(),
1140
+ choicesSettings: z.object({
1141
+ choices: z.array(
1142
+ z.intersection(
1143
+ z.object({
1144
+ _id: z.string().describe("Choice ID.").regex(
1145
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1146
+ "Must be a valid GUID"
1147
+ ),
1148
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
1149
+ key: z.string().describe(
1150
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1151
+ ).min(1).max(50).optional().nullable(),
1152
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1153
+ defaultAddedPrice: z.string().describe(
1154
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1155
+ ).optional().nullable()
1156
+ }),
1157
+ z.xor([
1158
+ z.object({ colorCode: z.never().optional() }),
1159
+ z.object({
1160
+ colorCode: z.string().describe(
1161
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1162
+ ).min(3).max(20)
1163
+ })
1164
+ ])
1165
+ )
1166
+ ).min(1).max(200).optional()
1167
+ }).describe(
1168
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1169
+ )
1170
+ })
1171
+ ])
1172
+ ).describe("Customization to update."),
1173
+ options: z.object({
1174
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1175
+ }).optional()
1176
+ });
1177
+ var UpdateCustomizationResponse = z.intersection(
1178
+ z.object({
1179
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1180
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1181
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1182
+ ).optional().nullable(),
1183
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1184
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1185
+ key: z.string().describe(
1186
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1187
+ ).min(1).max(50).optional().nullable(),
1188
+ name: z.string().describe(
1189
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1190
+ ).min(1).max(50).optional(),
1191
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1192
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1193
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1194
+ ).optional(),
1195
+ assignedProductsCount: z.number().int().describe(
1196
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1197
+ ).optional().nullable()
1198
+ }),
1199
+ z.xor([
1200
+ z.object({
1201
+ freeTextInput: z.never().optional(),
1202
+ choicesSettings: z.never().optional()
1203
+ }),
1204
+ z.object({
1205
+ choicesSettings: z.never().optional(),
1206
+ freeTextInput: z.object({
1207
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1208
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1209
+ defaultAddedPrice: z.string().describe(
1210
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1211
+ ).optional().nullable(),
1212
+ title: z.string().describe("Title to display to customer for their free-text input.").min(1).max(100).optional(),
1213
+ key: z.string().describe(
1214
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1215
+ ).min(1).max(150).optional().nullable()
1216
+ }).describe(
1217
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1218
+ )
1219
+ }),
1220
+ z.object({
1221
+ freeTextInput: z.never().optional(),
1222
+ choicesSettings: z.object({
1223
+ choices: z.array(
1224
+ z.intersection(
1225
+ z.object({
1226
+ _id: z.string().describe("Choice ID.").regex(
1227
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1228
+ "Must be a valid GUID"
1229
+ ).optional(),
1230
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1231
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
1232
+ ).optional(),
1233
+ key: z.string().describe(
1234
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1235
+ ).min(1).max(50).optional().nullable(),
1236
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1237
+ defaultAddedPrice: z.string().describe(
1238
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1239
+ ).optional().nullable()
1240
+ }),
1241
+ z.xor([
1242
+ z.object({ colorCode: z.never().optional() }),
1243
+ z.object({
1244
+ colorCode: z.string().describe(
1245
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1246
+ ).min(3).max(20)
1247
+ })
1248
+ ])
1249
+ )
1250
+ ).min(1).max(200).optional()
1251
+ }).describe(
1252
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1253
+ )
1254
+ })
1255
+ ])
1256
+ );
1257
+ var DeleteCustomizationRequest = z.object({
1258
+ customizationId: z.string().describe("Customization ID.").regex(
1259
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1260
+ "Must be a valid GUID"
1261
+ )
1262
+ });
1263
+ var DeleteCustomizationResponse = z.object({});
1264
+ var QueryCustomizationsRequest = z.object({
1265
+ query: z.object({
1266
+ filter: z.object({
1267
+ _id: z.object({
1268
+ $eq: z.string(),
1269
+ $exists: z.boolean(),
1270
+ $gt: z.string(),
1271
+ $gte: z.string(),
1272
+ $hasAll: z.array(z.string()),
1273
+ $hasSome: z.array(z.string()),
1274
+ $in: z.array(z.string()),
1275
+ $lt: z.string(),
1276
+ $lte: z.string(),
1277
+ $ne: z.string(),
1278
+ $nin: z.array(z.string()),
1279
+ $startsWith: z.string()
1280
+ }).partial().strict().optional(),
1281
+ _createdDate: z.object({
1282
+ $eq: z.string(),
1283
+ $exists: z.boolean(),
1284
+ $gt: z.string(),
1285
+ $gte: z.string(),
1286
+ $hasAll: z.array(z.string()),
1287
+ $hasSome: z.array(z.string()),
1288
+ $in: z.array(z.string()),
1289
+ $lt: z.string(),
1290
+ $lte: z.string(),
1291
+ $ne: z.string(),
1292
+ $nin: z.array(z.string()),
1293
+ $startsWith: z.string()
1294
+ }).partial().strict().optional(),
1295
+ _updatedDate: z.object({
1296
+ $eq: z.string(),
1297
+ $exists: z.boolean(),
1298
+ $gt: z.string(),
1299
+ $gte: z.string(),
1300
+ $hasAll: z.array(z.string()),
1301
+ $hasSome: z.array(z.string()),
1302
+ $in: z.array(z.string()),
1303
+ $lt: z.string(),
1304
+ $lte: z.string(),
1305
+ $ne: z.string(),
1306
+ $nin: z.array(z.string()),
1307
+ $startsWith: z.string()
1308
+ }).partial().strict().optional(),
1309
+ name: z.object({
1310
+ $eq: z.string(),
1311
+ $exists: z.boolean(),
1312
+ $gt: z.string(),
1313
+ $gte: z.string(),
1314
+ $hasAll: z.array(z.string()),
1315
+ $hasSome: z.array(z.string()),
1316
+ $in: z.array(z.string()),
1317
+ $lt: z.string(),
1318
+ $lte: z.string(),
1319
+ $ne: z.string(),
1320
+ $nin: z.array(z.string()),
1321
+ $startsWith: z.string()
1322
+ }).partial().strict().optional(),
1323
+ customizationType: z.object({
1324
+ $eq: z.string(),
1325
+ $exists: z.boolean(),
1326
+ $gt: z.string(),
1327
+ $gte: z.string(),
1328
+ $hasAll: z.array(z.string()),
1329
+ $hasSome: z.array(z.string()),
1330
+ $in: z.array(z.string()),
1331
+ $lt: z.string(),
1332
+ $lte: z.string(),
1333
+ $ne: z.string(),
1334
+ $nin: z.array(z.string()),
1335
+ $startsWith: z.string()
1336
+ }).partial().strict().optional(),
1337
+ customizationRenderType: z.object({
1338
+ $eq: z.string(),
1339
+ $exists: z.boolean(),
1340
+ $gt: z.string(),
1341
+ $gte: z.string(),
1342
+ $hasAll: z.array(z.string()),
1343
+ $hasSome: z.array(z.string()),
1344
+ $in: z.array(z.string()),
1345
+ $lt: z.string(),
1346
+ $lte: z.string(),
1347
+ $ne: z.string(),
1348
+ $nin: z.array(z.string()),
1349
+ $startsWith: z.string()
1350
+ }).partial().strict().optional(),
1351
+ $and: z.array(z.any()).optional(),
1352
+ $or: z.array(z.any()).optional(),
1353
+ $not: z.any().optional()
1354
+ }).strict().optional(),
1355
+ sort: z.array(
1356
+ z.object({
1357
+ fieldName: z.enum(["_id", "_createdDate", "_updatedDate", "name"]).optional(),
1358
+ order: z.enum(["ASC", "DESC"]).optional()
1359
+ })
1360
+ ).optional()
1361
+ }).catchall(z.any()).describe("Query options."),
1362
+ options: z.object({
1363
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1364
+ }).optional()
1365
+ });
1366
+ var QueryCustomizationsResponse = z.object({
1367
+ customizations: z.array(
1368
+ z.intersection(
1369
+ z.object({
1370
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1371
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1372
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1373
+ ).optional().nullable(),
1374
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1375
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1376
+ key: z.string().describe(
1377
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1378
+ ).min(1).max(50).optional().nullable(),
1379
+ name: z.string().describe(
1380
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1381
+ ).min(1).max(50).optional(),
1382
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1383
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1384
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1385
+ ).optional(),
1386
+ assignedProductsCount: z.number().int().describe(
1387
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1388
+ ).optional().nullable()
1389
+ }),
1390
+ z.xor([
1391
+ z.object({
1392
+ freeTextInput: z.never().optional(),
1393
+ choicesSettings: z.never().optional()
1394
+ }),
1395
+ z.object({
1396
+ choicesSettings: z.never().optional(),
1397
+ freeTextInput: z.object({
1398
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1399
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1400
+ defaultAddedPrice: z.string().describe(
1401
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1402
+ ).optional().nullable(),
1403
+ title: z.string().describe(
1404
+ "Title to display to customer for their free-text input."
1405
+ ).min(1).max(100).optional(),
1406
+ key: z.string().describe(
1407
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1408
+ ).min(1).max(150).optional().nullable()
1409
+ }).describe(
1410
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1411
+ )
1412
+ }),
1413
+ z.object({
1414
+ freeTextInput: z.never().optional(),
1415
+ choicesSettings: z.object({
1416
+ choices: z.array(
1417
+ z.intersection(
1418
+ z.object({
1419
+ _id: z.string().describe("Choice ID.").regex(
1420
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1421
+ "Must be a valid GUID"
1422
+ ).optional(),
1423
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1424
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
1425
+ ).optional(),
1426
+ key: z.string().describe(
1427
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1428
+ ).min(1).max(50).optional().nullable(),
1429
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1430
+ defaultAddedPrice: z.string().describe(
1431
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1432
+ ).optional().nullable()
1433
+ }),
1434
+ z.xor([
1435
+ z.object({ colorCode: z.never().optional() }),
1436
+ z.object({
1437
+ colorCode: z.string().describe(
1438
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1439
+ ).min(3).max(20)
1440
+ })
1441
+ ])
1442
+ )
1443
+ ).min(1).max(200).optional()
1444
+ }).describe(
1445
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1446
+ )
1447
+ })
1448
+ ])
1449
+ )
1450
+ ).min(1).max(200).optional(),
1451
+ pagingMetadata: z.object({
1452
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
1453
+ cursors: z.object({
1454
+ next: z.string().describe(
1455
+ "Cursor string pointing to the next page in the list of results."
1456
+ ).max(16e3).optional().nullable(),
1457
+ prev: z.string().describe(
1458
+ "Cursor pointing to the previous page in the list of results."
1459
+ ).max(16e3).optional().nullable()
1460
+ }).describe(
1461
+ "Cursor strings that point to the next page, previous page, or both."
1462
+ ).optional(),
1463
+ hasNext: z.boolean().describe(
1464
+ "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
1465
+ ).optional().nullable()
1466
+ }).describe("Details on the paged set of results returned.").optional()
1467
+ });
1468
+ var BulkCreateCustomizationsRequest = z.object({
1469
+ customizations: z.array(
1470
+ z.intersection(
1471
+ z.object({
1472
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1473
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1474
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1475
+ ).optional().nullable(),
1476
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1477
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1478
+ key: z.string().describe(
1479
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1480
+ ).min(1).max(50).optional().nullable(),
1481
+ name: z.string().describe(
1482
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1483
+ ).min(1).max(50).optional(),
1484
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
1485
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
1486
+ assignedProductsCount: z.number().int().describe(
1487
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1488
+ ).optional().nullable()
1489
+ }),
1490
+ z.xor([
1491
+ z.object({
1492
+ freeTextInput: z.never().optional(),
1493
+ choicesSettings: z.never().optional()
1494
+ }),
1495
+ z.object({
1496
+ choicesSettings: z.never().optional(),
1497
+ freeTextInput: z.object({
1498
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1499
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1500
+ defaultAddedPrice: z.string().describe(
1501
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1502
+ ).optional().nullable(),
1503
+ title: z.string().describe(
1504
+ "Title to display to customer for their free-text input."
1505
+ ).min(1).max(100).optional(),
1506
+ key: z.string().describe(
1507
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1508
+ ).min(1).max(150).optional().nullable()
1509
+ }).describe(
1510
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1511
+ )
1512
+ }),
1513
+ z.object({
1514
+ freeTextInput: z.never().optional(),
1515
+ choicesSettings: z.object({
1516
+ choices: z.array(
1517
+ z.intersection(
1518
+ z.object({
1519
+ _id: z.string().describe("Choice ID.").regex(
1520
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1521
+ "Must be a valid GUID"
1522
+ ).optional(),
1523
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
1524
+ key: z.string().describe(
1525
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1526
+ ).min(1).max(50).optional().nullable(),
1527
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1528
+ defaultAddedPrice: z.string().describe(
1529
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1530
+ ).optional().nullable()
1531
+ }),
1532
+ z.xor([
1533
+ z.object({ colorCode: z.never().optional() }),
1534
+ z.object({
1535
+ colorCode: z.string().describe(
1536
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1537
+ ).min(3).max(20)
1538
+ })
1539
+ ])
1540
+ )
1541
+ ).min(1).max(200).optional()
1542
+ }).describe(
1543
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1544
+ )
1545
+ })
1546
+ ])
1547
+ )
1548
+ ).min(1).max(100),
1549
+ options: z.object({
1550
+ returnEntity: z.boolean().describe(
1551
+ "Whether to return the full customization entities in the response.\n\nDefault: `false`"
1552
+ ).optional()
1553
+ }).optional()
1554
+ });
1555
+ var BulkCreateCustomizationsResponse = z.object({
1556
+ results: z.array(
1557
+ z.object({
1558
+ itemMetadata: z.object({
1559
+ _id: z.string().describe(
1560
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
1561
+ ).min(1).max(36).optional().nullable(),
1562
+ originalIndex: z.number().int().describe(
1563
+ "Index of the item within the request array. Allows for correlation between request and response items."
1564
+ ).optional(),
1565
+ success: z.boolean().describe(
1566
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
1567
+ ).optional(),
1568
+ error: z.object({
1569
+ code: z.string().describe("Error code.").optional(),
1570
+ description: z.string().describe("Description of the error.").optional(),
1571
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
1572
+ }).describe("Details about the error in case of failure.").optional()
1573
+ }).describe("Bulk action metadata for customization.").optional(),
1574
+ customization: z.intersection(
1575
+ z.object({
1576
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1577
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1578
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1579
+ ).optional().nullable(),
1580
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1581
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1582
+ key: z.string().describe(
1583
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1584
+ ).min(1).max(50).optional().nullable(),
1585
+ name: z.string().describe(
1586
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1587
+ ).min(1).max(50).optional(),
1588
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1589
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1590
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1591
+ ).optional(),
1592
+ assignedProductsCount: z.number().int().describe(
1593
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1594
+ ).optional().nullable()
1595
+ }),
1596
+ z.xor([
1597
+ z.object({
1598
+ freeTextInput: z.never().optional(),
1599
+ choicesSettings: z.never().optional()
1600
+ }),
1601
+ z.object({
1602
+ choicesSettings: z.never().optional(),
1603
+ freeTextInput: z.object({
1604
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1605
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1606
+ defaultAddedPrice: z.string().describe(
1607
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1608
+ ).optional().nullable(),
1609
+ title: z.string().describe(
1610
+ "Title to display to customer for their free-text input."
1611
+ ).min(1).max(100).optional(),
1612
+ key: z.string().describe(
1613
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1614
+ ).min(1).max(150).optional().nullable()
1615
+ }).describe(
1616
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1617
+ )
1618
+ }),
1619
+ z.object({
1620
+ freeTextInput: z.never().optional(),
1621
+ choicesSettings: z.object({
1622
+ choices: z.array(
1623
+ z.intersection(
1624
+ z.object({
1625
+ _id: z.string().describe("Choice ID.").regex(
1626
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1627
+ "Must be a valid GUID"
1628
+ ).optional(),
1629
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1630
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
1631
+ ).optional(),
1632
+ key: z.string().describe(
1633
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1634
+ ).min(1).max(50).optional().nullable(),
1635
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1636
+ defaultAddedPrice: z.string().describe(
1637
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1638
+ ).optional().nullable()
1639
+ }),
1640
+ z.xor([
1641
+ z.object({ colorCode: z.never().optional() }),
1642
+ z.object({
1643
+ colorCode: z.string().describe(
1644
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1645
+ ).min(3).max(20)
1646
+ })
1647
+ ])
1648
+ )
1649
+ ).min(1).max(200).optional()
1650
+ }).describe(
1651
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1652
+ )
1653
+ })
1654
+ ])
1655
+ ).describe(
1656
+ "Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
1657
+ ).optional()
1658
+ })
1659
+ ).min(1).max(100).optional(),
1660
+ bulkActionMetadata: z.object({
1661
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
1662
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
1663
+ undetailedFailures: z.number().int().describe(
1664
+ "Number of failures without details because detailed failure threshold was exceeded."
1665
+ ).optional()
1666
+ }).describe("Bulk action metadata.").optional()
1667
+ });
1668
+ var AddCustomizationChoicesRequest = z.object({
1669
+ customizationId: z.string().describe("Customization ID.").regex(
1670
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1671
+ "Must be a valid GUID"
1672
+ ),
1673
+ choices: z.array(
1674
+ z.intersection(
1675
+ z.object({
1676
+ _id: z.string().describe("Choice ID.").regex(
1677
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1678
+ "Must be a valid GUID"
1679
+ ).optional(),
1680
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
1681
+ key: z.string().describe(
1682
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1683
+ ).min(1).max(50).optional().nullable(),
1684
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1685
+ defaultAddedPrice: z.string().describe(
1686
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1687
+ ).optional().nullable()
1688
+ }),
1689
+ z.xor([
1690
+ z.object({ colorCode: z.never().optional() }),
1691
+ z.object({
1692
+ colorCode: z.string().describe(
1693
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1694
+ ).min(3).max(20)
1695
+ })
1696
+ ])
1697
+ )
1698
+ ).min(1).max(100),
1699
+ options: z.object({
1700
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1701
+ }).optional()
1702
+ });
1703
+ var AddCustomizationChoicesResponse = z.object({
1704
+ customization: z.intersection(
1705
+ z.object({
1706
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1707
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1708
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1709
+ ).optional().nullable(),
1710
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1711
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1712
+ key: z.string().describe(
1713
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1714
+ ).min(1).max(50).optional().nullable(),
1715
+ name: z.string().describe(
1716
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1717
+ ).min(1).max(50).optional(),
1718
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1719
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1720
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1721
+ ).optional(),
1722
+ assignedProductsCount: z.number().int().describe(
1723
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1724
+ ).optional().nullable()
1725
+ }),
1726
+ z.xor([
1727
+ z.object({
1728
+ freeTextInput: z.never().optional(),
1729
+ choicesSettings: z.never().optional()
1730
+ }),
1731
+ z.object({
1732
+ choicesSettings: z.never().optional(),
1733
+ freeTextInput: z.object({
1734
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1735
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1736
+ defaultAddedPrice: z.string().describe(
1737
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1738
+ ).optional().nullable(),
1739
+ title: z.string().describe(
1740
+ "Title to display to customer for their free-text input."
1741
+ ).min(1).max(100).optional(),
1742
+ key: z.string().describe(
1743
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1744
+ ).min(1).max(150).optional().nullable()
1745
+ }).describe(
1746
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1747
+ )
1748
+ }),
1749
+ z.object({
1750
+ freeTextInput: z.never().optional(),
1751
+ choicesSettings: z.object({
1752
+ choices: z.array(
1753
+ z.intersection(
1754
+ z.object({
1755
+ _id: z.string().describe("Choice ID.").regex(
1756
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1757
+ "Must be a valid GUID"
1758
+ ).optional(),
1759
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1760
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
1761
+ ).optional(),
1762
+ key: z.string().describe(
1763
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1764
+ ).min(1).max(50).optional().nullable(),
1765
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1766
+ defaultAddedPrice: z.string().describe(
1767
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1768
+ ).optional().nullable()
1769
+ }),
1770
+ z.xor([
1771
+ z.object({ colorCode: z.never().optional() }),
1772
+ z.object({
1773
+ colorCode: z.string().describe(
1774
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1775
+ ).min(3).max(20)
1776
+ })
1777
+ ])
1778
+ )
1779
+ ).min(1).max(200).optional()
1780
+ }).describe(
1781
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1782
+ )
1783
+ })
1784
+ ])
1785
+ ).describe("Updated customization.").optional()
1786
+ });
1787
+ var SetCustomizationChoicesRequest = z.object({
1788
+ customizationId: z.string().describe("Customization ID.").regex(
1789
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1790
+ "Must be a valid GUID"
1791
+ ),
1792
+ choices: z.array(
1793
+ z.intersection(
1794
+ z.object({
1795
+ _id: z.string().describe("Choice ID.").regex(
1796
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1797
+ "Must be a valid GUID"
1798
+ ).optional(),
1799
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
1800
+ key: z.string().describe(
1801
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1802
+ ).min(1).max(50).optional().nullable(),
1803
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1804
+ defaultAddedPrice: z.string().describe(
1805
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1806
+ ).optional().nullable()
1807
+ }),
1808
+ z.xor([
1809
+ z.object({ colorCode: z.never().optional() }),
1810
+ z.object({
1811
+ colorCode: z.string().describe(
1812
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1813
+ ).min(3).max(20)
1814
+ })
1815
+ ])
1816
+ )
1817
+ ).min(1).max(200),
1818
+ options: z.object({
1819
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1820
+ }).optional()
1821
+ });
1822
+ var SetCustomizationChoicesResponse = z.object({
1823
+ customization: z.intersection(
1824
+ z.object({
1825
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1826
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1827
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1828
+ ).optional().nullable(),
1829
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1830
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1831
+ key: z.string().describe(
1832
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1833
+ ).min(1).max(50).optional().nullable(),
1834
+ name: z.string().describe(
1835
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1836
+ ).min(1).max(50).optional(),
1837
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1838
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1839
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1840
+ ).optional(),
1841
+ assignedProductsCount: z.number().int().describe(
1842
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1843
+ ).optional().nullable()
1844
+ }),
1845
+ z.xor([
1846
+ z.object({
1847
+ freeTextInput: z.never().optional(),
1848
+ choicesSettings: z.never().optional()
1849
+ }),
1850
+ z.object({
1851
+ choicesSettings: z.never().optional(),
1852
+ freeTextInput: z.object({
1853
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1854
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1855
+ defaultAddedPrice: z.string().describe(
1856
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1857
+ ).optional().nullable(),
1858
+ title: z.string().describe(
1859
+ "Title to display to customer for their free-text input."
1860
+ ).min(1).max(100).optional(),
1861
+ key: z.string().describe(
1862
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1863
+ ).min(1).max(150).optional().nullable()
1864
+ }).describe(
1865
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1866
+ )
1867
+ }),
1868
+ z.object({
1869
+ freeTextInput: z.never().optional(),
1870
+ choicesSettings: z.object({
1871
+ choices: z.array(
1872
+ z.intersection(
1873
+ z.object({
1874
+ _id: z.string().describe("Choice ID.").regex(
1875
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1876
+ "Must be a valid GUID"
1877
+ ).optional(),
1878
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1879
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
1880
+ ).optional(),
1881
+ key: z.string().describe(
1882
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1883
+ ).min(1).max(50).optional().nullable(),
1884
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1885
+ defaultAddedPrice: z.string().describe(
1886
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1887
+ ).optional().nullable()
1888
+ }),
1889
+ z.xor([
1890
+ z.object({ colorCode: z.never().optional() }),
1891
+ z.object({
1892
+ colorCode: z.string().describe(
1893
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1894
+ ).min(3).max(20)
1895
+ })
1896
+ ])
1897
+ )
1898
+ ).min(1).max(200).optional()
1899
+ }).describe(
1900
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1901
+ )
1902
+ })
1903
+ ])
1904
+ ).describe("Updated customization.").optional()
1905
+ });
1906
+ var RemoveCustomizationChoicesRequest = z.object({
1907
+ customizationId: z.string().describe("Customization ID.").regex(
1908
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1909
+ "Must be a valid GUID"
1910
+ ),
1911
+ choiceIds: z.array(z.string()).min(1).max(100),
1912
+ options: z.object({
1913
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Customization revision.").optional(),
1914
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1915
+ }).optional()
1916
+ });
1917
+ var RemoveCustomizationChoicesResponse = z.object({
1918
+ customization: z.intersection(
1919
+ z.object({
1920
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1921
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1922
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
1923
+ ).optional().nullable(),
1924
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1925
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1926
+ key: z.string().describe(
1927
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1928
+ ).min(1).max(50).optional().nullable(),
1929
+ name: z.string().describe(
1930
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1931
+ ).min(1).max(50).optional(),
1932
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1933
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1934
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1935
+ ).optional(),
1936
+ assignedProductsCount: z.number().int().describe(
1937
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
1938
+ ).optional().nullable()
1939
+ }),
1940
+ z.xor([
1941
+ z.object({
1942
+ freeTextInput: z.never().optional(),
1943
+ choicesSettings: z.never().optional()
1944
+ }),
1945
+ z.object({
1946
+ choicesSettings: z.never().optional(),
1947
+ freeTextInput: z.object({
1948
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1949
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1950
+ defaultAddedPrice: z.string().describe(
1951
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1952
+ ).optional().nullable(),
1953
+ title: z.string().describe(
1954
+ "Title to display to customer for their free-text input."
1955
+ ).min(1).max(100).optional(),
1956
+ key: z.string().describe(
1957
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1958
+ ).min(1).max(150).optional().nullable()
1959
+ }).describe(
1960
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1961
+ )
1962
+ }),
1963
+ z.object({
1964
+ freeTextInput: z.never().optional(),
1965
+ choicesSettings: z.object({
1966
+ choices: z.array(
1967
+ z.intersection(
1968
+ z.object({
1969
+ _id: z.string().describe("Choice ID.").regex(
1970
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1971
+ "Must be a valid GUID"
1972
+ ).optional(),
1973
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1974
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
1975
+ ).optional(),
1976
+ key: z.string().describe(
1977
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
1978
+ ).min(1).max(50).optional().nullable(),
1979
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1980
+ defaultAddedPrice: z.string().describe(
1981
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1982
+ ).optional().nullable()
1983
+ }),
1984
+ z.xor([
1985
+ z.object({ colorCode: z.never().optional() }),
1986
+ z.object({
1987
+ colorCode: z.string().describe(
1988
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1989
+ ).min(3).max(20)
1990
+ })
1991
+ ])
1992
+ )
1993
+ ).min(1).max(200).optional()
1994
+ }).describe(
1995
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1996
+ )
1997
+ })
1998
+ ])
1999
+ ).describe("Updated customization.").optional()
2000
+ });
2001
+ var BulkAddCustomizationChoicesRequest = z.object({
2002
+ customizationsChoices: z.array(
2003
+ z.object({
2004
+ customizationId: z.string().describe("Customization ID.").min(1).max(36),
2005
+ choices: z.array(
2006
+ z.intersection(
2007
+ z.object({
2008
+ _id: z.string().describe("Choice ID.").regex(
2009
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2010
+ "Must be a valid GUID"
2011
+ ).optional(),
2012
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
2013
+ key: z.string().describe(
2014
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2015
+ ).min(1).max(50).optional().nullable(),
2016
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
2017
+ defaultAddedPrice: z.string().describe(
2018
+ "Default amount added to a product's price when this customization is assigned to a modifier."
2019
+ ).optional().nullable()
2020
+ }),
2021
+ z.xor([
2022
+ z.object({ colorCode: z.never().optional() }),
2023
+ z.object({
2024
+ colorCode: z.string().describe(
2025
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
2026
+ ).min(3).max(20)
2027
+ })
2028
+ ])
2029
+ )
2030
+ ).min(1).max(100)
2031
+ })
2032
+ ).min(1).max(100),
2033
+ options: z.object({
2034
+ returnEntity: z.boolean().describe(
2035
+ "Whether to return the full customization entities in the response.\n\nDefault: `false`"
2036
+ ).optional(),
2037
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
2038
+ }).optional()
2039
+ });
2040
+ var BulkAddCustomizationChoicesResponse = z.object({
2041
+ results: z.array(
2042
+ z.object({
2043
+ itemMetadata: z.object({
2044
+ _id: z.string().describe(
2045
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
2046
+ ).min(1).max(36).optional().nullable(),
2047
+ originalIndex: z.number().int().describe(
2048
+ "Index of the item within the request array. Allows for correlation between request and response items."
2049
+ ).optional(),
2050
+ success: z.boolean().describe(
2051
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
2052
+ ).optional(),
2053
+ error: z.object({
2054
+ code: z.string().describe("Error code.").optional(),
2055
+ description: z.string().describe("Description of the error.").optional(),
2056
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
2057
+ }).describe("Details about the error in case of failure.").optional()
2058
+ }).describe("Bulk action metadata for customization.").optional(),
2059
+ customization: z.intersection(
2060
+ z.object({
2061
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
2062
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2063
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
2064
+ ).optional().nullable(),
2065
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
2066
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
2067
+ key: z.string().describe(
2068
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2069
+ ).min(1).max(50).optional().nullable(),
2070
+ name: z.string().describe(
2071
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
2072
+ ).min(1).max(50).optional(),
2073
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
2074
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
2075
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
2076
+ ).optional(),
2077
+ assignedProductsCount: z.number().int().describe(
2078
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
2079
+ ).optional().nullable()
2080
+ }),
2081
+ z.xor([
2082
+ z.object({
2083
+ freeTextInput: z.never().optional(),
2084
+ choicesSettings: z.never().optional()
2085
+ }),
2086
+ z.object({
2087
+ choicesSettings: z.never().optional(),
2088
+ freeTextInput: z.object({
2089
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
2090
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
2091
+ defaultAddedPrice: z.string().describe(
2092
+ "Default amount added to a product's price when this choice is assigned to a modifier."
2093
+ ).optional().nullable(),
2094
+ title: z.string().describe(
2095
+ "Title to display to customer for their free-text input."
2096
+ ).min(1).max(100).optional(),
2097
+ key: z.string().describe(
2098
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2099
+ ).min(1).max(150).optional().nullable()
2100
+ }).describe(
2101
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
2102
+ )
2103
+ }),
2104
+ z.object({
2105
+ freeTextInput: z.never().optional(),
2106
+ choicesSettings: z.object({
2107
+ choices: z.array(
2108
+ z.intersection(
2109
+ z.object({
2110
+ _id: z.string().describe("Choice ID.").regex(
2111
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2112
+ "Must be a valid GUID"
2113
+ ).optional(),
2114
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
2115
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
2116
+ ).optional(),
2117
+ key: z.string().describe(
2118
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2119
+ ).min(1).max(50).optional().nullable(),
2120
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
2121
+ defaultAddedPrice: z.string().describe(
2122
+ "Default amount added to a product's price when this customization is assigned to a modifier."
2123
+ ).optional().nullable()
2124
+ }),
2125
+ z.xor([
2126
+ z.object({ colorCode: z.never().optional() }),
2127
+ z.object({
2128
+ colorCode: z.string().describe(
2129
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
2130
+ ).min(3).max(20)
2131
+ })
2132
+ ])
2133
+ )
2134
+ ).min(1).max(200).optional()
2135
+ }).describe(
2136
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
2137
+ )
2138
+ })
2139
+ ])
2140
+ ).describe(
2141
+ "Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
2142
+ ).optional()
2143
+ })
2144
+ ).min(1).max(100).optional(),
2145
+ bulkActionMetadata: z.object({
2146
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
2147
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
2148
+ undetailedFailures: z.number().int().describe(
2149
+ "Number of failures without details because detailed failure threshold was exceeded."
2150
+ ).optional()
2151
+ }).describe("Bulk action metadata.").optional()
2152
+ });
2153
+ var BulkUpdateCustomizationsRequest = z.object({
2154
+ customizations: z.array(
2155
+ z.object({
2156
+ customization: z.intersection(
2157
+ z.object({
2158
+ _id: z.string().describe("Customization ID.").min(1).max(36),
2159
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2160
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
2161
+ ),
2162
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
2163
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
2164
+ key: z.string().describe(
2165
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2166
+ ).min(1).max(50).optional().nullable(),
2167
+ name: z.string().describe(
2168
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
2169
+ ).min(1).max(50),
2170
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).optional(),
2171
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).optional(),
2172
+ assignedProductsCount: z.number().int().describe(
2173
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
2174
+ ).optional().nullable()
2175
+ }),
2176
+ z.xor([
2177
+ z.object({
2178
+ freeTextInput: z.never().optional(),
2179
+ choicesSettings: z.never().optional()
2180
+ }),
2181
+ z.object({
2182
+ choicesSettings: z.never().optional(),
2183
+ freeTextInput: z.object({
2184
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
2185
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
2186
+ defaultAddedPrice: z.string().describe(
2187
+ "Default amount added to a product's price when this choice is assigned to a modifier."
2188
+ ).optional().nullable(),
2189
+ title: z.string().describe(
2190
+ "Title to display to customer for their free-text input."
2191
+ ).min(1).max(100).optional(),
2192
+ key: z.string().describe(
2193
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2194
+ ).min(1).max(150).optional().nullable()
2195
+ }).describe(
2196
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
2197
+ )
2198
+ }),
2199
+ z.object({
2200
+ freeTextInput: z.never().optional(),
2201
+ choicesSettings: z.object({
2202
+ choices: z.array(
2203
+ z.intersection(
2204
+ z.object({
2205
+ _id: z.string().describe("Choice ID.").regex(
2206
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2207
+ "Must be a valid GUID"
2208
+ ).optional(),
2209
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
2210
+ key: z.string().describe(
2211
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2212
+ ).min(1).max(50).optional().nullable(),
2213
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
2214
+ defaultAddedPrice: z.string().describe(
2215
+ "Default amount added to a product's price when this customization is assigned to a modifier."
2216
+ ).optional().nullable()
2217
+ }),
2218
+ z.xor([
2219
+ z.object({ colorCode: z.never().optional() }),
2220
+ z.object({
2221
+ colorCode: z.string().describe(
2222
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
2223
+ ).min(3).max(20)
2224
+ })
2225
+ ])
2226
+ )
2227
+ ).min(1).max(200).optional()
2228
+ }).describe(
2229
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
2230
+ )
2231
+ })
2232
+ ])
2233
+ ).describe("Customization to update.").optional()
2234
+ })
2235
+ ).min(1).max(100),
2236
+ options: z.object({
2237
+ returnEntity: z.boolean().describe(
2238
+ "Whether to return the full customization entities in the response.\n\nDefault: `false`"
2239
+ ).optional(),
2240
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
2241
+ }).optional()
2242
+ });
2243
+ var BulkUpdateCustomizationsResponse = z.object({
2244
+ results: z.array(
2245
+ z.object({
2246
+ itemMetadata: z.object({
2247
+ _id: z.string().describe(
2248
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
2249
+ ).min(1).max(36).optional().nullable(),
2250
+ originalIndex: z.number().int().describe(
2251
+ "Index of the item within the request array. Allows for correlation between request and response items."
2252
+ ).optional(),
2253
+ success: z.boolean().describe(
2254
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
2255
+ ).optional(),
2256
+ error: z.object({
2257
+ code: z.string().describe("Error code.").optional(),
2258
+ description: z.string().describe("Description of the error.").optional(),
2259
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
2260
+ }).describe("Details about the error in case of failure.").optional()
2261
+ }).describe("Bulk action metadata for customization.").optional(),
2262
+ customization: z.intersection(
2263
+ z.object({
2264
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
2265
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
2266
+ "Revision number, which increments by 1 each time the customization is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating the customization.\n\nIgnored when creating a customization."
2267
+ ).optional().nullable(),
2268
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
2269
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
2270
+ key: z.string().describe(
2271
+ "A read-only identifier generated from the customization name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2272
+ ).min(1).max(50).optional().nullable(),
2273
+ name: z.string().describe(
2274
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
2275
+ ).min(1).max(50).optional(),
2276
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
2277
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
2278
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
2279
+ ).optional(),
2280
+ assignedProductsCount: z.number().int().describe(
2281
+ 'Number of products this customization is assigned to.\n> **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.'
2282
+ ).optional().nullable()
2283
+ }),
2284
+ z.xor([
2285
+ z.object({
2286
+ freeTextInput: z.never().optional(),
2287
+ choicesSettings: z.never().optional()
2288
+ }),
2289
+ z.object({
2290
+ choicesSettings: z.never().optional(),
2291
+ freeTextInput: z.object({
2292
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
2293
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
2294
+ defaultAddedPrice: z.string().describe(
2295
+ "Default amount added to a product's price when this choice is assigned to a modifier."
2296
+ ).optional().nullable(),
2297
+ title: z.string().describe(
2298
+ "Title to display to customer for their free-text input."
2299
+ ).min(1).max(100).optional(),
2300
+ key: z.string().describe(
2301
+ "A read-only identifier generated from the title.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2302
+ ).min(1).max(150).optional().nullable()
2303
+ }).describe(
2304
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
2305
+ )
2306
+ }),
2307
+ z.object({
2308
+ freeTextInput: z.never().optional(),
2309
+ choicesSettings: z.object({
2310
+ choices: z.array(
2311
+ z.intersection(
2312
+ z.object({
2313
+ _id: z.string().describe("Choice ID.").regex(
2314
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2315
+ "Must be a valid GUID"
2316
+ ).optional(),
2317
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
2318
+ "Choice type.\n\n> **Notes:**\n> + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` value is: `ONE_COLOR`.\n> + For a `customizationRenderType` of `TEXT_CHOICES`, the supported `choiceType` value is: `CHOICE_TEXT`."
2319
+ ).optional(),
2320
+ key: z.string().describe(
2321
+ "A read-only identifier generated from the choice name.\n\nUse `key` in the `catalogReference.options` object when [integrating Catalog V3 with eCommerce APIs](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)."
2322
+ ).min(1).max(50).optional().nullable(),
2323
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
2324
+ defaultAddedPrice: z.string().describe(
2325
+ "Default amount added to a product's price when this customization is assigned to a modifier."
2326
+ ).optional().nullable()
2327
+ }),
2328
+ z.xor([
2329
+ z.object({ colorCode: z.never().optional() }),
2330
+ z.object({
2331
+ colorCode: z.string().describe(
2332
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
2333
+ ).min(3).max(20)
2334
+ })
2335
+ ])
2336
+ )
2337
+ ).min(1).max(200).optional()
2338
+ }).describe(
2339
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
2340
+ )
2341
+ })
2342
+ ])
2343
+ ).describe(
2344
+ "Full customization entity.\n\nReturned only if `returnEntity: true` is passed in the request."
2345
+ ).optional()
2346
+ })
2347
+ ).min(1).max(100).optional(),
2348
+ bulkActionMetadata: z.object({
2349
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
2350
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
2351
+ undetailedFailures: z.number().int().describe(
2352
+ "Number of failures without details because detailed failure threshold was exceeded."
2353
+ ).optional()
2354
+ }).describe("Bulk action metadata.").optional()
2355
+ });
2356
+
2357
+ // src/stores-catalog-v3-customization-customizations-v-3.universal.ts
841
2358
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
842
2359
  var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
843
2360
  CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
@@ -864,6 +2381,7 @@ var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
864
2381
  })(ChoiceSortStrategy || {});
865
2382
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
866
2383
  RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
2384
+ RequestedFields2["CHOICE_DISPLAY_IMAGE"] = "CHOICE_DISPLAY_IMAGE";
867
2385
  return RequestedFields2;
868
2386
  })(RequestedFields || {});
869
2387
  var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
@@ -880,7 +2398,10 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
880
2398
  return WebhookIdentityType2;
881
2399
  })(WebhookIdentityType || {});
882
2400
  async function createCustomization2(customization) {
883
- const { httpClient, sideEffects } = arguments[1];
2401
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
2402
+ if (validateRequestSchema) {
2403
+ CreateCustomizationRequest.parse({ customization });
2404
+ }
884
2405
  const payload = transformPaths2(
885
2406
  renameKeysFromSDKRequestToRESTRequest({ customization }),
886
2407
  [
@@ -924,7 +2445,10 @@ async function createCustomization2(customization) {
924
2445
  }
925
2446
  }
926
2447
  async function getCustomization2(customizationId, options) {
927
- const { httpClient, sideEffects } = arguments[2];
2448
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
2449
+ if (validateRequestSchema) {
2450
+ GetCustomizationRequest.parse({ customizationId, options });
2451
+ }
928
2452
  const payload = renameKeysFromSDKRequestToRESTRequest({
929
2453
  customizationId,
930
2454
  fields: options?.fields
@@ -963,7 +2487,10 @@ async function getCustomization2(customizationId, options) {
963
2487
  }
964
2488
  }
965
2489
  async function updateCustomization2(_id, customization, options) {
966
- const { httpClient, sideEffects } = arguments[3];
2490
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
2491
+ if (validateRequestSchema) {
2492
+ UpdateCustomizationRequest.parse({ _id, customization, options });
2493
+ }
967
2494
  const payload = transformPaths2(
968
2495
  renameKeysFromSDKRequestToRESTRequest({
969
2496
  customization: { ...customization, id: _id },
@@ -1013,7 +2540,10 @@ async function updateCustomization2(_id, customization, options) {
1013
2540
  }
1014
2541
  }
1015
2542
  async function deleteCustomization2(customizationId) {
1016
- const { httpClient, sideEffects } = arguments[1];
2543
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[1];
2544
+ if (validateRequestSchema) {
2545
+ DeleteCustomizationRequest.parse({ customizationId });
2546
+ }
1017
2547
  const payload = renameKeysFromSDKRequestToRESTRequest({
1018
2548
  customizationId
1019
2549
  });
@@ -1094,7 +2624,10 @@ function queryCustomizations2(options) {
1094
2624
  });
1095
2625
  }
1096
2626
  async function typedQueryCustomizations(query, options) {
1097
- const { httpClient, sideEffects } = arguments[2];
2627
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
2628
+ if (validateRequestSchema) {
2629
+ QueryCustomizationsRequest.parse({ query, options });
2630
+ }
1098
2631
  const payload = renameKeysFromSDKRequestToRESTRequest({
1099
2632
  query,
1100
2633
  ...options
@@ -1135,7 +2668,10 @@ var utils = {
1135
2668
  }
1136
2669
  };
1137
2670
  async function bulkCreateCustomizations2(customizations, options) {
1138
- const { httpClient, sideEffects } = arguments[2];
2671
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
2672
+ if (validateRequestSchema) {
2673
+ BulkCreateCustomizationsRequest.parse({ customizations, options });
2674
+ }
1139
2675
  const payload = transformPaths2(
1140
2676
  renameKeysFromSDKRequestToRESTRequest({
1141
2677
  customizations,
@@ -1187,7 +2723,14 @@ async function bulkCreateCustomizations2(customizations, options) {
1187
2723
  }
1188
2724
  }
1189
2725
  async function addCustomizationChoices2(customizationId, choices, options) {
1190
- const { httpClient, sideEffects } = arguments[3];
2726
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
2727
+ if (validateRequestSchema) {
2728
+ AddCustomizationChoicesRequest.parse({
2729
+ customizationId,
2730
+ choices,
2731
+ options
2732
+ });
2733
+ }
1191
2734
  const payload = transformPaths2(
1192
2735
  renameKeysFromSDKRequestToRESTRequest({
1193
2736
  customizationId,
@@ -1236,7 +2779,14 @@ async function addCustomizationChoices2(customizationId, choices, options) {
1236
2779
  }
1237
2780
  }
1238
2781
  async function setCustomizationChoices2(customizationId, choices, options) {
1239
- const { httpClient, sideEffects } = arguments[3];
2782
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
2783
+ if (validateRequestSchema) {
2784
+ SetCustomizationChoicesRequest.parse({
2785
+ customizationId,
2786
+ choices,
2787
+ options
2788
+ });
2789
+ }
1240
2790
  const payload = transformPaths2(
1241
2791
  renameKeysFromSDKRequestToRESTRequest({
1242
2792
  customizationId,
@@ -1285,7 +2835,14 @@ async function setCustomizationChoices2(customizationId, choices, options) {
1285
2835
  }
1286
2836
  }
1287
2837
  async function removeCustomizationChoices2(customizationId, choiceIds, options) {
1288
- const { httpClient, sideEffects } = arguments[3];
2838
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[3];
2839
+ if (validateRequestSchema) {
2840
+ RemoveCustomizationChoicesRequest.parse({
2841
+ customizationId,
2842
+ choiceIds,
2843
+ options
2844
+ });
2845
+ }
1289
2846
  const payload = renameKeysFromSDKRequestToRESTRequest({
1290
2847
  customizationId,
1291
2848
  choiceIds,
@@ -1431,7 +2988,13 @@ async function reorderCustomizationChoices2(customizationId, revision, options)
1431
2988
  }
1432
2989
  }
1433
2990
  async function bulkAddCustomizationChoices2(customizationsChoices, options) {
1434
- const { httpClient, sideEffects } = arguments[2];
2991
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
2992
+ if (validateRequestSchema) {
2993
+ BulkAddCustomizationChoicesRequest.parse({
2994
+ customizationsChoices,
2995
+ options
2996
+ });
2997
+ }
1435
2998
  const payload = transformPaths2(
1436
2999
  renameKeysFromSDKRequestToRESTRequest({
1437
3000
  customizationsChoices,
@@ -1487,7 +3050,10 @@ async function bulkAddCustomizationChoices2(customizationsChoices, options) {
1487
3050
  }
1488
3051
  }
1489
3052
  async function bulkUpdateCustomizations2(customizations, options) {
1490
- const { httpClient, sideEffects } = arguments[2];
3053
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
3054
+ if (validateRequestSchema) {
3055
+ BulkUpdateCustomizationsRequest.parse({ customizations, options });
3056
+ }
1491
3057
  const payload = transformPaths2(
1492
3058
  renameKeysFromSDKRequestToRESTRequest({
1493
3059
  customizations,