@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
@@ -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,11 @@ 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(),
129
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
122
130
  }),
123
131
  z.xor([
124
132
  z.object({ colorCode: z.never().optional() }),
@@ -199,7 +207,11 @@ var CreateCustomizationResponse = z.intersection(
199
207
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
200
208
  defaultAddedPrice: z.string().describe(
201
209
  "Default amount added to a product's price when this customization is assigned to a modifier."
202
- ).optional().nullable()
210
+ ).optional().nullable(),
211
+ displayImage: z.string().describe(
212
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
213
+ ).optional(),
214
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
203
215
  }),
204
216
  z.xor([
205
217
  z.object({ colorCode: z.never().optional() }),
@@ -223,7 +235,7 @@ var GetCustomizationRequest = z.object({
223
235
  "Must be a valid GUID"
224
236
  ),
225
237
  options: z.object({
226
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
238
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
227
239
  }).optional()
228
240
  });
229
241
  var GetCustomizationResponse = z.intersection(
@@ -288,7 +300,11 @@ var GetCustomizationResponse = z.intersection(
288
300
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
289
301
  defaultAddedPrice: z.string().describe(
290
302
  "Default amount added to a product's price when this customization is assigned to a modifier."
291
- ).optional().nullable()
303
+ ).optional().nullable(),
304
+ displayImage: z.string().describe(
305
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
306
+ ).optional(),
307
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
292
308
  }),
293
309
  z.xor([
294
310
  z.object({ colorCode: z.never().optional() }),
@@ -368,7 +384,11 @@ var UpdateCustomizationRequest = z.object({
368
384
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
369
385
  defaultAddedPrice: z.string().describe(
370
386
  "Default amount added to a product's price when this customization is assigned to a modifier."
371
- ).optional().nullable()
387
+ ).optional().nullable(),
388
+ displayImage: z.string().describe(
389
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
390
+ ).optional(),
391
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
372
392
  }),
373
393
  z.xor([
374
394
  z.object({ colorCode: z.never().optional() }),
@@ -387,7 +407,7 @@ var UpdateCustomizationRequest = z.object({
387
407
  ])
388
408
  ).describe("Customization to update."),
389
409
  options: z.object({
390
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
410
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
391
411
  }).optional()
392
412
  });
393
413
  var UpdateCustomizationResponse = z.intersection(
@@ -452,7 +472,11 @@ var UpdateCustomizationResponse = z.intersection(
452
472
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
453
473
  defaultAddedPrice: z.string().describe(
454
474
  "Default amount added to a product's price when this customization is assigned to a modifier."
455
- ).optional().nullable()
475
+ ).optional().nullable(),
476
+ displayImage: z.string().describe(
477
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
478
+ ).optional(),
479
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
456
480
  }),
457
481
  z.xor([
458
482
  z.object({ colorCode: z.never().optional() }),
@@ -576,7 +600,7 @@ var QueryCustomizationsRequest = z.object({
576
600
  ).optional()
577
601
  }).catchall(z.any()).describe("Query options."),
578
602
  options: z.object({
579
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
603
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
580
604
  }).optional()
581
605
  });
