@wix/auto_sdk_stores_customizations-v-3 1.0.80 → 1.0.82

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.
Files changed (41) hide show
  1. package/build/cjs/index.d.ts +39 -3
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +77 -10
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +29 -7
  6. package/build/cjs/meta.js +1 -0
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/cjs/schemas.d.ts +186 -1
  9. package/build/cjs/schemas.js +336 -25
  10. package/build/cjs/schemas.js.map +1 -1
  11. package/build/es/index.d.mts +39 -3
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +77 -10
  14. package/build/es/index.typings.mjs.map +1 -1
  15. package/build/es/meta.d.mts +29 -7
  16. package/build/es/meta.mjs +1 -0
  17. package/build/es/meta.mjs.map +1 -1
  18. package/build/es/schemas.d.mts +186 -1
  19. package/build/es/schemas.mjs +332 -25
  20. package/build/es/schemas.mjs.map +1 -1
  21. package/build/internal/cjs/index.d.ts +6 -7
  22. package/build/internal/cjs/index.js.map +1 -1
  23. package/build/internal/cjs/index.typings.d.ts +22 -22
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +29 -7
  26. package/build/internal/cjs/meta.js +1 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/cjs/schemas.d.ts +186 -1
  29. package/build/internal/cjs/schemas.js +336 -25
  30. package/build/internal/cjs/schemas.js.map +1 -1
  31. package/build/internal/es/index.d.mts +6 -7
  32. package/build/internal/es/index.mjs.map +1 -1
  33. package/build/internal/es/index.typings.d.mts +22 -22
  34. package/build/internal/es/index.typings.mjs.map +1 -1
  35. package/build/internal/es/meta.d.mts +29 -7
  36. package/build/internal/es/meta.mjs +1 -0
  37. package/build/internal/es/meta.mjs.map +1 -1
  38. package/build/internal/es/schemas.d.mts +186 -1
  39. package/build/internal/es/schemas.mjs +332 -25
  40. package/build/internal/es/schemas.mjs.map +1 -1
  41. package/package.json +2 -2
@@ -61,7 +61,11 @@ var CreateCustomizationRequest = z.object({
61
61
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
62
62
  defaultAddedPrice: z.string().describe(
63
63
  "Default amount added to a product's price when this customization is assigned to a modifier."
64
- ).optional().nullable()
64
+ ).optional().nullable(),
65
+ displayImage: z.string().describe(
66
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
67
+ ).optional(),
68
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
65
69
  }),
66
70
  z.xor([
67
71
  z.object({ colorCode: z.never().optional() }),
@@ -142,7 +146,11 @@ var CreateCustomizationResponse = z.intersection(
142
146
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
143
147
  defaultAddedPrice: z.string().describe(
144
148
  "Default amount added to a product's price when this customization is assigned to a modifier."
145
- ).optional().nullable()
149
+ ).optional().nullable(),
150
+ displayImage: z.string().describe(
151
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
152
+ ).optional(),
153
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
146
154
  }),
147
155
  z.xor([
148
156
  z.object({ colorCode: z.never().optional() }),
@@ -166,7 +174,7 @@ var GetCustomizationRequest = z.object({
166
174
  "Must be a valid GUID"
167
175
  ),
168
176
  options: z.object({
169
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
177
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
170
178
  }).optional()
171
179
  });
172
180
  var GetCustomizationResponse = z.intersection(
@@ -231,7 +239,11 @@ var GetCustomizationResponse = z.intersection(
231
239
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
232
240
  defaultAddedPrice: z.string().describe(
233
241
  "Default amount added to a product's price when this customization is assigned to a modifier."
234
- ).optional().nullable()
242
+ ).optional().nullable(),
243
+ displayImage: z.string().describe(
244
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
245
+ ).optional(),
246
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
235
247
  }),
236
248
  z.xor([
237
249
  z.object({ colorCode: z.never().optional() }),
@@ -311,7 +323,11 @@ var UpdateCustomizationRequest = z.object({
311
323
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
312
324
  defaultAddedPrice: z.string().describe(
313
325
  "Default amount added to a product's price when this customization is assigned to a modifier."
314
- ).optional().nullable()
326
+ ).optional().nullable(),
327
+ displayImage: z.string().describe(
328
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
329
+ ).optional(),
330
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
315
331
  }),
316
332
  z.xor([
317
333
  z.object({ colorCode: z.never().optional() }),
@@ -330,7 +346,7 @@ var UpdateCustomizationRequest = z.object({
330
346
  ])
331
347
  ).describe("Customization to update."),
332
348
  options: z.object({
333
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
349
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
334
350
  }).optional()
335
351
  });
