@wix/auto_sdk_stores_customizations-v-3 1.0.80 → 1.0.81

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 +36 -3
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/cjs/index.typings.d.ts +55 -3
  4. package/build/cjs/index.typings.js.map +1 -1
  5. package/build/cjs/meta.d.ts +12 -2
  6. package/build/cjs/meta.js +1 -0
  7. package/build/cjs/meta.js.map +1 -1
  8. package/build/cjs/schemas.d.ts +166 -1
  9. package/build/cjs/schemas.js +314 -25
  10. package/build/cjs/schemas.js.map +1 -1
  11. package/build/es/index.d.mts +36 -3
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +55 -3
  14. package/build/es/index.typings.mjs.map +1 -1
  15. package/build/es/meta.d.mts +12 -2
  16. package/build/es/meta.mjs +1 -0
  17. package/build/es/meta.mjs.map +1 -1
  18. package/build/es/schemas.d.mts +166 -1
  19. package/build/es/schemas.mjs +310 -25
  20. package/build/es/schemas.mjs.map +1 -1
  21. package/build/internal/cjs/index.d.ts +0 -4
  22. package/build/internal/cjs/index.js.map +1 -1
  23. package/build/internal/cjs/index.typings.d.ts +3 -5
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +12 -2
  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 +166 -1
  29. package/build/internal/cjs/schemas.js +314 -25
  30. package/build/internal/cjs/schemas.js.map +1 -1
  31. package/build/internal/es/index.d.mts +0 -4
  32. package/build/internal/es/index.mjs.map +1 -1
  33. package/build/internal/es/index.typings.d.mts +3 -5
  34. package/build/internal/es/index.typings.mjs.map +1 -1
  35. package/build/internal/es/meta.d.mts +12 -2
  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 +166 -1
  39. package/build/internal/es/schemas.mjs +310 -25
  40. package/build/internal/es/schemas.mjs.map +1 -1
  41. package/package.json +2 -2
@@ -48,8 +48,12 @@ __export(schemas_exports, {
48
48
  QueryCustomizationsResponse: () => QueryCustomizationsResponse,
49
49
  RemoveCustomizationChoicesRequest: () => RemoveCustomizationChoicesRequest,
50
50
  RemoveCustomizationChoicesResponse: () => RemoveCustomizationChoicesResponse,
51
+ ReorderCustomizationChoicesRequest: () => ReorderCustomizationChoicesRequest,
52
+ ReorderCustomizationChoicesResponse: () => ReorderCustomizationChoicesResponse,
51
53
  SetCustomizationChoicesRequest: () => SetCustomizationChoicesRequest,
52
54
  SetCustomizationChoicesResponse: () => SetCustomizationChoicesResponse,
55
+ UpdateCustomizationChoicesRequest: () => UpdateCustomizationChoicesRequest,
56
+ UpdateCustomizationChoicesResponse: () => UpdateCustomizationChoicesResponse,
53
57
  UpdateCustomizationRequest: () => UpdateCustomizationRequest,
54
58
  UpdateCustomizationResponse: () => UpdateCustomizationResponse
55
59
  });
@@ -118,7 +122,10 @@ var CreateCustomizationRequest = z.object({
118
122
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
119
123
  defaultAddedPrice: z.string().describe(
120
124
  "Default amount added to a product's price when this customization is assigned to a modifier."
121
- ).optional().nullable()
125
+ ).optional().nullable(),
126
+ displayImage: z.string().describe(
127
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
128
+ ).optional()
122
129
  }),
123
130
  z.xor([
124
131
  z.object({ colorCode: z.never().optional() }),
@@ -199,7 +206,10 @@ var CreateCustomizationResponse = z.intersection(
199
206
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
200
207
  defaultAddedPrice: z.string().describe(
201
208
  "Default amount added to a product's price when this customization is assigned to a modifier."
202
- ).optional().nullable()
209
+ ).optional().nullable(),
210
+ displayImage: z.string().describe(
211
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
212
+ ).optional()
203
213
  }),
204
214
  z.xor([
205
215
  z.object({ colorCode: z.never().optional() }),
@@ -223,7 +233,7 @@ var GetCustomizationRequest = z.object({
223
233
  "Must be a valid GUID"
224
234
  ),
225
235
  options: z.object({
226
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
236
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
227
237
  }).optional()
228
238
  });
229
239
  var GetCustomizationResponse = z.intersection(
@@ -288,7 +298,10 @@ var GetCustomizationResponse = z.intersection(
288
298
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
289
299
  defaultAddedPrice: z.string().describe(
290
300
  "Default amount added to a product's price when this customization is assigned to a modifier."
291
- ).optional().nullable()
301
+ ).optional().nullable(),
302
+ displayImage: z.string().describe(
303
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
304
+ ).optional()
292
305
  }),