582
606
  var QueryCustomizationsResponse = z.object({
@@ -645,7 +669,11 @@ var QueryCustomizationsResponse = z.object({
645
669
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
646
670
  defaultAddedPrice: z.string().describe(
647
671
  "Default amount added to a product's price when this customization is assigned to a modifier."
648
- ).optional().nullable()
672
+ ).optional().nullable(),
673
+ displayImage: z.string().describe(
674
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
675
+ ).optional(),
676
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
649
677
  }),
650
678
  z.xor([
651
679
  z.object({ colorCode: z.never().optional() }),
@@ -743,7 +771,11 @@ var BulkCreateCustomizationsRequest = z.object({
743
771
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
744
772
  defaultAddedPrice: z.string().describe(
745
773
  "Default amount added to a product's price when this customization is assigned to a modifier."
746
- ).optional().nullable()
774
+ ).optional().nullable(),
775
+ displayImage: z.string().describe(
776
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
777
+ ).optional(),
778
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
747
779
  }),
748
780
  z.xor([
749
781
  z.object({ colorCode: z.never().optional() }),
@@ -851,7 +883,11 @@ var BulkCreateCustomizationsResponse = z.object({
851
883
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
852
884
  defaultAddedPrice: z.string().describe(
853
885
  "Default amount added to a product's price when this customization is assigned to a modifier."
854
- ).optional().nullable()
886
+ ).optional().nullable(),
887
+ displayImage: z.string().describe(
888
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
889
+ ).optional(),
890
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
855
891
  }),
856
892
  z.xor([
857
893
  z.object({ colorCode: z.never().optional() }),
@@ -900,7 +936,11 @@ var AddCustomizationChoicesRequest = z.object({
900
936
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
901
937
  defaultAddedPrice: z.string().describe(
902
938
  "Default amount added to a product's price when this customization is assigned to a modifier."
903
- ).optional().nullable()
939
+ ).optional().nullable(),
940
+ displayImage: z.string().describe(
941
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
942
+ ).optional(),
943
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
904
944
  }),
905
945
  z.xor([
906
946
  z.object({ colorCode: z.never().optional() }),
@@ -913,7 +953,7 @@ var AddCustomizationChoicesRequest = z.object({
913
953
  )
914
954
  ).min(1).max(100),
915
955
  options: z.object({
916
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
956
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
917
957
  }).optional()
918
958
  });
919
959
  var AddCustomizationChoicesResponse = z.object({
@@ -981,7 +1021,11 @@ var AddCustomizationChoicesResponse = z.object({
981
1021
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
982
1022
  defaultAddedPrice: z.string().describe(
983
1023
  "Default amount added to a product's price when this customization is assigned to a modifier."
984
- ).optional().nullable()
1024
+ ).optional().nullable(),
1025
+ displayImage: z.string().describe(
1026
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1027
+ ).optional(),
1028
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
985
1029
  }),
986
1030
  z.xor([
987
1031
  z.object({ colorCode: z.never().optional() }),
@@ -1019,7 +1063,11 @@ var SetCustomizationChoicesRequest = z.object({
1019
1063
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1020
1064
  defaultAddedPrice: z.string().describe(
1021
1065
  "Default amount added to a product's price when this customization is assigned to a modifier."
1022
- ).optional().nullable()
1066
+ ).optional().nullable(),
1067
+ displayImage: z.string().describe(
1068
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1069
+ ).optional(),
1070
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1023
1071
  }),
1024
1072
  z.xor([
1025
1073
  z.object({ colorCode: z.never().optional() }),
@@ -1032,7 +1080,7 @@ var SetCustomizationChoicesRequest = z.object({
1032
1080
  )
1033
1081
  ).min(1).max(200),
1034
1082
  options: z.object({
1035
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1083
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1036
1084
  }).optional()
1037
1085
  });
1038
1086
  var SetCustomizationChoicesResponse = z.object({
@@ -1100,7 +1148,11 @@ var SetCustomizationChoicesResponse = z.object({
1100
1148
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1101
1149
  defaultAddedPrice: z.string().describe(
1102
1150
  "Default amount added to a product's price when this customization is assigned to a modifier."
1103
- ).optional().nullable()
1151
+ ).optional().nullable(),
1152
+ displayImage: z.string().describe(
1153
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1154
+ ).optional(),
1155
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1104
1156
  }),
1105
1157
  z.xor([
1106
1158
  z.object({ colorCode: z.never().optional() }),
@@ -1127,7 +1179,7 @@ var RemoveCustomizationChoicesRequest = z.object({
1127
1179
  choiceIds: z.array(z.string()).min(1).max(100),
1128
1180
  options: z.object({
1129
1181
  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()
1182
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1131
1183
  }).optional()
1132
1184
  });
1133
1185
  var RemoveCustomizationChoicesResponse = z.object({
@@ -1195,7 +1247,11 @@ var RemoveCustomizationChoicesResponse = z.object({
1195
1247
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1196
1248
  defaultAddedPrice: z.string().describe(
1197
1249
  "Default amount added to a product's price when this customization is assigned to a modifier."
1198
- ).optional().nullable()
1250
+ ).optional().nullable(),
1251
+ displayImage: z.string().describe(
1252
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1253
+ ).optional(),
1254
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1199
1255
  }),
1200
1256
  z.xor([
1201
1257
  z.object({ colorCode: z.never().optional() }),
@@ -1214,6 +1270,241 @@ var RemoveCustomizationChoicesResponse = z.object({
1214
1270
  ])
1215
1271
  ).describe("Updated customization.").optional()
1216
1272
  });
1273
+ var UpdateCustomizationChoicesRequest = z.object({
1274
+ customizationId: z.string().describe("Customization ID.").regex(
1275
+ /^[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}$/,
1276
+ "Must be a valid GUID"
1277
+ ),
1278
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1279
+ "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."
1280
+ ),
1281
+ options: z.object({
1282
+ choices: z.array(
1283
+ z.object({
1284
+ choice: z.intersection(
1285
+ z.object({
1286
+ _id: z.string().describe("Choice ID.").regex(
1287
+ /^[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}$/,
1288
+ "Must be a valid GUID"
1289
+ ).optional(),
1290
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).optional(),
1291
+ key: z.string().describe(
1292
+ "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)."
1293
+ ).min(1).max(50).optional().nullable(),
1294
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1295
+ defaultAddedPrice: z.string().describe(
1296
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1297
+ ).optional().nullable(),
1298
+ displayImage: z.string().describe(
1299
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1300
+ ).optional(),
1301
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1302
+ }),
1303
+ z.xor([
1304
+ z.object({ colorCode: z.never().optional() }),
1305
+ z.object({
1306
+ colorCode: z.string().describe(
1307
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1308
+ ).min(3).max(20)
1309
+ })
1310
+ ])
1311
+ ).describe("Choice to update.")
1312
+ })
1313
+ ).min(1).max(100),
1314
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1315
+ })
1316
+ });
1317
+ var UpdateCustomizationChoicesResponse = z.object({
1318
+ customization: z.intersection(
1319
+ z.object({
1320
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1321
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1322
+ "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."
1323
+ ).optional().nullable(),
1324
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1325
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1326
+ key: z.string().describe(
1327
+ "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)."
1328
+ ).min(1).max(50).optional().nullable(),
1329
+ name: z.string().describe(
1330
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1331
+ ).min(1).max(50).optional(),
1332
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1333
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1334
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1335
+ ).optional(),
1336
+ assignedProductsCount: z.number().int().describe(
1337
+ '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.'
1338
+ ).optional().nullable()
1339
+ }),
1340
+ z.xor([
1341
+ z.object({
1342
+ freeTextInput: z.never().optional(),
1343
+ choicesSettings: z.never().optional()
1344
+ }),
1345
+ z.object({
1346
+ choicesSettings: z.never().optional(),
1347
+ freeTextInput: z.object({
1348
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1349
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1350
+ defaultAddedPrice: z.string().describe(
1351
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1352
+ ).optional().nullable(),
1353
+ title: z.string().describe(
1354
+ "Title to display to customer for their free-text input."
1355
+ ).min(1).max(100).optional(),
1356
+ key: z.string().describe(
1357
+ "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)."
1358
+ ).min(1).max(150).optional().nullable()
1359
+ }).describe(
1360
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1361
+ )
1362
+ }),
1363
+ z.object({
1364
+ freeTextInput: z.never().optional(),
1365
+ choicesSettings: z.object({
1366
+ choices: z.array(
1367
+ z.intersection(
1368
+ z.object({
1369
+ _id: z.string().describe("Choice ID.").regex(
1370
+ /^[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}$/,
1371
+ "Must be a valid GUID"
1372
+ ).optional(),
1373
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1374
+ "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`."
1375
+ ).optional(),
1376
+ key: z.string().describe(
1377
+ "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)."
1378
+ ).min(1).max(50).optional().nullable(),
1379
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1380
+ defaultAddedPrice: z.string().describe(
1381
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1382
+ ).optional().nullable(),
1383
+ displayImage: z.string().describe(
1384
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1385
+ ).optional(),
1386
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1387
+ }),
1388
+ z.xor([
1389
+ z.object({ colorCode: z.never().optional() }),
1390
+ z.object({
1391
+ colorCode: z.string().describe(
1392
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1393
+ ).min(3).max(20)
1394
+ })
1395
+ ])
1396
+ )
1397
+ ).min(1).max(200).optional()
1398
+ }).describe(
1399
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1400
+ )
1401
+ })
1402
+ ])
1403
+ ).describe("Updated customization.").optional()
1404
+ });
1405
+ var ReorderCustomizationChoicesRequest = z.object({
1406
+ customizationId: z.string().describe("Customization ID.").regex(
1407
+ /^[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}$/,
1408
+ "Must be a valid GUID"
1409
+ ),
1410
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1411
+ "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."
1412
+ ),
1413
+ options: z.object({
1414
+ choiceIds: z.array(z.string()).min(1).max(200),
1415
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1416
+ })
1417
+ });
1418
+ var ReorderCustomizationChoicesResponse = z.object({
1419
+ customization: z.intersection(
1420
+ z.object({
1421
+ _id: z.string().describe("Customization ID.").min(1).max(36).optional().nullable(),
1422
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
1423
+ "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."
1424
+ ).optional().nullable(),
1425
+ _createdDate: z.date().describe("Date and time the customization was created.").optional().nullable(),
1426
+ _updatedDate: z.date().describe("Date and time the customization was updated.").optional().nullable(),
1427
+ key: z.string().describe(
1428
+ "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)."
1429
+ ).min(1).max(50).optional().nullable(),
1430
+ name: z.string().describe(
1431
+ 'Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`).'
1432
+ ).min(1).max(50).optional(),
1433
+ customizationType: z.enum(["PRODUCT_OPTION", "MODIFIER"]).describe("Customization type.").optional(),
1434
+ customizationRenderType: z.enum(["FREE_TEXT", "TEXT_CHOICES", "SWATCH_CHOICES"]).describe(
1435
+ "Customization render type.\n\nDefines how the customization will be displayed in the storefront."
1436
+ ).optional(),
1437
+ assignedProductsCount: z.number().int().describe(
1438
+ '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.'
1439
+ ).optional().nullable()
1440
+ }),
1441
+ z.xor([
1442
+ z.object({
1443
+ freeTextInput: z.never().optional(),
1444
+ choicesSettings: z.never().optional()
1445
+ }),
1446
+ z.object({
1447
+ choicesSettings: z.never().optional(),
1448
+ freeTextInput: z.object({
1449
+ minCharCount: z.number().int().describe("Minimum text character length.").optional(),
1450
+ maxCharCount: z.number().int().describe("Maximum text character length.").max(500).optional(),
1451
+ defaultAddedPrice: z.string().describe(
1452
+ "Default amount added to a product's price when this choice is assigned to a modifier."
1453
+ ).optional().nullable(),
1454
+ title: z.string().describe(
1455
+ "Title to display to customer for their free-text input."
1456
+ ).min(1).max(100).optional(),
1457
+ key: z.string().describe(
1458
+ "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)."
1459
+ ).min(1).max(150).optional().nullable()
1460
+ }).describe(
1461
+ "Free text input settings.\n\n> **Note:** To be passed along with `customizationRenderType: FREE_TEXT`."
1462
+ )
1463
+ }),
1464
+ z.object({
1465
+ freeTextInput: z.never().optional(),
1466
+ choicesSettings: z.object({
1467
+ choices: z.array(
1468
+ z.intersection(
1469
+ z.object({
1470
+ _id: z.string().describe("Choice ID.").regex(
1471
+ /^[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}$/,
1472
+ "Must be a valid GUID"
1473
+ ).optional(),
1474
+ choiceType: z.enum(["CHOICE_TEXT", "ONE_COLOR"]).describe(
1475
+ "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`."
1476
+ ).optional(),
1477
+ key: z.string().describe(
1478
+ "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)."
1479
+ ).min(1).max(50).optional().nullable(),
1480
+ name: z.string().describe("Choice name.").min(1).max(50).optional(),
1481
+ defaultAddedPrice: z.string().describe(
1482
+ "Default amount added to a product's price when this customization is assigned to a modifier."
1483
+ ).optional().nullable(),
1484
+ displayImage: z.string().describe(
1485
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1486
+ ).optional(),
1487
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1488
+ }),
1489
+ z.xor([
1490
+ z.object({ colorCode: z.never().optional() }),
1491
+ z.object({
1492
+ colorCode: z.string().describe(
1493
+ "Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)."
1494
+ ).min(3).max(20)
1495
+ })
1496
+ ])
1497
+ )
1498
+ ).min(1).max(200).optional()
1499
+ }).describe(
1500
+ "Choices settings.\n\n> **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`."
1501
+ )
1502
+ })
1503
+ ])
1504
+ ).describe(
1505
+ "Updated customization, with `choices` in the new order and `choicesSettings.sortOrder` set to `MANUAL`."
1506
+ ).optional()
1507
+ });
1217
1508
  var BulkAddCustomizationChoicesRequest = z.object({
1218
1509
  customizationsChoices: z.array(
1219
1510
  z.object({
@@ -1232,7 +1523,11 @@ var BulkAddCustomizationChoicesRequest = z.object({
1232
1523
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1233
1524
  defaultAddedPrice: z.string().describe(
1234
1525
  "Default amount added to a product's price when this customization is assigned to a modifier."
1235
- ).optional().nullable()
1526
+ ).optional().nullable(),
1527
+ displayImage: z.string().describe(
1528
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1529
+ ).optional(),
1530
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1236
1531
  }),
1237
1532
  z.xor([
1238
1533
  z.object({ colorCode: z.never().optional() }),
@@ -1250,7 +1545,7 @@ var BulkAddCustomizationChoicesRequest = z.object({
1250
1545
  returnEntity: z.boolean().describe(
1251
1546
  "Whether to return the full customization entities in the response.\n\nDefault: `false`"
1252
1547
  ).optional(),
1253
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1548
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1254
1549
  }).optional()
1255
1550
  });
1256
1551
  var BulkAddCustomizationChoicesResponse = z.object({
@@ -1336,7 +1631,11 @@ var BulkAddCustomizationChoicesResponse = z.object({
1336
1631
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1337
1632
  defaultAddedPrice: z.string().describe(
1338
1633
  "Default amount added to a product's price when this customization is assigned to a modifier."
1339
- ).optional().nullable()
1634
+ ).optional().nullable(),
1635
+ displayImage: z.string().describe(
1636
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1637
+ ).optional(),
1638
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1340
1639
  }),
1341
1640
  z.xor([
1342
1641
  z.object({ colorCode: z.never().optional() }),
@@ -1429,7 +1728,11 @@ var BulkUpdateCustomizationsRequest = z.object({
1429
1728
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1430
1729
  defaultAddedPrice: z.string().describe(
1431
1730
  "Default amount added to a product's price when this customization is assigned to a modifier."
1432
- ).optional().nullable()
1731
+ ).optional().nullable(),
1732
+ displayImage: z.string().describe(
1733
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1734
+ ).optional(),
1735
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1433
1736
  }),
1434
1737
  z.xor([
1435
1738
  z.object({ colorCode: z.never().optional() }),
@@ -1453,7 +1756,7 @@ var BulkUpdateCustomizationsRequest = z.object({
1453
1756
  returnEntity: z.boolean().describe(
1454
1757
  "Whether to return the full customization entities in the response.\n\nDefault: `false`"
1455
1758
  ).optional(),
1456
- fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT"])).max(100).optional()
1759
+ fields: z.array(z.enum(["ASSIGNED_PRODUCTS_COUNT", "CHOICE_DISPLAY_IMAGE"])).max(100).optional()
1457
1760
  }).optional()
1458
1761
  });
1459
1762
  var BulkUpdateCustomizationsResponse = z.object({
@@ -1539,7 +1842,11 @@ var BulkUpdateCustomizationsResponse = z.object({
1539
1842
  name: z.string().describe("Choice name.").min(1).max(50).optional(),
1540
1843
  defaultAddedPrice: z.string().describe(
1541
1844
  "Default amount added to a product's price when this customization is assigned to a modifier."
1542
- ).optional().nullable()
1845
+ ).optional().nullable(),
1846
+ displayImage: z.string().describe(
1847
+ "Optional image displayed alongside a ONE_COLOR choice in the storefront.\nOnly valid for ONE_COLOR choices; not populated for other choice types."
1848
+ ).optional(),
1849
+ primaryChoiceIds: z.array(z.string()).max(4).optional()
1543
1850
  }),
1544
1851
  z.xor([
1545
1852
  z.object({ colorCode: z.never().optional() }),
@@ -1589,8 +1896,12 @@ var BulkUpdateCustomizationsResponse = z.object({
1589
1896
  QueryCustomizationsResponse,
1590
1897
  RemoveCustomizationChoicesRequest,
1591
1898
  RemoveCustomizationChoicesResponse,
1899
+ ReorderCustomizationChoicesRequest,
1900
+ ReorderCustomizationChoicesResponse,
1592
1901
  SetCustomizationChoicesRequest,
1593
1902
  SetCustomizationChoicesResponse,
1903
+ UpdateCustomizationChoicesRequest,
1904
+ UpdateCustomizationChoicesResponse,
1594
1905
  UpdateCustomizationRequest,
1595
1906
  UpdateCustomizationResponse
1596
1907
  });