336
352
  var UpdateCustomizationResponse = z.intersection(
@@ -395,7 +411,11 @@ var UpdateCustomizationResponse = z.intersection(
395
411
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
396
412
  defaultAddedPrice: z.string().describe(
397
413
  "Default amount added to a product's price when this customization is assigned to a modifier."
398
- ).optional().nullable()
414
+ ).optional().nullable(),
415
+ displayImage: z.string().describe(
416
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
417
+ ).optional(),
418
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
399
419
  }),
400
420
  z.xor([
401
421
  z.object({ colorCode: z.never().optional() }),
@@ -519,7 +539,7 @@ var QueryCustomizationsRequest = z.object({
519
539
  ).optional()
520
540
  }).catchall(z.any()).describe("Query options."),
521
541
  options: z.object({
522
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
542
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
523
543
  }).optional()
524
544
  });
525
545
  var QueryCustomizationsResponse = z.object({
@@ -588,7 +608,11 @@ var QueryCustomizationsResponse = z.object({
588
608
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
589
609
  defaultAddedPrice: z.string().describe(
590
610
  "Default amount added to a product's price when this customization is assigned to a modifier."
591
- ).optional().nullable()
611
+ ).optional().nullable(),
612
+ displayImage: z.string().describe(
613
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
614
+ ).optional(),
615
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
592
616
  }),
593
617
  z.xor([
594
618
  z.object({ colorCode: z.never().optional() }),
@@ -686,7 +710,11 @@ var BulkCreateCustomizationsRequest = z.object({
686
710
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
687
711
  defaultAddedPrice: z.string().describe(
688
712
  "Default amount added to a product's price when this customization is assigned to a modifier."
689
- ).optional().nullable()
713
+ ).optional().nullable(),
714
+ displayImage: z.string().describe(
715
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
716
+ ).optional(),
717
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
690
718
  }),
691
719
  z.xor([
692
720
  z.object({ colorCode: z.never().optional() }),
@@ -794,7 +822,11 @@ var BulkCreateCustomizationsResponse = z.object({
794
822
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
795
823
  defaultAddedPrice: z.string().describe(
796
824
  "Default amount added to a product's price when this customization is assigned to a modifier."
797
- ).optional().nullable()
825
+ ).optional().nullable(),
826
+ displayImage: z.string().describe(
827
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
828
+ ).optional(),
829
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
798
830
  }),
799
831
  z.xor([
800
832
  z.object({ colorCode: z.never().optional() }),
@@ -843,7 +875,11 @@ var AddCustomizationChoicesRequest = z.object({
843
875
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
844
876
  defaultAddedPrice: z.string().describe(
845
877
  "Default amount added to a product's price when this customization is assigned to a modifier."
846
- ).optional().nullable()
878
+ ).optional().nullable(),
879
+ displayImage: z.string().describe(
880
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
881
+ ).optional(),
882
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
847
883
  }),
848
884
  z.xor([
849
885
  z.object({ colorCode: z.never().optional() }),
@@ -856,7 +892,7 @@ var AddCustomizationChoicesRequest = z.object({
856
892
  )
857
893
  ).min(1).max(100),
858
894
  options: z.object({
859
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
895
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
860
896
  }).optional()
861
897
  });
862
898
  var AddCustomizationChoicesResponse = z.object({
@@ -924,7 +960,11 @@ var AddCustomizationChoicesResponse = z.object({
924
960
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
925
961
  defaultAddedPrice: z.string().describe(
926
962
  "Default amount added to a product's price when this customization is assigned to a modifier."
927
- ).optional().nullable()
963
+ ).optional().nullable(),
964
+ displayImage: z.string().describe(
965
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
966
+ ).optional(),
967
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
928
968
  }),
929
969
  z.xor([
930
970
  z.object({ colorCode: z.never().optional() }),
@@ -962,7 +1002,11 @@ var SetCustomizationChoicesRequest = z.object({
962
1002
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
963
1003
  defaultAddedPrice: z.string().describe(
964
1004
  "Default amount added to a product's price when this customization is assigned to a modifier."
965
- ).optional().nullable()
1005
+ ).optional().nullable(),
1006
+ displayImage: z.string().describe(
1007
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1008
+ ).optional(),
1009
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
966
1010
  }),
967
1011
  z.xor([
968
1012
  z.object({ colorCode: z.never().optional() }),
@@ -975,7 +1019,7 @@ var SetCustomizationChoicesRequest = z.object({
975
1019
  )
976
1020
  ).min(1).max(200),
977
1021
  options: z.object({
978
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1022
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
979
1023
  }).optional()
980
1024
  });
981
1025
  var SetCustomizationChoicesResponse = z.object({
@@ -1043,7 +1087,11 @@ var SetCustomizationChoicesResponse = z.object({
1043
1087
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1044
1088
  defaultAddedPrice: z.string().describe(
1045
1089
  "Default amount added to a product's price when this customization is assigned to a modifier."
1046
- ).optional().nullable()
1090
+ ).optional().nullable(),
1091
+ displayImage: z.string().describe(
1092
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1093
+ ).optional(),
1094
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1047
1095
  }),
1048
1096
  z.xor([
1049
1097
  z.object({ colorCode: z.never().optional() }),
@@ -1070,7 +1118,7 @@ var RemoveCustomizationChoicesRequest = z.object({
1070
1118
  choiceIds: z.array(z.string()).min(1).max(100),
1071
1119
  options: z.object({
1072
1120
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Customization revision.").optional(),
1073
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1121
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1074
1122
  }).optional()
1075
1123
  });
1076
1124
  var RemoveCustomizationChoicesResponse = z.object({
@@ -1138,7 +1186,11 @@ var RemoveCustomizationChoicesResponse = z.object({
1138
1186
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1139
1187
  defaultAddedPrice: z.string().describe(
1140
1188
  "Default amount added to a product's price when this customization is assigned to a modifier."
1141
- ).optional().nullable()
1189
+ ).optional().nullable(),
1190
+ displayImage: z.string().describe(
1191
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1192
+ ).optional(),
1193
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1142
1194
  }),
1143
1195
  z.xor([
1144
1196
  z.object({ colorCode: z.never().optional() }),
@@ -1157,6 +1209,241 @@ var RemoveCustomizationChoicesResponse = z.object({
1157
1209
  ])
1158
1210
  ).describe("Updated customization.").optional()
1159
1211
  });
1212
+ var UpdateCustomizationChoicesRequest = z.object({
1213
+ customizationId: z.string().describe("Customization ID.").regex(
1214
+ /^[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}$/,
1215
+ "Must be a valid GUID"
1216
+ ),
1217
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1218
+ "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."
1219
+ ),
1220
+ options: z.object({
1221
+ choices: z.array(
1222
+ z.object({
1223
+ choice: z.intersection(
1224
+ z.object({
1225
+ _id: z.string().describe("Choice ID.").regex(
1226
+ /^[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}$/,
1227
+ "Must be a valid GUID"
1228
+ ).optional(),
1229
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
1230
+ key: z.string().describe(
1231
+ "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)."
1232
+ ).min(1).max(50).optional().nullable(),
1233
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1234
+ defaultAddedPrice: z.string().describe(
1235
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1236
+ ).optional().nullable(),
1237
+ displayImage: z.string().describe(
1238
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1239
+ ).optional(),
1240
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1241
+ }),
1242
+ z.xor([
1243
+ z.object({ colorCode: z.never().optional() }),
1244
+ z.object({
1245
+ colorCode: z.string().describe(
1246
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1247
+ ).min(3).max(20)
1248
+ })
1249
+ ])
1250
+ ).describe("Choice to update.")
1251
+ })
1252
+ ).min(1).max(100),
1253
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1254
+ })
1255
+ });
1256
+ var UpdateCustomizationChoicesResponse = z.object({
1257
+ customization: z.intersection(
1258
+ z.object({
1259
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1260
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1261
+ "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."
1262
+ ).optional().nullable(),
1263
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1264
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1265
+ key: z.string().describe(
1266
+ "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)."
1267
+ ).min(1).max(50).optional().nullable(),
1268
+ name: z.string().describe(
1269
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1270
+ ).min(1).max(50).optional(),
1271
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1272
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1273
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1274
+ ).optional(),
1275
+ assignedProductsCount: z.number().int().describe(
1276
+ '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.'
1277
+ ).optional().nullable()
1278
+ }),
1279
+ z.xor([
1280
+ z.object({
1281
+ freeTextInput: z.never().optional(),
1282
+ choicesSettings: z.never().optional()
1283
+ }),
1284
+ z.object({
1285
+ choicesSettings: z.never().optional(),
1286
+ freeTextInput: z.object({
1287
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1288
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1289
+ defaultAddedPrice: z.string().describe(
1290
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1291
+ ).optional().nullable(),
1292
+ title: z.string().describe(
1293
+ "Title to display to customer for their free-text input."
1294
+ ).min(1).max(100).optional(),
1295
+ key: z.string().describe(
1296
+ "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)."
1297
+ ).min(1).max(150).optional().nullable()
1298
+ }).describe(
1299
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1300
+ )
1301
+ }),
1302
+ z.object({
1303
+ freeTextInput: z.never().optional(),
1304
+ choicesSettings: z.object({
1305
+ choices: z.array(
1306
+ z.intersection(
1307
+ z.object({
1308
+ _id: z.string().describe("Choice ID.").regex(
1309
+ /^[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}$/,
1310
+ "Must be a valid GUID"
1311
+ ).optional(),
1312
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1313
+ "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`."
1314
+ ).optional(),
1315
+ key: z.string().describe(
1316
+ "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)."
1317
+ ).min(1).max(50).optional().nullable(),
1318
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1319
+ defaultAddedPrice: z.string().describe(
1320
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1321
+ ).optional().nullable(),
1322
+ displayImage: z.string().describe(
1323
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1324
+ ).optional(),
1325
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1326
+ }),
1327
+ z.xor([
1328
+ z.object({ colorCode: z.never().optional() }),
1329
+ z.object({
1330
+ colorCode: z.string().describe(
1331
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1332
+ ).min(3).max(20)
1333
+ })
1334
+ ])
1335
+ )
1336
+ ).min(1).max(200).optional()
1337
+ }).describe(
1338
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1339
+ )
1340
+ })
1341
+ ])
1342
+ ).describe("Updated customization.").optional()
1343
+ });
1344
+ var ReorderCustomizationChoicesRequest = z.object({
1345
+ customizationId: z.string().describe("Customization ID.").regex(
1346
+ /^[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}$/,
1347
+ "Must be a valid GUID"
1348
+ ),
1349
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1350
+ "Revision number, which increments by 1 each time the customization is updated. To prevent conflicting changes, the current revision must be passed when updating the customization."
1351
+ ),
1352
+ options: z.object({
1353
+ choiceIds: z.array(z.string()).min(1).max(200),
1354
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1355
+ })
1356
+ });
1357
+ var ReorderCustomizationChoicesResponse = z.object({
1358
+ customization: z.intersection(
1359
+ z.object({
1360
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1361
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1362
+ "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."
1363
+ ).optional().nullable(),
1364
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1365
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1366
+ key: z.string().describe(
1367
+ "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)."
1368
+ ).min(1).max(50).optional().nullable(),
1369
+ name: z.string().describe(
1370
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1371
+ ).min(1).max(50).optional(),
1372
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1373
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1374
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1375
+ ).optional(),
1376
+ assignedProductsCount: z.number().int().describe(
1377
+ '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.'
1378
+ ).optional().nullable()
1379
+ }),
1380
+ z.xor([
1381
+ z.object({
1382
+ freeTextInput: z.never().optional(),
1383
+ choicesSettings: z.never().optional()
1384
+ }),
1385
+ z.object({
1386
+ choicesSettings: z.never().optional(),
1387
+ freeTextInput: z.object({
1388
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1389
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1390
+ defaultAddedPrice: z.string().describe(
1391
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1392
+ ).optional().nullable(),
1393
+ title: z.string().describe(
1394
+ "Title to display to customer for their free-text input."
1395
+ ).min(1).max(100).optional(),
1396
+ key: z.string().describe(
1397
+ "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)."
1398
+ ).min(1).max(150).optional().nullable()
1399
+ }).describe(
1400
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1401
+ )
1402
+ }),
1403
+ z.object({
1404
+ freeTextInput: z.never().optional(),
1405
+ choicesSettings: z.object({
1406
+ choices: z.array(
1407
+ z.intersection(
1408
+ z.object({
1409
+ _id: z.string().describe("Choice ID.").regex(
1410
+ /^[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}$/,
1411
+ "Must be a valid GUID"
1412
+ ).optional(),
1413
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1414
+ "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`."
1415
+ ).optional(),
1416
+ key: z.string().describe(
1417
+ "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)."
1418
+ ).min(1).max(50).optional().nullable(),
1419
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1420
+ defaultAddedPrice: z.string().describe(
1421
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1422
+ ).optional().nullable(),
1423
+ displayImage: z.string().describe(
1424
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1425
+ ).optional(),
1426
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1427
+ }),
1428
+ z.xor([
1429
+ z.object({ colorCode: z.never().optional() }),
1430
+ z.object({
1431
+ colorCode: z.string().describe(
1432
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1433
+ ).min(3).max(20)
1434
+ })
1435
+ ])
1436
+ )
1437
+ ).min(1).max(200).optional()
1438
+ }).describe(
1439
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1440
+ )
1441
+ })
1442
+ ])
1443
+ ).describe(
1444
+ "Updated customization, with `choices` in the new order and `choicesSettings.sortOrder` set to `MANUAL`."
1445
+ ).optional()
1446
+ });
1160
1447
  var BulkAddCustomizationChoicesRequest = z.object({
1161
1448
  customizationsChoices: z.array(
1162
1449
  z.object({
@@ -1175,7 +1462,11 @@ var BulkAddCustomizationChoicesRequest = z.object({
1175
1462
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1176
1463
  defaultAddedPrice: z.string().describe(
1177
1464
  "Default amount added to a product's price when this customization is assigned to a modifier."
1178
- ).optional().nullable()
1465
+ ).optional().nullable(),
1466
+ displayImage: z.string().describe(
1467
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1468
+ ).optional(),
1469
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1179
1470
  }),
1180
1471
  z.xor([
1181
1472
  z.object({ colorCode: z.never().optional() }),
@@ -1193,7 +1484,7 @@ var BulkAddCustomizationChoicesRequest = z.object({
1193
1484
  returnEntity: z.boolean().describe(
1194
1485
  "Whether to return the full customization entities in the response.\n\nDefault: `false`"
1195
1486
  ).optional(),
1196
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1487
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1197
1488
  }).optional()
1198
1489
  });
1199
1490
  var BulkAddCustomizationChoicesResponse = z.object({
@@ -1279,7 +1570,11 @@ var BulkAddCustomizationChoicesResponse = z.object({
1279
1570
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1280
1571
  defaultAddedPrice: z.string().describe(
1281
1572
  "Default amount added to a product's price when this customization is assigned to a modifier."
1282
- ).optional().nullable()
1573
+ ).optional().nullable(),
1574
+ displayImage: z.string().describe(
1575
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1576
+ ).optional(),
1577
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1283
1578
  }),
1284
1579
  z.xor([
1285
1580
  z.object({ colorCode: z.never().optional() }),
@@ -1372,7 +1667,11 @@ var BulkUpdateCustomizationsRequest = z.object({
1372
1667
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1373
1668
  defaultAddedPrice: z.string().describe(
1374
1669
  "Default amount added to a product's price when this customization is assigned to a modifier."
1375
- ).optional().nullable()
1670
+ ).optional().nullable(),
1671
+ displayImage: z.string().describe(
1672
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1673
+ ).optional(),
1674
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1376
1675
  }),
1377
1676
  z.xor([
1378
1677
  z.object({ colorCode: z.never().optional() }),
@@ -1396,7 +1695,7 @@ var BulkUpdateCustomizationsRequest = z.object({
1396
1695
  returnEntity: z.boolean().describe(
1397
1696
  "Whether to return the full customization entities in the response.\n\nDefault: `false`"
1398
1697
  ).optional(),
1399
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1698
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1400
1699
  }).optional()
1401
1700
  });
1402
1701
  var BulkUpdateCustomizationsResponse = z.object({
@@ -1482,7 +1781,11 @@ var BulkUpdateCustomizationsResponse = z.object({
1482
1781
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1483
1782
  defaultAddedPrice: z.string().describe(
1484
1783
  "Default amount added to a product's price when this customization is assigned to a modifier."
1485
- ).optional().nullable()
1784
+ ).optional().nullable(),
1785
+ displayImage: z.string().describe(
1786
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1787
+ ).optional(),
1788
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1486
1789
  }),
1487
1790
  z.xor([
1488
1791
  z.object({ colorCode: z.never().optional() }),
@@ -1531,8 +1834,12 @@ export {
1531
1834
  QueryCustomizationsResponse,
1532
1835
  RemoveCustomizationChoicesRequest,
1533
1836
  RemoveCustomizationChoicesResponse,
1837
+ ReorderCustomizationChoicesRequest,
1838
+ ReorderCustomizationChoicesResponse,
1534
1839
  SetCustomizationChoicesRequest,
1535
1840
  SetCustomizationChoicesResponse,
1841
+ UpdateCustomizationChoicesRequest,
1842
+ UpdateCustomizationChoicesResponse,
1536
1843
  UpdateCustomizationRequest,
1537
1844
  UpdateCustomizationResponse
1538
1845
  };