@wix/auto_sdk_stores_customizations-v-3 1.0.69 → 1.0.71
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.
- package/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +98 -5
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +70 -16
- package/build/cjs/index.typings.js +88 -5
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +58 -17
- package/build/cjs/meta.js +66 -5
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +97 -5
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +70 -16
- package/build/es/index.typings.mjs +87 -5
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +58 -17
- package/build/es/meta.mjs +65 -5
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +19 -3
- package/build/internal/cjs/index.js +98 -5
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +89 -17
- package/build/internal/cjs/index.typings.js +88 -5
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +58 -17
- package/build/internal/cjs/meta.js +66 -5
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +19 -3
- package/build/internal/es/index.mjs +97 -5
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +89 -17
- package/build/internal/es/index.typings.mjs +87 -5
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +58 -17
- package/build/internal/es/meta.mjs +65 -5
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -606,6 +606,50 @@ function updateCustomizationChoices(payload) {
|
|
|
606
606
|
}
|
|
607
607
|
return __updateCustomizationChoices;
|
|
608
608
|
}
|
|
609
|
+
function reorderCustomizationChoices(payload) {
|
|
610
|
+
function __reorderCustomizationChoices({ host }) {
|
|
611
|
+
const metadata = {
|
|
612
|
+
entityFqdn: "wix.stores.catalog.v3.customization",
|
|
613
|
+
method: "POST",
|
|
614
|
+
methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.ReorderCustomizationChoices",
|
|
615
|
+
packageName: PACKAGE_NAME,
|
|
616
|
+
migrationOptions: {
|
|
617
|
+
optInTransformResponse: true
|
|
618
|
+
},
|
|
619
|
+
url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
|
|
620
|
+
protoPath: "/v3/customizations/{customizationId}/reorder-choices",
|
|
621
|
+
data: payload,
|
|
622
|
+
host
|
|
623
|
+
}),
|
|
624
|
+
data: payload,
|
|
625
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
626
|
+
{
|
|
627
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
628
|
+
paths: [
|
|
629
|
+
{ path: "customization.createdDate" },
|
|
630
|
+
{ path: "customization.updatedDate" },
|
|
631
|
+
{
|
|
632
|
+
path: "customization.choicesSettings.choices.image.urlExpirationDate"
|
|
633
|
+
}
|
|
634
|
+
]
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
638
|
+
paths: [
|
|
639
|
+
{
|
|
640
|
+
path: "customization.choicesSettings.choices.image.focalPoint.x"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
path: "customization.choicesSettings.choices.image.focalPoint.y"
|
|
644
|
+
}
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
])
|
|
648
|
+
};
|
|
649
|
+
return metadata;
|
|
650
|
+
}
|
|
651
|
+
return __reorderCustomizationChoices;
|
|
652
|
+
}
|
|
609
653
|
function bulkAddCustomizationChoices(payload) {
|
|
610
654
|
function __bulkAddCustomizationChoices({ host }) {
|
|
611
655
|
const serializedData = transformPaths(payload, [
|
|
@@ -743,26 +787,22 @@ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/i
|
|
|
743
787
|
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
744
788
|
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
745
789
|
var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
|
|
746
|
-
CustomizationType2["UNKNOWN_CUSTOMIZATION_TYPE"] = "UNKNOWN_CUSTOMIZATION_TYPE";
|
|
747
790
|
CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
|
|
748
791
|
CustomizationType2["MODIFIER"] = "MODIFIER";
|
|
749
792
|
return CustomizationType2;
|
|
750
793
|
})(CustomizationType || {});
|
|
751
794
|
var CustomizationRenderType = /* @__PURE__ */ ((CustomizationRenderType2) => {
|
|
752
|
-
CustomizationRenderType2["UNKNOWN_CUSTOMIZATION_RENDER_TYPE"] = "UNKNOWN_CUSTOMIZATION_RENDER_TYPE";
|
|
753
795
|
CustomizationRenderType2["FREE_TEXT"] = "FREE_TEXT";
|
|
754
796
|
CustomizationRenderType2["TEXT_CHOICES"] = "TEXT_CHOICES";
|
|
755
797
|
CustomizationRenderType2["SWATCH_CHOICES"] = "SWATCH_CHOICES";
|
|
756
798
|
return CustomizationRenderType2;
|
|
757
799
|
})(CustomizationRenderType || {});
|
|
758
800
|
var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
|
|
759
|
-
ChoiceType2["UNKNOWN_CHOICE_TYPE"] = "UNKNOWN_CHOICE_TYPE";
|
|
760
801
|
ChoiceType2["CHOICE_TEXT"] = "CHOICE_TEXT";
|
|
761
802
|
ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
|
|
762
803
|
return ChoiceType2;
|
|
763
804
|
})(ChoiceType || {});
|
|
764
805
|
var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
|
|
765
|
-
ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
|
|
766
806
|
ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
|
|
767
807
|
ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
|
|
768
808
|
ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
|
|
@@ -770,7 +810,6 @@ var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
|
|
|
770
810
|
return ChoiceSortStrategy2;
|
|
771
811
|
})(ChoiceSortStrategy || {});
|
|
772
812
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
773
|
-
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
774
813
|
RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
|
|
775
814
|
return RequestedFields2;
|
|
776
815
|
})(RequestedFields || {});
|
|
@@ -1251,6 +1290,48 @@ async function updateCustomizationChoices2(customizationId, revision, options) {
|
|
|
1251
1290
|
throw transformedError;
|
|
1252
1291
|
}
|
|
1253
1292
|
}
|
|
1293
|
+
async function reorderCustomizationChoices2(customizationId, revision, options) {
|
|
1294
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1295
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1296
|
+
customizationId,
|
|
1297
|
+
revision,
|
|
1298
|
+
choiceIds: options?.choiceIds,
|
|
1299
|
+
fields: options?.fields
|
|
1300
|
+
});
|
|
1301
|
+
const reqOpts = reorderCustomizationChoices(
|
|
1302
|
+
payload
|
|
1303
|
+
);
|
|
1304
|
+
sideEffects?.onSiteCall?.();
|
|
1305
|
+
try {
|
|
1306
|
+
const result = await httpClient.request(reqOpts);
|
|
1307
|
+
sideEffects?.onSuccess?.(result);
|
|
1308
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1309
|
+
transformPaths2(result.data, [
|
|
1310
|
+
{
|
|
1311
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1312
|
+
paths: [{ path: "customization.choicesSettings.choices.image" }]
|
|
1313
|
+
}
|
|
1314
|
+
])
|
|
1315
|
+
);
|
|
1316
|
+
} catch (err) {
|
|
1317
|
+
const transformedError = sdkTransformError(
|
|
1318
|
+
err,
|
|
1319
|
+
{
|
|
1320
|
+
spreadPathsToArguments: {},
|
|
1321
|
+
explicitPathsToArguments: {
|
|
1322
|
+
customizationId: "$[0]",
|
|
1323
|
+
revision: "$[1]",
|
|
1324
|
+
choiceIds: "$[2].choiceIds",
|
|
1325
|
+
fields: "$[2].fields"
|
|
1326
|
+
},
|
|
1327
|
+
singleArgumentUnchanged: false
|
|
1328
|
+
},
|
|
1329
|
+
["customizationId", "revision", "options"]
|
|
1330
|
+
);
|
|
1331
|
+
sideEffects?.onError?.(err);
|
|
1332
|
+
throw transformedError;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1254
1335
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
1255
1336
|
const { httpClient, sideEffects } = arguments[2];
|
|
1256
1337
|
const payload = transformPaths2(
|
|
@@ -1445,6 +1526,15 @@ function updateCustomizationChoices3(httpClient) {
|
|
|
1445
1526
|
{ httpClient }
|
|
1446
1527
|
);
|
|
1447
1528
|
}
|
|
1529
|
+
function reorderCustomizationChoices3(httpClient) {
|
|
1530
|
+
return (customizationId, revision, options) => reorderCustomizationChoices2(
|
|
1531
|
+
customizationId,
|
|
1532
|
+
revision,
|
|
1533
|
+
options,
|
|
1534
|
+
// @ts-ignore
|
|
1535
|
+
{ httpClient }
|
|
1536
|
+
);
|
|
1537
|
+
}
|
|
1448
1538
|
function bulkAddCustomizationChoices3(httpClient) {
|
|
1449
1539
|
return (customizationsChoices, options) => bulkAddCustomizationChoices2(
|
|
1450
1540
|
customizationsChoices,
|
|
@@ -1551,6 +1641,7 @@ var addCustomizationChoices4 = /* @__PURE__ */ createRESTModule(addCustomization
|
|
|
1551
1641
|
var setCustomizationChoices4 = /* @__PURE__ */ createRESTModule(setCustomizationChoices3);
|
|
1552
1642
|
var removeCustomizationChoices4 = /* @__PURE__ */ createRESTModule(removeCustomizationChoices3);
|
|
1553
1643
|
var updateCustomizationChoices4 = /* @__PURE__ */ createRESTModule(updateCustomizationChoices3);
|
|
1644
|
+
var reorderCustomizationChoices4 = /* @__PURE__ */ createRESTModule(reorderCustomizationChoices3);
|
|
1554
1645
|
var bulkAddCustomizationChoices4 = /* @__PURE__ */ createRESTModule(bulkAddCustomizationChoices3);
|
|
1555
1646
|
var bulkUpdateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkUpdateCustomizations3);
|
|
1556
1647
|
var queryCustomizations4 = /* @__PURE__ */ createRESTModule(customQueryCustomizations);
|
|
@@ -1583,6 +1674,7 @@ export {
|
|
|
1583
1674
|
onCustomizationUpdated2 as onCustomizationUpdated,
|
|
1584
1675
|
queryCustomizations4 as queryCustomizations,
|
|
1585
1676
|
removeCustomizationChoices4 as removeCustomizationChoices,
|
|
1677
|
+
reorderCustomizationChoices4 as reorderCustomizationChoices,
|
|
1586
1678
|
setCustomizationChoices4 as setCustomizationChoices,
|
|
1587
1679
|
updateCustomization4 as updateCustomization,
|
|
1588
1680
|
updateCustomizationChoices4 as updateCustomizationChoices,
|