@wix/auto_sdk_stores_customizations-v-3 1.0.67 → 1.0.69
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 +133 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +112 -1
- package/build/cjs/index.typings.js +123 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +101 -2
- package/build/cjs/meta.js +95 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +131 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +112 -1
- package/build/es/index.typings.mjs +121 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +101 -2
- package/build/es/meta.mjs +92 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +23 -3
- package/build/internal/cjs/index.js +133 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +155 -1
- package/build/internal/cjs/index.typings.js +123 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +101 -2
- package/build/internal/cjs/meta.js +95 -2
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +23 -3
- package/build/internal/es/index.mjs +131 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +155 -1
- package/build/internal/es/index.typings.mjs +121 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +101 -2
- package/build/internal/es/meta.mjs +92 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.mjs
CHANGED
|
@@ -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, [
|
|
@@ -700,6 +761,14 @@ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
|
|
|
700
761
|
ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
|
|
701
762
|
return ChoiceType2;
|
|
702
763
|
})(ChoiceType || {});
|
|
764
|
+
var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
|
|
765
|
+
ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
|
|
766
|
+
ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
|
|
767
|
+
ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
|
|
768
|
+
ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
|
|
769
|
+
ChoiceSortStrategy2["MANUAL"] = "MANUAL";
|
|
770
|
+
return ChoiceSortStrategy2;
|
|
771
|
+
})(ChoiceSortStrategy || {});
|
|
703
772
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
704
773
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
705
774
|
RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
|
|
@@ -1132,6 +1201,56 @@ async function removeCustomizationChoices2(customizationId, choiceIds, options)
|
|
|
1132
1201
|
throw transformedError;
|
|
1133
1202
|
}
|
|
1134
1203
|
}
|
|
1204
|
+
async function updateCustomizationChoices2(customizationId, revision, options) {
|
|
1205
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1206
|
+
const payload = transformPaths2(
|
|
1207
|
+
renameKeysFromSDKRequestToRESTRequest({
|
|
1208
|
+
customizationId,
|
|
1209
|
+
revision,
|
|
1210
|
+
choices: options?.choices,
|
|
1211
|
+
fields: options?.fields
|
|
1212
|
+
}),
|
|
1213
|
+
[
|
|
1214
|
+
{
|
|
1215
|
+
transformFn: transformSDKImageToRESTImage,
|
|
1216
|
+
paths: [{ path: "choices.choice.image" }]
|
|
1217
|
+
}
|
|
1218
|
+
]
|
|
1219
|
+
);
|
|
1220
|
+
const reqOpts = updateCustomizationChoices(
|
|
1221
|
+
payload
|
|
1222
|
+
);
|
|
1223
|
+
sideEffects?.onSiteCall?.();
|
|
1224
|
+
try {
|
|
1225
|
+
const result = await httpClient.request(reqOpts);
|
|
1226
|
+
sideEffects?.onSuccess?.(result);
|
|
1227
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
1228
|
+
transformPaths2(result.data, [
|
|
1229
|
+
{
|
|
1230
|
+
transformFn: transformRESTImageToSDKImage,
|
|
1231
|
+
paths: [{ path: "customization.choicesSettings.choices.image" }]
|
|
1232
|
+
}
|
|
1233
|
+
])
|
|
1234
|
+
);
|
|
1235
|
+
} catch (err) {
|
|
1236
|
+
const transformedError = sdkTransformError(
|
|
1237
|
+
err,
|
|
1238
|
+
{
|
|
1239
|
+
spreadPathsToArguments: {},
|
|
1240
|
+
explicitPathsToArguments: {
|
|
1241
|
+
customizationId: "$[0]",
|
|
1242
|
+
revision: "$[1]",
|
|
1243
|
+
choices: "$[2].choices",
|
|
1244
|
+
fields: "$[2].fields"
|
|
1245
|
+
},
|
|
1246
|
+
singleArgumentUnchanged: false
|
|
1247
|
+
},
|
|
1248
|
+
["customizationId", "revision", "options"]
|
|
1249
|
+
);
|
|
1250
|
+
sideEffects?.onError?.(err);
|
|
1251
|
+
throw transformedError;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1135
1254
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
1136
1255
|
const { httpClient, sideEffects } = arguments[2];
|
|
1137
1256
|
const payload = transformPaths2(
|
|
@@ -1317,6 +1436,15 @@ function removeCustomizationChoices3(httpClient) {
|
|
|
1317
1436
|
{ httpClient }
|
|
1318
1437
|
);
|
|
1319
1438
|
}
|
|
1439
|
+
function updateCustomizationChoices3(httpClient) {
|
|
1440
|
+
return (customizationId, revision, options) => updateCustomizationChoices2(
|
|
1441
|
+
customizationId,
|
|
1442
|
+
revision,
|
|
1443
|
+
options,
|
|
1444
|
+
// @ts-ignore
|
|
1445
|
+
{ httpClient }
|
|
1446
|
+
);
|
|
1447
|
+
}
|
|
1320
1448
|
function bulkAddCustomizationChoices3(httpClient) {
|
|
1321
1449
|
return (customizationsChoices, options) => bulkAddCustomizationChoices2(
|
|
1322
1450
|
customizationsChoices,
|
|
@@ -1422,6 +1550,7 @@ var bulkCreateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkCreateCusto
|
|
|
1422
1550
|
var addCustomizationChoices4 = /* @__PURE__ */ createRESTModule(addCustomizationChoices3);
|
|
1423
1551
|
var setCustomizationChoices4 = /* @__PURE__ */ createRESTModule(setCustomizationChoices3);
|
|
1424
1552
|
var removeCustomizationChoices4 = /* @__PURE__ */ createRESTModule(removeCustomizationChoices3);
|
|
1553
|
+
var updateCustomizationChoices4 = /* @__PURE__ */ createRESTModule(updateCustomizationChoices3);
|
|
1425
1554
|
var bulkAddCustomizationChoices4 = /* @__PURE__ */ createRESTModule(bulkAddCustomizationChoices3);
|
|
1426
1555
|
var bulkUpdateCustomizations4 = /* @__PURE__ */ createRESTModule(bulkUpdateCustomizations3);
|
|
1427
1556
|
var queryCustomizations4 = /* @__PURE__ */ createRESTModule(customQueryCustomizations);
|
|
@@ -1435,6 +1564,7 @@ var onCustomizationUpdated2 = createEventModule(
|
|
|
1435
1564
|
onCustomizationUpdated
|
|
1436
1565
|
);
|
|
1437
1566
|
export {
|
|
1567
|
+
ChoiceSortStrategy,
|
|
1438
1568
|
ChoiceType,
|
|
1439
1569
|
CustomizationRenderType,
|
|
1440
1570
|
CustomizationType,
|
|
@@ -1455,6 +1585,7 @@ export {
|
|
|
1455
1585
|
removeCustomizationChoices4 as removeCustomizationChoices,
|
|
1456
1586
|
setCustomizationChoices4 as setCustomizationChoices,
|
|
1457
1587
|
updateCustomization4 as updateCustomization,
|
|
1588
|
+
updateCustomizationChoices4 as updateCustomizationChoices,
|
|
1458
1589
|
utils
|
|
1459
1590
|
};
|
|
1460
1591
|
//# sourceMappingURL=index.mjs.map
|