@wix/auto_sdk_stores_customizations-v-3 1.0.67 → 1.0.68

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 (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +123 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +98 -1
  5. package/build/cjs/index.typings.js +113 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +87 -2
  8. package/build/cjs/meta.js +85 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +122 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +98 -1
  14. package/build/es/index.typings.mjs +112 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +87 -2
  17. package/build/es/meta.mjs +83 -1
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +23 -3
  20. package/build/internal/cjs/index.js +123 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +134 -1
  23. package/build/internal/cjs/index.typings.js +113 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +87 -2
  26. package/build/internal/cjs/meta.js +85 -2
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +23 -3
  29. package/build/internal/es/index.mjs +122 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +134 -1
  32. package/build/internal/es/index.typings.mjs +112 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +87 -2
  35. package/build/internal/es/meta.mjs +83 -1
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -545,6 +545,67 @@ function removeCustomizationChoices(payload) {
545
545
  }
546
546
  return __removeCustomizationChoices;
547
547
  }
548
+ function updateCustomizationChoices(payload) {
549
+ function __updateCustomizationChoices({ host }) {
550
+ const serializedData = transformPaths(payload, [
551
+ {
552
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
553
+ paths: [{ path: "choices.fieldMask" }]
554
+ },
555
+ {
556
+ transformFn: transformSDKTimestampToRESTTimestamp,
557
+ paths: [{ path: "choices.choice.image.urlExpirationDate" }]
558
+ },
559
+ {
560
+ transformFn: transformSDKFloatToRESTFloat,
561
+ paths: [
562
+ { path: "choices.choice.image.focalPoint.x" },
563
+ { path: "choices.choice.image.focalPoint.y" }
564
+ ]
565
+ }
566
+ ]);
567
+ const metadata = {
568
+ entityFqdn: "wix.stores.catalog.v3.customization",
569
+ method: "POST",
570
+ methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomizationChoices",
571
+ packageName: PACKAGE_NAME,
572
+ migrationOptions: {
573
+ optInTransformResponse: true
574
+ },
575
+ url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
576
+ protoPath: "/v3/customizations/{customizationId}/update-choices",
577
+ data: serializedData,
578
+ host
579
+ }),
580
+ data: serializedData,
581
+ transformResponse: (payload2) => transformPaths(payload2, [
582
+ {
583
+ transformFn: transformRESTTimestampToSDKTimestamp,
584
+ paths: [
585
+ { path: "customization.createdDate" },
586
+ { path: "customization.updatedDate" },
587
+ {
588
+ path: "customization.choicesSettings.choices.image.urlExpirationDate"
589
+ }
590
+ ]
591
+ },
592
+ {
593
+ transformFn: transformRESTFloatToSDKFloat,
594
+ paths: [
595
+ {
596
+ path: "customization.choicesSettings.choices.image.focalPoint.x"
597
+ },
598
+ {
599
+ path: "customization.choicesSettings.choices.image.focalPoint.y"
600
+ }
601
+ ]
602
+ }
603
+ ])
604
+ };
605
+ return metadata;
606
+ }
607
+ return __updateCustomizationChoices;
608
+ }
548
609
  function bulkAddCustomizationChoices(payload) {
549
610
  function __bulkAddCustomizationChoices({ host }) {
550
611
  const serializedData = transformPaths(payload, [
@@ -1132,6 +1193,56 @@ async function removeCustomizationChoices2(customizationId, choiceIds, options)
1132
1193
  throw transformedError;
1133
1194
  }
1134
1195
  }
1196
+ async function updateCustomizationChoices2(customizationId, revision, options) {
1197
+ const { httpClient, sideEffects } = arguments[3];
1198
+ const payload = transformPaths2(
1199
+ renameKeysFromSDKRequestToRESTRequest({
1200
+ customizationId,
1201
+ revision,
1202
+ choices: options?.choices,
1203
+ fields: options?.fields
1204
+ }),
1205
+ [
1206
+ {
1207
+ transformFn: transformSDKImageToRESTImage,
1208
+ paths: [{ path: "choices.choice.image" }]
1209
+ }
1210
+ ]
1211
+ );
1212
+ const reqOpts = updateCustomizationChoices(
1213
+ payload
1214
+ );
1215
+ sideEffects?.onSiteCall?.();
1216
+ try {
1217
+ const result = await httpClient.request(reqOpts);
1218
+ sideEffects?.onSuccess?.(result);
1219
+ return renameKeysFromRESTResponseToSDKResponse(
1220
+ transformPaths2(result.data, [
1221
+ {
1222
+ transformFn: transformRESTImageToSDKImage,
1223
+ paths: [{ path: "customization.choicesSettings.choices.image" }]
1224
+ }
1225
+ ])
1226
+ );
1227
+ } catch (err) {
1228
+ const transformedError = sdkTransformError(
1229
+ err,
1230
+ {
1231
+ spreadPathsToArguments: {},
1232
+ explicitPathsToArguments: {
1233
+ customizationId: "$[0]",
1234
+ revision: "$[1]",
1235
+ choices: "$[2].choices",
1236
+ fields: "$[2].fields"
1237
+ },
1238
+ singleArgumentUnchanged: false
1239
+ },
1240
+ ["customizationId", "revision", "options"]
1241
+ );
1242
+ sideEffects?.onError?.(err);
1243
+ throw transformedError;
1244
+ }
1245
+ }
1135
1246
  async function bulkAddCustomizationChoices2(customizationsChoices, options) {
1136
1247
  const { httpClient, sideEffects } = arguments[2];
1137
1248
  const payload = transformPaths2(
@@ -1317,6 +1428,15 @@ function removeCustomizationChoices3(httpClient) {
1317
1428
  { httpClient }
1318
1429
  );
1319
1430
  }
1431
+ function updateCustomizationChoices3(httpClient) {
1432
+ return (customizationId, revision, options) => updateCustomizationChoices2(
1433
+ customizationId,
1434
+ revision,
1435
+ options,
1436
+ // @ts-ignore
1437
+ { httpClient }
1438
+ );
1439
+ }
1320
1440
  function bulkAddCustomizationChoices3(httpClient) {
1321
1441
  return (customizationsChoices, options) => bulkAddCustomizationChoices2(
1322
1442
  customizationsChoices,
@@ -1422,6 +1542,7 @@ var bulkCreateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkCreateCusto
1422
1542
  var addCustomizationChoices4 = /* @__PURE__ */ createRESTModule(addCustomizationChoices3);
1423
1543
  var setCustomizationChoices4 = /* @__PURE__ */ createRESTModule(setCustomizationChoices3);
1424
1544
  var removeCustomizationChoices4 = /* @__PURE__ */ createRESTModule(removeCustomizationChoices3);
1545
+ var updateCustomizationChoices4 = /* @__PURE__ */ createRESTModule(updateCustomizationChoices3);
1425
1546
  var bulkAddCustomizationChoices4 = /* @__PURE__ */ createRESTModule(bulkAddCustomizationChoices3);
1426
1547
  var bulkUpdateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkUpdateCustomizations3);
1427
1548
  var queryCustomizations4 = /* @__PURE__ */ createRESTModule(customQueryCustomizations);
@@ -1455,6 +1576,7 @@ export {
1455
1576
  removeCustomizationChoices4 as removeCustomizationChoices,
1456
1577
  setCustomizationChoices4 as setCustomizationChoices,
1457
1578
  updateCustomization4 as updateCustomization,
1579
+ updateCustomizationChoices4 as updateCustomizationChoices,
1458
1580
  utils
1459
1581
  };
1460
1582
  //# sourceMappingURL=index.mjs.map