@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/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, MessageEnvelope, MultipleColors, Page, Pages, QueryCustomizationsRequest, QueryCustomizationsResponse, RecloneSiteRequest, RecloneSiteResponse, RemoveCustomizationChoicesRequest, RequestedFields, RequestedFieldsWithLiterals, RestoreInfo, SetCustomizationChoicesRequest, SortOrder, SortOrderWithLiterals, Sorting, URI, URIs, 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, 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, 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,
|
|
@@ -40,6 +41,7 @@ __export(index_exports, {
|
|
|
40
41
|
removeCustomizationChoices: () => removeCustomizationChoices4,
|
|
41
42
|
setCustomizationChoices: () => setCustomizationChoices4,
|
|
42
43
|
updateCustomization: () => updateCustomization4,
|
|
44
|
+
updateCustomizationChoices: () => updateCustomizationChoices4,
|
|
43
45
|
utils: () => utils
|
|
44
46
|
});
|
|
45
47
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -588,6 +590,67 @@ function removeCustomizationChoices(payload) {
|
|
|
588
590
|
}
|
|
589
591
|
return __removeCustomizationChoices;
|
|
590
592
|
}
|
|
593
|
+
function updateCustomizationChoices(payload) {
|
|
594
|
+
function __updateCustomizationChoices({ host }) {
|
|
595
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
596
|
+
{
|
|
597
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
598
|
+
paths: [{ path: "choices.fieldMask" }]
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
602
|
+
paths: [{ path: "choices.choice.image.urlExpirationDate" }]
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
606
|
+
paths: [
|
|
607
|
+
{ path: "choices.choice.image.focalPoint.x" },
|
|
608
|
+
{ path: "choices.choice.image.focalPoint.y" }
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
]);
|
|
612
|
+
const metadata = {
|
|
613
|
+
entityFqdn: "wix.stores.catalog.v3.customization",
|
|
614
|
+
method: "POST",
|
|
615
|
+
methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomizationChoices",
|
|
616
|
+
packageName: PACKAGE_NAME,
|
|
617
|
+
migrationOptions: {
|
|
618
|
+
optInTransformResponse: true
|
|
619
|
+
},
|
|
620
|
+
url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
|
|
621
|
+
protoPath: "/v3/customizations/{customizationId}/update-choices",
|
|
622
|
+
data: serializedData,
|
|
623
|
+
host
|
|
624
|
+
}),
|
|
625
|
+
data: serializedData,
|
|
626
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
627
|
+
{
|
|
628
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
629
|
+
paths: [
|
|
630
|
+
{ path: "customization.createdDate" },
|
|
631
|
+
{ path: "customization.updatedDate" },
|
|
632
|
+
{
|
|
633
|
+
path: "customization.choicesSettings.choices.image.urlExpirationDate"
|
|
634
|
+
}
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
639
|
+
paths: [
|
|
640
|
+
{
|
|
641
|
+
path: "customization.choicesSettings.choices.image.focalPoint.x"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
path: "customization.choicesSettings.choices.image.focalPoint.y"
|
|
645
|
+
}
|
|
646
|
+
]
|
|
647
|
+
}
|
|
648
|
+
])
|
|
649
|
+
};
|
|
650
|
+
return metadata;
|
|
651
|
+
}
|
|
652
|
+
return __updateCustomizationChoices;
|
|
653
|
+
}
|
|
591
654
|
function bulkAddCustomizationChoices(payload) {
|
|
592
655
|
function __bulkAddCustomizationChoices({ host }) {
|
|
593
656
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -743,6 +806,14 @@ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
|
|
|
743
806
|
ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
|
|
744
807
|
return ChoiceType2;
|
|
745
808
|
})(ChoiceType || {});
|
|
809
|
+
var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
|
|
810
|
+
ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
|
|
811
|
+
ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
|
|
812
|
+
ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
|
|
813
|
+
ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
|
|
814
|
+
ChoiceSortStrategy2["MANUAL"] = "MANUAL";
|
|
815
|
+
return ChoiceSortStrategy2;
|
|
816
|
+
})(ChoiceSortStrategy || {});
|
|
746
817
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
747
818
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
748
819
|
RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
|
|
@@ -1175,6 +1246,56 @@ async function removeCustomizationChoices2(customizationId, choiceIds, options)
|
|
|
1175
1246
|
throw transformedError;
|
|
1176
1247
|
}
|
|
1177
1248
|
}
|
|
1249
|
+
async function updateCustomizationChoices2(customizationId, revision, options) {
|
|
1250
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1251
|
+
const payload = (0, import_transform_paths2.transformPaths)(
|
|
1252
|
+
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1253
|
+
customizationId,
|
|
1254
|
+
revision,
|
|
1255
|
+
choices: options?.choices,
|
|
1256
|
+
fields: options?.fields
|
|
1257
|
+
}),
|
|
1258
|
+
[
|
|
1259
|
+
{
|
|
1260
|
+
transformFn: import_image.transformSDKImageToRESTImage,
|
|
1261
|
+
paths: [{ path: "choices.choice.image" }]
|
|
1262
|
+
}
|
|
1263
|
+
]
|
|
1264
|
+
);
|
|
1265
|
+
const reqOpts = updateCustomizationChoices(
|
|
1266
|
+
payload
|
|
1267
|
+
);
|
|
1268
|
+
sideEffects?.onSiteCall?.();
|
|
1269
|
+
try {
|
|
1270
|
+
const result = await httpClient.request(reqOpts);
|
|
1271
|
+
sideEffects?.onSuccess?.(result);
|
|
1272
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1273
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1274
|
+
{
|
|
1275
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1276
|
+
paths: [{ path: "customization.choicesSettings.choices.image" }]
|
|
1277
|
+
}
|
|
1278
|
+
])
|
|
1279
|
+
);
|
|
1280
|
+
} catch (err) {
|
|
1281
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1282
|
+
err,
|
|
1283
|
+
{
|
|
1284
|
+
spreadPathsToArguments: {},
|
|
1285
|
+
explicitPathsToArguments: {
|
|
1286
|
+
customizationId: "$[0]",
|
|
1287
|
+
revision: "$[1]",
|
|
1288
|
+
choices: "$[2].choices",
|
|
1289
|
+
fields: "$[2].fields"
|
|
1290
|
+
},
|
|
1291
|
+
singleArgumentUnchanged: false
|
|
1292
|
+
},
|
|
1293
|
+
["customizationId", "revision", "options"]
|
|
1294
|
+
);
|
|
1295
|
+
sideEffects?.onError?.(err);
|
|
1296
|
+
throw transformedError;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1178
1299
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
1179
1300
|
const { httpClient, sideEffects } = arguments[2];
|
|
1180
1301
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1360,6 +1481,15 @@ function removeCustomizationChoices3(httpClient) {
|
|
|
1360
1481
|
{ httpClient }
|
|
1361
1482
|
);
|
|
1362
1483
|
}
|
|
1484
|
+
function updateCustomizationChoices3(httpClient) {
|
|
1485
|
+
return (customizationId, revision, options) => updateCustomizationChoices2(
|
|
1486
|
+
customizationId,
|
|
1487
|
+
revision,
|
|
1488
|
+
options,
|
|
1489
|
+
// @ts-ignore
|
|
1490
|
+
{ httpClient }
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1363
1493
|
function bulkAddCustomizationChoices3(httpClient) {
|
|
1364
1494
|
return (customizationsChoices, options) => bulkAddCustomizationChoices2(
|
|
1365
1495
|
customizationsChoices,
|
|
@@ -1465,6 +1595,7 @@ var bulkCreateCustomizations4 = /* @__PURE__ */ (0, import_rest_modules3.createR
|
|
|
1465
1595
|
var addCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(addCustomizationChoices3);
|
|
1466
1596
|
var setCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setCustomizationChoices3);
|
|
1467
1597
|
var removeCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeCustomizationChoices3);
|
|
1598
|
+
var updateCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateCustomizationChoices3);
|
|
1468
1599
|
var bulkAddCustomizationChoices4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkAddCustomizationChoices3);
|
|
1469
1600
|
var bulkUpdateCustomizations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateCustomizations3);
|
|
1470
1601
|
var queryCustomizations4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryCustomizations);
|
|
@@ -1479,6 +1610,7 @@ var onCustomizationUpdated2 = (0, import_event_definition_modules.createEventMod
|
|
|
1479
1610
|
);
|
|
1480
1611
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1481
1612
|
0 && (module.exports = {
|
|
1613
|
+
ChoiceSortStrategy,
|
|
1482
1614
|
ChoiceType,
|
|
1483
1615
|
CustomizationRenderType,
|
|
1484
1616
|
CustomizationType,
|
|
@@ -1499,6 +1631,7 @@ var onCustomizationUpdated2 = (0, import_event_definition_modules.createEventMod
|
|
|
1499
1631
|
removeCustomizationChoices,
|
|
1500
1632
|
setCustomizationChoices,
|
|
1501
1633
|
updateCustomization,
|
|
1634
|
+
updateCustomizationChoices,
|
|
1502
1635
|
utils
|
|
1503
1636
|
});
|
|
1504
1637
|
//# sourceMappingURL=index.js.map
|