293
306
  z.xor([
294
307
  z.object({ colorCode: z.never().optional() }),
@@ -368,7 +381,10 @@ var UpdateCustomizationRequest = z.object({
368
381
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
369
382
  defaultAddedPrice: z.string().describe(
370
383
  "Default amount added to a product's price when this customization is assigned to a modifier."
371
- ).optional().nullable()
384
+ ).optional().nullable(),
385
+ displayImage: z.string().describe(
386
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
387
+ ).optional()
372
388
  }),
373
389
  z.xor([
374
390
  z.object({ colorCode: z.never().optional() }),
@@ -387,7 +403,7 @@ var UpdateCustomizationRequest = z.object({
387
403
  ])
388
404
  ).describe("Customization to update."),
389
405
  options: z.object({
390
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
406
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
391
407
  }).optional()
392
408
  });
393
409
  var UpdateCustomizationResponse = z.intersection(
@@ -452,7 +468,10 @@ var UpdateCustomizationResponse = z.intersection(
452
468
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
453
469
  defaultAddedPrice: z.string().describe(
454
470
  "Default amount added to a product's price when this customization is assigned to a modifier."
455
- ).optional().nullable()
471
+ ).optional().nullable(),
472
+ displayImage: z.string().describe(
473
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
474
+ ).optional()
456
475
  }),
457
476
  z.xor([
458
477
  z.object({ colorCode: z.never().optional() }),
@@ -576,7 +595,7 @@ var QueryCustomizationsRequest = z.object({
576
595
  ).optional()
577
596
  }).catchall(z.any()).describe("Query options."),
578
597
  options: z.object({
579
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
598
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
580
599
  }).optional()
581
600
  });
