@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/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { Customization, CreateCustomizationApplicationErrors, CreateCustomizationValidationErrors, GetCustomizationOptions, UpdateCustomization, UpdateCustomizationOptions, DeleteCustomizationValidationErrors, BulkCreateCustomizationsOptions, BulkCreateCustomizationsResponse, BulkCreateCustomizationsApplicationErrors, BulkCreateCustomizationsValidationErrors, Choice, AddCustomizationChoicesOptions, AddCustomizationChoicesResponse, AddCustomizationChoicesApplicationErrors, AddCustomizationChoicesValidationErrors, SetCustomizationChoicesOptions, SetCustomizationChoicesResponse, SetCustomizationChoicesApplicationErrors, SetCustomizationChoicesValidationErrors, RemoveCustomizationChoicesOptions, RemoveCustomizationChoicesResponse, RemoveCustomizationChoicesApplicationErrors, RemoveCustomizationChoicesValidationErrors, CustomizationChoices, BulkAddCustomizationChoicesOptions, BulkAddCustomizationChoicesResponse, BulkAddCustomizationChoicesApplicationErrors, BulkAddCustomizationChoicesValidationErrors, MaskedCustomization, BulkUpdateCustomizationsOptions, BulkUpdateCustomizationsResponse, CustomizationCreatedEnvelope, CustomizationDeletedEnvelope, CustomizationUpdatedEnvelope, CustomizationQuery, QueryCustomizationsOptions, typedQueryCustomizations, CustomizationsQueryBuilder } from './index.typings.js';
|
|
3
|
-
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddCustomizationChoicesRequest, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkAddCustomizationChoicesRequest, BulkCreateCustomizationsForMigrationRequest, BulkCreateCustomizationsForMigrationResponse, BulkCreateCustomizationsRequest, BulkCustomizationResult, BulkUpdateCustomizationsRequest, ChoiceType, ChoiceTypeWithLiterals, ChoiceValueOneOf, ChoicesSettings, CommonQueryWithEntityContext, CreateCustomizationRequest, CreateCustomizationResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, CustomizationCustomizationSettingsOneOf, CustomizationIdsWrapper, CustomizationQuerySpec, CustomizationRenderType, CustomizationRenderTypeWithLiterals, CustomizationType, CustomizationTypeWithLiterals, CustomizationsQueryResult, DeleteCustomizationRequest, DeleteCustomizationResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, File, FocalPoint, FreeTextSettings, GetCustomizationRequest, GetCustomizationResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, MaskedChoice, MessageEnvelope, MultipleColors, Page, Pages, QueryCustomizationsRequest, QueryCustomizationsResponse, RecloneSiteRequest, RecloneSiteResponse, RemoveCustomizationChoicesRequest, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SetCustomizationChoicesRequest, SortOrder, SortOrderWithLiterals, Sorting, URI, URIs, UpdateCustomizationChoicesApplicationErrors, UpdateCustomizationChoicesOptions, UpdateCustomizationChoicesRequest, UpdateCustomizationChoicesResponse, UpdateCustomizationChoicesValidationErrors, UpdateCustomizationRequest, UpdateCustomizationResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddCustomizationChoicesRequest, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkAddCustomizationChoicesRequest, BulkCreateCustomizationsForMigrationRequest, BulkCreateCustomizationsForMigrationResponse, BulkCreateCustomizationsRequest, BulkCustomizationResult, BulkUpdateCustomizationsRequest, ChoiceIdsMismatchData, ChoiceSortStrategy, ChoiceSortStrategyWithLiterals, ChoiceType, ChoiceTypeWithLiterals, ChoiceValueOneOf, ChoicesSettings, CommonQueryWithEntityContext, CreateCustomizationRequest, CreateCustomizationResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, CustomizationCustomizationSettingsOneOf, CustomizationIdsWrapper, CustomizationQuerySpec, CustomizationRenderType, CustomizationRenderTypeWithLiterals, CustomizationType, CustomizationTypeWithLiterals, CustomizationsQueryResult, DeleteCustomizationRequest, DeleteCustomizationResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, File, FocalPoint, FreeTextSettings, GetCustomizationRequest, GetCustomizationResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, MaskedChoice, MessageEnvelope, MultipleColors, Page, Pages, QueryCustomizationsRequest, QueryCustomizationsResponse, RecloneSiteRequest, RecloneSiteResponse, RemoveCustomizationChoicesRequest, ReorderCustomizationChoicesApplicationErrors, ReorderCustomizationChoicesOptions, ReorderCustomizationChoicesRequest, ReorderCustomizationChoicesResponse, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SetCustomizationChoicesRequest, SortOrder, SortOrderWithLiterals, Sorting, URI, URIs, UpdateCustomizationChoicesApplicationErrors, UpdateCustomizationChoicesOptions, UpdateCustomizationChoicesRequest, UpdateCustomizationChoicesResponse, UpdateCustomizationChoicesValidationErrors, UpdateCustomizationRequest, UpdateCustomizationResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createCustomization$1(httpClient: HttpClient): CreateCustomizationSignature;
|
|
6
6
|
interface CreateCustomizationSignature {
|
package/build/cjs/index.js
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
ChoiceSortStrategy: () => ChoiceSortStrategy,
|
|
23
24
|
ChoiceType: () => ChoiceType,
|
|
24
25
|
CustomizationRenderType: () => CustomizationRenderType,
|
|
25
26
|
CustomizationType: () => CustomizationType,
|
|
@@ -38,6 +39,7 @@ __export(index_exports, {
|
|
|
38
39
|
onCustomizationUpdated: () => onCustomizationUpdated2,
|
|
39
40
|
queryCustomizations: () => queryCustomizations4,
|
|
40
41
|
removeCustomizationChoices: () => removeCustomizationChoices4,
|
|
42
|
+
reorderCustomizationChoices: () => reorderCustomizationChoices4,
|
|
41
43
|
setCustomizationChoices: () => setCustomizationChoices4,
|
|
42
44
|
updateCustomization: () => updateCustomization4,
|
|
43
45
|
updateCustomizationChoices: () => updateCustomizationChoices4,
|
|
@@ -650,6 +652,50 @@ function updateCustomizationChoices(payload) {
|
|
|
650
652
|
}
|
|
651
653
|
return __updateCustomizationChoices;
|
|
652
654
|
}
|
|
655
|
+
function reorderCustomizationChoices(payload) {
|
|
656
|
+
function __reorderCustomizationChoices({ host }) {
|
|
657
|
+
const metadata = {
|
|
658
|
+
entityFqdn: "wix.stores.catalog.v3.customization",
|
|
659
|
+
method: "POST",
|
|
660
|
+
methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.ReorderCustomizationChoices",
|
|
661
|
+
packageName: PACKAGE_NAME,
|
|
662
|
+
migrationOptions: {
|
|
663
|
+
optInTransformResponse: true
|
|
664
|
+
},
|
|
665
|
+
url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
|
|
666
|
+
protoPath: "/v3/customizations/{customizationId}/reorder-choices",
|
|
667
|
+
data: payload,
|
|
668
|
+
host
|
|
669
|
+
}),
|
|
670
|
+
data: payload,
|
|
671
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
672
|
+
{
|
|
673
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
674
|
+
paths: [
|
|
675
|
+
{ path: "customization.createdDate" },
|
|
676
|
+
{ path: "customization.updatedDate" },
|
|
677
|
+
{
|
|
678
|
+
path: "customization.choicesSettings.choices.image.urlExpirationDate"
|
|
679
|
+
}
|
|
680
|
+
]
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
684
|
+
paths: [
|
|
685
|
+
{
|
|
686
|
+
path: "customization.choicesSettings.choices.image.focalPoint.x"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
path: "customization.choicesSettings.choices.image.focalPoint.y"
|
|
690
|
+
}
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
])
|
|
694
|
+
};
|
|
695
|
+
return metadata;
|
|
696
|
+
}
|
|
697
|
+
return __reorderCustomizationChoices;
|
|
698
|
+
}
|
|
653
699
|
function bulkAddCustomizationChoices(payload) {
|
|
654
700
|
function __bulkAddCustomizationChoices({ host }) {
|
|
655
701
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -805,6 +851,14 @@ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
|
|
|
805
851
|
ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
|
|
806
852
|
return ChoiceType2;
|
|
807
853
|
})(ChoiceType || {});
|
|
854
|
+
var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
|
|
855
|
+
ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
|
|
856
|
+
ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
|
|
857
|
+
ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
|
|
858
|
+
ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
|
|
859
|
+
ChoiceSortStrategy2["MANUAL"] = "MANUAL";
|
|
860
|
+
return ChoiceSortStrategy2;
|
|
861
|
+
})(ChoiceSortStrategy || {});
|
|
808
862
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
809
863
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
810
864
|
RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
|
|
@@ -1287,6 +1341,48 @@ async function updateCustomizationChoices2(customizationId, revision, options) {
|
|
|
1287
1341
|
throw transformedError;
|
|
1288
1342
|
}
|
|
1289
1343
|
}
|
|
1344
|
+
async function reorderCustomizationChoices2(customizationId, revision, options) {
|
|
1345
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1346
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1347
|
+
customizationId,
|
|
1348
|
+
revision,
|
|
1349
|
+
choiceIds: options?.choiceIds,
|
|
1350
|
+
fields: options?.fields
|
|
1351
|
+
});
|
|
1352
|
+
const reqOpts = reorderCustomizationChoices(
|
|
1353
|
+
payload
|
|
1354
|
+
);
|
|
1355
|
+
sideEffects?.onSiteCall?.();
|
|
1356
|
+
try {
|
|
1357
|
+
const result = await httpClient.request(reqOpts);
|
|
1358
|
+
sideEffects?.onSuccess?.(result);
|
|
1359
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1360
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1361
|
+
{
|
|
1362
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1363
|
+
paths: [{ path: "customization.choicesSettings.choices.image" }]
|
|
1364
|
+
}
|
|
1365
|
+
])
|
|
1366
|
+
);
|
|
1367
|
+
} catch (err) {
|
|
1368
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1369
|
+
err,
|
|
1370
|
+
{
|
|
1371
|
+
spreadPathsToArguments: {},
|
|
1372
|
+
explicitPathsToArguments: {
|
|
1373
|
+
customizationId: "$[0]",
|
|
1374
|
+
revision: "$[1]",
|
|
1375
|
+
choiceIds: "$[2].choiceIds",
|
|
1376
|
+
fields: "$[2].fields"
|
|
1377
|
+
},
|
|
1378
|
+
singleArgumentUnchanged: false
|
|
1379
|
+
},
|
|
1380
|
+
["customizationId", "revision", "options"]
|
|
1381
|
+
);
|
|
1382
|
+
sideEffects?.onError?.(err);
|
|
1383
|
+
throw transformedError;
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1290
1386
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
1291
1387
|
const { httpClient, sideEffects } = arguments[2];
|
|
1292
1388
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1481,6 +1577,15 @@ function updateCustomizationChoices3(httpClient) {
|
|
|
1481
1577
|
{ httpClient }
|
|
1482
1578
|
);
|
|
1483
1579
|
}
|
|
1580
|
+
function reorderCustomizationChoices3(httpClient) {
|
|
1581
|
+
return (customizationId, revision, options) => reorderCustomizationChoices2(
|
|
1582
|
+
customizationId,
|
|
1583
|
+
revision,
|
|
1584
|
+
options,
|
|
1585
|
+
// @ts-ignore
|
|
1586
|
+
{ httpClient }
|
|
1587
|
+
);
|
|
1588
|
+
}
|
|
1484
1589
|
function bulkAddCustomizationChoices3(httpClient) {
|
|
1485
1590
|
return (customizationsChoices, options) => bulkAddCustomizationChoices2(
|
|
1486
1591
|
customizationsChoices,
|
|
@@ -1587,6 +1692,7 @@ var addCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRE
|
|
|
1587
1692
|
var setCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setCustomizationChoices3);
|
|
1588
1693
|
var removeCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeCustomizationChoices3);
|
|
1589
1694
|
var updateCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateCustomizationChoices3);
|
|
1695
|
+
var reorderCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(reorderCustomizationChoices3);
|
|
1590
1696
|
var bulkAddCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkAddCustomizationChoices3);
|
|
1591
1697
|
var bulkUpdateCustomizations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateCustomizations3);
|
|
1592
1698
|
var queryCustomizations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryCustomizations);
|
|
@@ -1601,6 +1707,7 @@ var onCustomizationUpdated2 = (0, import_event_definition_modules.createEventMod
|
|
|
1601
1707
|
);
|
|
1602
1708
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1603
1709
|
0 && (module.exports = {
|
|
1710
|
+
ChoiceSortStrategy,
|
|
1604
1711
|
ChoiceType,
|
|
1605
1712
|
CustomizationRenderType,
|
|
1606
1713
|
CustomizationType,
|
|
@@ -1619,6 +1726,7 @@ var onCustomizationUpdated2 = (0, import_event_definition_modules.createEventMod
|
|
|
1619
1726
|
onCustomizationUpdated,
|
|
1620
1727
|
queryCustomizations,
|
|
1621
1728
|
removeCustomizationChoices,
|
|
1729
|
+
reorderCustomizationChoices,
|
|
1622
1730
|
setCustomizationChoices,
|
|
1623
1731
|
updateCustomization,
|
|
1624
1732
|
updateCustomizationChoices,
|