@wix/auto_sdk_stores_customizations-v-3 1.0.68 → 1.0.70
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 +108 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +75 -1
- package/build/cjs/index.typings.js +98 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +63 -2
- package/build/cjs/meta.js +76 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +106 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +75 -1
- package/build/es/index.typings.mjs +96 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +63 -2
- package/build/es/meta.mjs +74 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +19 -3
- package/build/internal/cjs/index.js +108 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +100 -1
- package/build/internal/cjs/index.typings.js +98 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +63 -2
- package/build/internal/cjs/meta.js +76 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +19 -3
- package/build/internal/es/index.mjs +106 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +100 -1
- package/build/internal/es/index.typings.mjs +96 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +63 -2
- package/build/internal/es/meta.mjs +74 -0
- 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, [
|
|
@@ -761,6 +805,14 @@ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
|
|
|
761
805
|
ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
|
|
762
806
|
return ChoiceType2;
|
|
763
807
|
})(ChoiceType || {});
|
|
808
|
+
var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
|
|
809
|
+
ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
|
|
810
|
+
ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
|
|
811
|
+
ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
|
|
812
|
+
ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
|
|
813
|
+
ChoiceSortStrategy2["MANUAL"] = "MANUAL";
|
|
814
|
+
return ChoiceSortStrategy2;
|
|
815
|
+
})(ChoiceSortStrategy || {});
|
|
764
816
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
765
817
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
766
818
|
RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
|
|
@@ -1243,6 +1295,48 @@ async function updateCustomizationChoices2(customizationId, revision, options) {
|
|
|
1243
1295
|
throw transformedError;
|
|
1244
1296
|
}
|
|
1245
1297
|
}
|
|
1298
|
+
async function reorderCustomizationChoices2(customizationId, revision, options) {
|
|
1299
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1300
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1301
|
+
customizationId,
|
|
1302
|
+
revision,
|
|
1303
|
+
choiceIds: options?.choiceIds,
|
|
1304
|
+
fields: options?.fields
|
|
1305
|
+
});
|
|
1306
|
+
const reqOpts = reorderCustomizationChoices(
|
|
1307
|
+
payload
|
|
1308
|
+
);
|
|
1309
|
+
sideEffects?.onSiteCall?.();
|
|
1310
|
+
try {
|
|
1311
|
+
const result = await httpClient.request(reqOpts);
|
|
1312
|
+
sideEffects?.onSuccess?.(result);
|
|
1313
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1314
|
+
transformPaths2(result.data, [
|
|
1315
|
+
{
|
|
1316
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1317
|
+
paths: [{ path: "customization.choicesSettings.choices.image" }]
|
|
1318
|
+
}
|
|
1319
|
+
])
|
|
1320
|
+
);
|
|
1321
|
+
} catch (err) {
|
|
1322
|
+
const transformedError = sdkTransformError(
|
|
1323
|
+
err,
|
|
1324
|
+
{
|
|
1325
|
+
spreadPathsToArguments: {},
|
|
1326
|
+
explicitPathsToArguments: {
|
|
1327
|
+
customizationId: "$[0]",
|
|
1328
|
+
revision: "$[1]",
|
|
1329
|
+
choiceIds: "$[2].choiceIds",
|
|
1330
|
+
fields: "$[2].fields"
|
|
1331
|
+
},
|
|
1332
|
+
singleArgumentUnchanged: false
|
|
1333
|
+
},
|
|
1334
|
+
["customizationId", "revision", "options"]
|
|
1335
|
+
);
|
|
1336
|
+
sideEffects?.onError?.(err);
|
|
1337
|
+
throw transformedError;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1246
1340
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
1247
1341
|
const { httpClient, sideEffects } = arguments[2];
|
|
1248
1342
|
const payload = transformPaths2(
|
|
@@ -1437,6 +1531,15 @@ function updateCustomizationChoices3(httpClient) {
|
|
|
1437
1531
|
{ httpClient }
|
|
1438
1532
|
);
|
|
1439
1533
|
}
|
|
1534
|
+
function reorderCustomizationChoices3(httpClient) {
|
|
1535
|
+
return (customizationId, revision, options) => reorderCustomizationChoices2(
|
|
1536
|
+
customizationId,
|
|
1537
|
+
revision,
|
|
1538
|
+
options,
|
|
1539
|
+
// @ts-ignore
|
|
1540
|
+
{ httpClient }
|
|
1541
|
+
);
|
|
1542
|
+
}
|
|
1440
1543
|
function bulkAddCustomizationChoices3(httpClient) {
|
|
1441
1544
|
return (customizationsChoices, options) => bulkAddCustomizationChoices2(
|
|
1442
1545
|
customizationsChoices,
|
|
@@ -1543,6 +1646,7 @@ var addCustomizationChoices4 = /* @__PURE__ */ createRESTModule(addCustomization
|
|
|
1543
1646
|
var setCustomizationChoices4 = /* @__PURE__ */ createRESTModule(setCustomizationChoices3);
|
|
1544
1647
|
var removeCustomizationChoices4 = /* @__PURE__ */ createRESTModule(removeCustomizationChoices3);
|
|
1545
1648
|
var updateCustomizationChoices4 = /* @__PURE__ */ createRESTModule(updateCustomizationChoices3);
|
|
1649
|
+
var reorderCustomizationChoices4 = /* @__PURE__ */ createRESTModule(reorderCustomizationChoices3);
|
|
1546
1650
|
var bulkAddCustomizationChoices4 = /* @__PURE__ */ createRESTModule(bulkAddCustomizationChoices3);
|
|
1547
1651
|
var bulkUpdateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkUpdateCustomizations3);
|
|
1548
1652
|
var queryCustomizations4 = /* @__PURE__ */ createRESTModule(customQueryCustomizations);
|
|
@@ -1556,6 +1660,7 @@ var onCustomizationUpdated2 = createEventModule(
|
|
|
1556
1660
|
onCustomizationUpdated
|
|
1557
1661
|
);
|
|
1558
1662
|
export {
|
|
1663
|
+
ChoiceSortStrategy,
|
|
1559
1664
|
ChoiceType,
|
|
1560
1665
|
CustomizationRenderType,
|
|
1561
1666
|
CustomizationType,
|
|
@@ -1574,6 +1679,7 @@ export {
|
|
|
1574
1679
|
onCustomizationUpdated2 as onCustomizationUpdated,
|
|
1575
1680
|
queryCustomizations4 as queryCustomizations,
|
|
1576
1681
|
removeCustomizationChoices4 as removeCustomizationChoices,
|
|
1682
|
+
reorderCustomizationChoices4 as reorderCustomizationChoices,
|
|
1577
1683
|
setCustomizationChoices4 as setCustomizationChoices,
|
|
1578
1684
|
updateCustomization4 as updateCustomization,
|
|
1579
1685
|
updateCustomizationChoices4 as updateCustomizationChoices,
|