582
601
  var QueryCustomizationsResponse = z.object({
@@ -645,7 +664,10 @@ var QueryCustomizationsResponse = z.object({
645
664
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
646
665
  defaultAddedPrice: z.string().describe(
647
666
  "Default amount added to a product's price when this customization is assigned to a modifier."
648
- ).optional().nullable()
667
+ ).optional().nullable(),
668
+ displayImage: z.string().describe(
669
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
670
+ ).optional()
649
671
  }),
650
672
  z.xor([
651
673
  z.object({ colorCode: z.never().optional() }),
@@ -743,7 +765,10 @@ var BulkCreateCustomizationsRequest = z.object({
743
765
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
744
766
  defaultAddedPrice: z.string().describe(
745
767
  "Default amount added to a product's price when this customization is assigned to a modifier."
746
- ).optional().nullable()
768
+ ).optional().nullable(),
769
+ displayImage: z.string().describe(
770
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
771
+ ).optional()
747
772
  }),
748
773
  z.xor([
749
774
  z.object({ colorCode: z.never().optional() }),
@@ -851,7 +876,10 @@ var BulkCreateCustomizationsResponse = z.object({
851
876
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
852
877
  defaultAddedPrice: z.string().describe(
853
878
  "Default amount added to a product's price when this customization is assigned to a modifier."
854
- ).optional().nullable()
879
+ ).optional().nullable(),
880
+ displayImage: z.string().describe(
881
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
882
+ ).optional()
855
883
  }),
856
884
  z.xor([
857
885
  z.object({ colorCode: z.never().optional() }),
@@ -900,7 +928,10 @@ var AddCustomizationChoicesRequest = z.object({
900
928
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
901
929
  defaultAddedPrice: z.string().describe(
902
930
  "Default amount added to a product's price when this customization is assigned to a modifier."
903
- ).optional().nullable()
931
+ ).optional().nullable(),
932
+ displayImage: z.string().describe(
933
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
934
+ ).optional()
904
935
  }),
905
936
  z.xor([
906
937
  z.object({ colorCode: z.never().optional() }),
@@ -913,7 +944,7 @@ var AddCustomizationChoicesRequest = z.object({
913
944
  )
914
945
  ).min(1).max(100),
915
946
  options: z.object({
916
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
947
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
917
948
  }).optional()
918
949
  });
919
950
  var AddCustomizationChoicesResponse = z.object({
@@ -981,7 +1012,10 @@ var AddCustomizationChoicesResponse = z.object({
981
1012
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
982
1013
  defaultAddedPrice: z.string().describe(
983
1014
  "Default amount added to a product's price when this customization is assigned to a modifier."
984
- ).optional().nullable()
1015
+ ).optional().nullable(),
1016
+ displayImage: z.string().describe(
1017
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1018
+ ).optional()
985
1019
  }),
986
1020
  z.xor([
987
1021
  z.object({ colorCode: z.never().optional() }),
@@ -1019,7 +1053,10 @@ var SetCustomizationChoicesRequest = z.object({
1019
1053
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1020
1054
  defaultAddedPrice: z.string().describe(
1021
1055
  "Default amount added to a product's price when this customization is assigned to a modifier."
1022
- ).optional().nullable()
1056
+ ).optional().nullable(),
1057
+ displayImage: z.string().describe(
1058
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1059
+ ).optional()
1023
1060
  }),
1024
1061
  z.xor([
1025
1062
  z.object({ colorCode: z.never().optional() }),
@@ -1032,7 +1069,7 @@ var SetCustomizationChoicesRequest = z.object({
1032
1069
  )
1033
1070
  ).min(1).max(200),
1034
1071
  options: z.object({
1035
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1072
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1036
1073
  }).optional()
1037
1074
  });
1038
1075
  var SetCustomizationChoicesResponse = z.object({
@@ -1100,7 +1137,10 @@ var SetCustomizationChoicesResponse = z.object({
1100
1137
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1101
1138
  defaultAddedPrice: z.string().describe(
1102
1139
  "Default amount added to a product's price when this customization is assigned to a modifier."
1103
- ).optional().nullable()
1140
+ ).optional().nullable(),
1141
+ displayImage: z.string().describe(
1142
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1143
+ ).optional()
1104
1144
  }),
1105
1145
  z.xor([
1106
1146
  z.object({ colorCode: z.never().optional() }),
@@ -1127,7 +1167,7 @@ var RemoveCustomizationChoicesRequest = z.object({
1127
1167
  choiceIds: z.array(z.string()).min(1).max(100),
1128
1168
  options: z.object({
1129
1169
  revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe("Customization revision.").optional(),
1130
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1170
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1131
1171
  }).optional()
1132
1172
  });
1133
1173
  var RemoveCustomizationChoicesResponse = z.object({
@@ -1195,7 +1235,240 @@ var RemoveCustomizationChoicesResponse = z.object({
1195
1235
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1196
1236
  defaultAddedPrice: z.string().describe(
1197
1237
  "Default amount added to a product's price when this customization is assigned to a modifier."
1198
- ).optional().nullable()
1238
+ ).optional().nullable(),
1239
+ displayImage: z.string().describe(
1240
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1241
+ ).optional()
1242
+ }),
1243
+ z.xor([
1244
+ z.object({ colorCode: z.never().optional() }),
1245
+ z.object({
1246
+ colorCode: z.string().describe(
1247
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1248
+ ).min(3).max(20)
1249
+ })
1250
+ ])
1251
+ )
1252
+ ).min(1).max(200).optional()
1253
+ }).describe(
1254
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1255
+ )
1256
+ })
1257
+ ])
1258
+ ).describe("Updated customization.").optional()
1259
+ });
1260
+ var UpdateCustomizationChoicesRequest = z.object({
1261
+ customizationId: z.string().describe("Customization ID.").regex(
1262
+ /^[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}$/,
1263
+ "Must be a valid GUID"
1264
+ ),
1265
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1266
+ "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."
1267
+ ),
1268
+ options: z.object({
1269
+ choices: z.array(
1270
+ z.object({
1271
+ choice: z.intersection(
1272
+ z.object({
1273
+ _id: z.string().describe("Choice ID.").regex(
1274
+ /^[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}$/,
1275
+ "Must be a valid GUID"
1276
+ ).optional(),
1277
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
1278
+ key: z.string().describe(
1279
+ "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)."
1280
+ ).min(1).max(50).optional().nullable(),
1281
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1282
+ defaultAddedPrice: z.string().describe(
1283
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1284
+ ).optional().nullable(),
1285
+ displayImage: z.string().describe(
1286
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1287
+ ).optional()
1288
+ }),
1289
+ z.xor([
1290
+ z.object({ colorCode: z.never().optional() }),
1291
+ z.object({
1292
+ colorCode: z.string().describe(
1293
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1294
+ ).min(3).max(20)
1295
+ })
1296
+ ])
1297
+ ).describe("Choice to update.")
1298
+ })
1299
+ ).min(1).max(100),
1300
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1301
+ })
1302
+ });
1303
+ var UpdateCustomizationChoicesResponse = z.object({
1304
+ customization: z.intersection(
1305
+ z.object({
1306
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1307
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1308
+ "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."
1309
+ ).optional().nullable(),
1310
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1311
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1312
+ key: z.string().describe(
1313
+ "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)."
1314
+ ).min(1).max(50).optional().nullable(),
1315
+ name: z.string().describe(
1316
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1317
+ ).min(1).max(50).optional(),
1318
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1319
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1320
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1321
+ ).optional(),
1322
+ assignedProductsCount: z.number().int().describe(
1323
+ '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.'
1324
+ ).optional().nullable()
1325
+ }),
1326
+ z.xor([
1327
+ z.object({
1328
+ freeTextInput: z.never().optional(),
1329
+ choicesSettings: z.never().optional()
1330
+ }),
1331
+ z.object({
1332
+ choicesSettings: z.never().optional(),
1333
+ freeTextInput: z.object({
1334
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1335
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1336
+ defaultAddedPrice: z.string().describe(
1337
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1338
+ ).optional().nullable(),
1339
+ title: z.string().describe(
1340
+ "Title to display to customer for their free-text input."
1341
+ ).min(1).max(100).optional(),
1342
+ key: z.string().describe(
1343
+ "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)."
1344
+ ).min(1).max(150).optional().nullable()
1345
+ }).describe(
1346
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1347
+ )
1348
+ }),
1349
+ z.object({
1350
+ freeTextInput: z.never().optional(),
1351
+ choicesSettings: z.object({
1352
+ choices: z.array(
1353
+ z.intersection(
1354
+ z.object({
1355
+ _id: z.string().describe("Choice ID.").regex(
1356
+ /^[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}$/,
1357
+ "Must be a valid GUID"
1358
+ ).optional(),
1359
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1360
+ "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`."
1361
+ ).optional(),
1362
+ key: z.string().describe(
1363
+ "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)."
1364
+ ).min(1).max(50).optional().nullable(),
1365
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1366
+ defaultAddedPrice: z.string().describe(
1367
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1368
+ ).optional().nullable(),
1369
+ displayImage: z.string().describe(
1370
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1371
+ ).optional()
1372
+ }),
1373
+ z.xor([
1374
+ z.object({ colorCode: z.never().optional() }),
1375
+ z.object({
1376
+ colorCode: z.string().describe(
1377
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1378
+ ).min(3).max(20)
1379
+ })
1380
+ ])
1381
+ )
1382
+ ).min(1).max(200).optional()
1383
+ }).describe(
1384
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1385
+ )
1386
+ })
1387
+ ])
1388
+ ).describe("Updated customization.").optional()
1389
+ });
1390
+ var ReorderCustomizationChoicesRequest = z.object({
1391
+ customizationId: z.string().describe("Customization ID.").regex(
1392
+ /^[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}$/,
1393
+ "Must be a valid GUID"
1394
+ ),
1395
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1396
+ "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."
1397
+ ),
1398
+ options: z.object({
1399
+ choiceIds: z.array(z.string()).min(1).max(200),
1400
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1401
+ })
1402
+ });
1403
+ var ReorderCustomizationChoicesResponse = z.object({
1404
+ customization: z.intersection(
1405
+ z.object({
1406
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1407
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1408
+ "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."
1409
+ ).optional().nullable(),
1410
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1411
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1412
+ key: z.string().describe(
1413
+ "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)."
1414
+ ).min(1).max(50).optional().nullable(),
1415
+ name: z.string().describe(
1416
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1417
+ ).min(1).max(50).optional(),
1418
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1419
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1420
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1421
+ ).optional(),
1422
+ assignedProductsCount: z.number().int().describe(
1423
+ '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.'
1424
+ ).optional().nullable()
1425
+ }),
1426
+ z.xor([
1427
+ z.object({
1428
+ freeTextInput: z.never().optional(),
1429
+ choicesSettings: z.never().optional()
1430
+ }),
1431
+ z.object({
1432
+ choicesSettings: z.never().optional(),
1433
+ freeTextInput: z.object({
1434
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1435
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1436
+ defaultAddedPrice: z.string().describe(
1437
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1438
+ ).optional().nullable(),
1439
+ title: z.string().describe(
1440
+ "Title to display to customer for their free-text input."
1441
+ ).min(1).max(100).optional(),
1442
+ key: z.string().describe(
1443
+ "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)."
1444
+ ).min(1).max(150).optional().nullable()
1445
+ }).describe(
1446
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1447
+ )
1448
+ }),
1449
+ z.object({
1450
+ freeTextInput: z.never().optional(),
1451
+ choicesSettings: z.object({
1452
+ choices: z.array(
1453
+ z.intersection(
1454
+ z.object({
1455
+ _id: z.string().describe("Choice ID.").regex(
1456
+ /^[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}$/,
1457
+ "Must be a valid GUID"
1458
+ ).optional(),
1459
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1460
+ "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`."
1461
+ ).optional(),
1462
+ key: z.string().describe(
1463
+ "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)."
1464
+ ).min(1).max(50).optional().nullable(),
1465
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1466
+ defaultAddedPrice: z.string().describe(
1467
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1468
+ ).optional().nullable(),
1469
+ displayImage: z.string().describe(
1470
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1471
+ ).optional()
1199
1472
  }),
1200
1473
  z.xor([
1201
1474
  z.object({ colorCode: z.never().optional() }),
@@ -1232,7 +1505,10 @@ var BulkAddCustomizationChoicesRequest = z.object({
1232
1505
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1233
1506
  defaultAddedPrice: z.string().describe(
1234
1507
  "Default amount added to a product's price when this customization is assigned to a modifier."
1235
- ).optional().nullable()
1508
+ ).optional().nullable(),
1509
+ displayImage: z.string().describe(
1510
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1511
+ ).optional()
1236
1512
  }),
1237
1513
  z.xor([
1238
1514
  z.object({ colorCode: z.never().optional() }),
@@ -1250,7 +1526,7 @@ var BulkAddCustomizationChoicesRequest = z.object({
1250
1526
  returnEntity: z.boolean().describe(
1251
1527
  "Whether to return the full customization entities in the response.\n\nDefault: `false`"
1252
1528
  ).optional(),
1253
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1529
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1254
1530
  }).optional()
1255
1531
  });
1256
1532
  var BulkAddCustomizationChoicesResponse = z.object({
@@ -1336,7 +1612,10 @@ var BulkAddCustomizationChoicesResponse = z.object({
1336
1612
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1337
1613
  defaultAddedPrice: z.string().describe(
1338
1614
  "Default amount added to a product's price when this customization is assigned to a modifier."
1339
- ).optional().nullable()
1615
+ ).optional().nullable(),
1616
+ displayImage: z.string().describe(
1617
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1618
+ ).optional()
1340
1619
  }),
1341
1620
  z.xor([
1342
1621
  z.object({ colorCode: z.never().optional() }),
@@ -1429,7 +1708,10 @@ var BulkUpdateCustomizationsRequest = z.object({
1429
1708
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1430
1709
  defaultAddedPrice: z.string().describe(
1431
1710
  "Default amount added to a product's price when this customization is assigned to a modifier."
1432
- ).optional().nullable()
1711
+ ).optional().nullable(),
1712
+ displayImage: z.string().describe(
1713
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1714
+ ).optional()
1433
1715
  }),
1434
1716
  z.xor([
1435
1717
  z.object({ colorCode: z.never().optional() }),
@@ -1453,7 +1735,7 @@ var BulkUpdateCustomizationsRequest = z.object({
1453
1735
  returnEntity: z.boolean().describe(
1454
1736
  "Whether to return the full customization entities in the response.\n\nDefault: `false`"
1455
1737
  ).optional(),
1456
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1738
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1457
1739
  }).optional()
1458
1740
  });
1459
1741
  var BulkUpdateCustomizationsResponse = z.object({
@@ -1539,7 +1821,10 @@ var BulkUpdateCustomizationsResponse = z.object({
1539
1821
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1540
1822
  defaultAddedPrice: z.string().describe(
1541
1823
  "Default amount added to a product's price when this customization is assigned to a modifier."
1542
- ).optional().nullable()
1824
+ ).optional().nullable(),
1825
+ displayImage: z.string().describe(
1826
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1827
+ ).optional()
1543
1828
  }),
1544
1829
  z.xor([
1545
1830
  z.object({ colorCode: z.never().optional() }),
@@ -1589,8 +1874,12 @@ var BulkUpdateCustomizationsResponse = z.object({
1589
1874
  QueryCustomizationsResponse,
1590
1875
  RemoveCustomizationChoicesRequest,
1591
1876
  RemoveCustomizationChoicesResponse,
1877
+ ReorderCustomizationChoicesRequest,
1878
+ ReorderCustomizationChoicesResponse,
1592
1879
  SetCustomizationChoicesRequest,
1593
1880
  SetCustomizationChoicesResponse,
1881
+ UpdateCustomizationChoicesRequest,
1882
+ UpdateCustomizationChoicesResponse,
1594
1883
  UpdateCustomizationRequest,
1595
1884
  UpdateCustomizationResponse
1596
1885
  });