@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
|
@@ -142,6 +142,7 @@ interface FreeTextSettings {
|
|
|
142
142
|
*/
|
|
143
143
|
key?: string | null;
|
|
144
144
|
}
|
|
145
|
+
/** Settings for choice-based customizations. */
|
|
145
146
|
interface ChoicesSettings {
|
|
146
147
|
/**
|
|
147
148
|
* List of choices.
|
|
@@ -234,6 +235,19 @@ interface FocalPoint {
|
|
|
234
235
|
/** crop by width */
|
|
235
236
|
width?: number | null;
|
|
236
237
|
}
|
|
238
|
+
declare enum ChoiceSortStrategy {
|
|
239
|
+
UNKNOWN_CHOICE_SORT_STRATEGY = "UNKNOWN_CHOICE_SORT_STRATEGY",
|
|
240
|
+
/** Text choices are sorted by name, and swatch choices are sorted by the number of matching products. */
|
|
241
|
+
DEFAULT = "DEFAULT",
|
|
242
|
+
/** Sort choices alphabetically by name, case-insensitive, with numeric values first. */
|
|
243
|
+
BY_NAME = "BY_NAME",
|
|
244
|
+
/** Sort choices by the number of products assigned to each choice, in descending order. */
|
|
245
|
+
BY_PRODUCT_COUNT = "BY_PRODUCT_COUNT",
|
|
246
|
+
/** Sort choices by their order in the choices list. */
|
|
247
|
+
MANUAL = "MANUAL"
|
|
248
|
+
}
|
|
249
|
+
/** @enumType */
|
|
250
|
+
type ChoiceSortStrategyWithLiterals = ChoiceSortStrategy | 'UNKNOWN_CHOICE_SORT_STRATEGY' | 'DEFAULT' | 'BY_NAME' | 'BY_PRODUCT_COUNT' | 'MANUAL';
|
|
237
251
|
interface InvalidateCache extends InvalidateCacheGetByOneOf {
|
|
238
252
|
/**
|
|
239
253
|
* Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!
|
|
@@ -732,6 +746,40 @@ interface RemoveCustomizationChoicesResponse {
|
|
|
732
746
|
/** Updated customization. */
|
|
733
747
|
customization?: Customization;
|
|
734
748
|
}
|
|
749
|
+
interface UpdateCustomizationChoicesRequest {
|
|
750
|
+
/**
|
|
751
|
+
* Customization ID.
|
|
752
|
+
* @format GUID
|
|
753
|
+
*/
|
|
754
|
+
customizationId: string;
|
|
755
|
+
/**
|
|
756
|
+
* Revision number, which increments by 1 each time the customization is updated.
|
|
757
|
+
* To prevent conflicting changes,
|
|
758
|
+
* the current revision must be passed when updating the customization.
|
|
759
|
+
*/
|
|
760
|
+
revision: string;
|
|
761
|
+
/**
|
|
762
|
+
* Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization.
|
|
763
|
+
* @minSize 1
|
|
764
|
+
* @maxSize 100
|
|
765
|
+
*/
|
|
766
|
+
choices: MaskedChoice[];
|
|
767
|
+
/**
|
|
768
|
+
* Fields to include in the response.
|
|
769
|
+
*
|
|
770
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
771
|
+
* @maxSize 100
|
|
772
|
+
*/
|
|
773
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
774
|
+
}
|
|
775
|
+
interface MaskedChoice {
|
|
776
|
+
/** Choice to update. */
|
|
777
|
+
choice?: Choice;
|
|
778
|
+
}
|
|
779
|
+
interface UpdateCustomizationChoicesResponse {
|
|
780
|
+
/** Updated customization. */
|
|
781
|
+
customization?: Customization;
|
|
782
|
+
}
|
|
735
783
|
interface BulkAddCustomizationChoicesRequest {
|
|
736
784
|
/**
|
|
737
785
|
* List of customization IDs and choices.
|
|
@@ -1002,6 +1050,12 @@ type CreateCustomizationValidationErrors = {
|
|
|
1002
1050
|
ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY';
|
|
1003
1051
|
} | {
|
|
1004
1052
|
ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST';
|
|
1053
|
+
} | {
|
|
1054
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1055
|
+
} | {
|
|
1056
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1057
|
+
} | {
|
|
1058
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1005
1059
|
};
|
|
1006
1060
|
/** @docsIgnore */
|
|
1007
1061
|
type DeleteCustomizationValidationErrors = {
|
|
@@ -1040,6 +1094,12 @@ type BulkCreateCustomizationsValidationErrors = {
|
|
|
1040
1094
|
ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY';
|
|
1041
1095
|
} | {
|
|
1042
1096
|
ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST';
|
|
1097
|
+
} | {
|
|
1098
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1099
|
+
} | {
|
|
1100
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1101
|
+
} | {
|
|
1102
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1043
1103
|
};
|
|
1044
1104
|
/** @docsIgnore */
|
|
1045
1105
|
type AddCustomizationChoicesApplicationErrors = {
|
|
@@ -1058,6 +1118,12 @@ type AddCustomizationChoicesValidationErrors = {
|
|
|
1058
1118
|
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
1059
1119
|
} | {
|
|
1060
1120
|
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
1121
|
+
} | {
|
|
1122
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1123
|
+
} | {
|
|
1124
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1125
|
+
} | {
|
|
1126
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1061
1127
|
};
|
|
1062
1128
|
/** @docsIgnore */
|
|
1063
1129
|
type SetCustomizationChoicesApplicationErrors = {
|
|
@@ -1078,6 +1144,12 @@ type SetCustomizationChoicesValidationErrors = {
|
|
|
1078
1144
|
ruleName?: 'NOT_ALLOWED_DELETE_CHOICE_ASSIGNED_TO_PRODUCT';
|
|
1079
1145
|
} | {
|
|
1080
1146
|
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
1147
|
+
} | {
|
|
1148
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1149
|
+
} | {
|
|
1150
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1151
|
+
} | {
|
|
1152
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1081
1153
|
};
|
|
1082
1154
|
/** @docsIgnore */
|
|
1083
1155
|
type RemoveCustomizationChoicesApplicationErrors = {
|
|
@@ -1088,6 +1160,24 @@ type RemoveCustomizationChoicesApplicationErrors = {
|
|
|
1088
1160
|
/** @docsIgnore */
|
|
1089
1161
|
type RemoveCustomizationChoicesValidationErrors = {
|
|
1090
1162
|
ruleName?: 'NOT_ALLOWED_CUSTOMIZATION_WITHOUT_CHOICES';
|
|
1163
|
+
} | {
|
|
1164
|
+
ruleName?: 'PARENT_CHOICE_DELETE_REFERENCED';
|
|
1165
|
+
};
|
|
1166
|
+
/** @docsIgnore */
|
|
1167
|
+
type UpdateCustomizationChoicesApplicationErrors = {
|
|
1168
|
+
code?: 'CHOICE_NOT_FOUND';
|
|
1169
|
+
description?: string;
|
|
1170
|
+
data?: Record<string, any>;
|
|
1171
|
+
};
|
|
1172
|
+
/** @docsIgnore */
|
|
1173
|
+
type UpdateCustomizationChoicesValidationErrors = {
|
|
1174
|
+
ruleName?: 'UNSUPPORTED_CHOICE_FIELD';
|
|
1175
|
+
} | {
|
|
1176
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1177
|
+
} | {
|
|
1178
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1179
|
+
} | {
|
|
1180
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1091
1181
|
};
|
|
1092
1182
|
/** @docsIgnore */
|
|
1093
1183
|
type BulkAddCustomizationChoicesApplicationErrors = {
|
|
@@ -1104,6 +1194,12 @@ type BulkAddCustomizationChoicesValidationErrors = {
|
|
|
1104
1194
|
ruleName?: 'INVALID_CHOICE_TYPE';
|
|
1105
1195
|
} | {
|
|
1106
1196
|
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
1197
|
+
} | {
|
|
1198
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1199
|
+
} | {
|
|
1200
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1201
|
+
} | {
|
|
1202
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1107
1203
|
};
|
|
1108
1204
|
interface BaseEventMetadata {
|
|
1109
1205
|
/**
|
|
@@ -1693,6 +1789,21 @@ interface RemoveCustomizationChoicesOptions {
|
|
|
1693
1789
|
*/
|
|
1694
1790
|
fields?: RequestedFieldsWithLiterals[];
|
|
1695
1791
|
}
|
|
1792
|
+
interface UpdateCustomizationChoicesOptions {
|
|
1793
|
+
/**
|
|
1794
|
+
* Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization.
|
|
1795
|
+
* @minSize 1
|
|
1796
|
+
* @maxSize 100
|
|
1797
|
+
*/
|
|
1798
|
+
choices: MaskedChoice[];
|
|
1799
|
+
/**
|
|
1800
|
+
* Fields to include in the response.
|
|
1801
|
+
*
|
|
1802
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
1803
|
+
* @maxSize 100
|
|
1804
|
+
*/
|
|
1805
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1806
|
+
}
|
|
1696
1807
|
/**
|
|
1697
1808
|
* Adds choices to multiple customizations.
|
|
1698
1809
|
* @param customizationsChoices - List of customization IDs and choices.
|
|
@@ -1756,4 +1867,4 @@ interface BulkUpdateCustomizationsOptions {
|
|
|
1756
1867
|
fields?: RequestedFieldsWithLiterals[];
|
|
1757
1868
|
}
|
|
1758
1869
|
|
|
1759
|
-
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddCustomizationChoicesApplicationErrors, type AddCustomizationChoicesOptions, type AddCustomizationChoicesRequest, type AddCustomizationChoicesResponse, type AddCustomizationChoicesValidationErrors, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkAddCustomizationChoicesApplicationErrors, type BulkAddCustomizationChoicesOptions, type BulkAddCustomizationChoicesRequest, type BulkAddCustomizationChoicesResponse, type BulkAddCustomizationChoicesValidationErrors, type BulkCreateCustomizationsApplicationErrors, type BulkCreateCustomizationsForMigrationRequest, type BulkCreateCustomizationsForMigrationResponse, type BulkCreateCustomizationsOptions, type BulkCreateCustomizationsRequest, type BulkCreateCustomizationsResponse, type BulkCreateCustomizationsValidationErrors, type BulkCustomizationResult, type BulkUpdateCustomizationsOptions, type BulkUpdateCustomizationsRequest, type BulkUpdateCustomizationsResponse, type Choice, ChoiceType, type ChoiceTypeWithLiterals, type ChoiceValueOneOf, type ChoicesSettings, type CommonQueryWithEntityContext, type CreateCustomizationApplicationErrors, type CreateCustomizationRequest, type CreateCustomizationResponse, type CreateCustomizationValidationErrors, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type Customization, type CustomizationChoices, type CustomizationCreatedEnvelope, type CustomizationCustomizationSettingsOneOf, type CustomizationDeletedEnvelope, type CustomizationIdsWrapper, type CustomizationQuery, type CustomizationQuerySpec, CustomizationRenderType, type CustomizationRenderTypeWithLiterals, CustomizationType, type CustomizationTypeWithLiterals, type CustomizationUpdatedEnvelope, type CustomizationsQueryBuilder, type CustomizationsQueryResult, type DeleteCustomizationRequest, type DeleteCustomizationResponse, type DeleteCustomizationValidationErrors, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type FocalPoint, type FreeTextSettings, type GetCustomizationOptions, type GetCustomizationRequest, type GetCustomizationResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type MaskedCustomization, type MessageEnvelope, type MultipleColors, type Page, type Pages, type QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, type RecloneSiteRequest, type RecloneSiteResponse, type RemoveCustomizationChoicesApplicationErrors, type RemoveCustomizationChoicesOptions, type RemoveCustomizationChoicesRequest, type RemoveCustomizationChoicesResponse, type RemoveCustomizationChoicesValidationErrors, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type SetCustomizationChoicesApplicationErrors, type SetCustomizationChoicesOptions, type SetCustomizationChoicesRequest, type SetCustomizationChoicesResponse, type SetCustomizationChoicesValidationErrors, SortOrder, type SortOrderWithLiterals, type Sorting, type URI, type URIs, type UpdateCustomization, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, typedQueryCustomizations, updateCustomization, utils };
|
|
1870
|
+
export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type AddCustomizationChoicesApplicationErrors, type AddCustomizationChoicesOptions, type AddCustomizationChoicesRequest, type AddCustomizationChoicesResponse, type AddCustomizationChoicesValidationErrors, type App, type ApplicationError, type BaseEventMetadata, type BulkActionMetadata, type BulkAddCustomizationChoicesApplicationErrors, type BulkAddCustomizationChoicesOptions, type BulkAddCustomizationChoicesRequest, type BulkAddCustomizationChoicesResponse, type BulkAddCustomizationChoicesValidationErrors, type BulkCreateCustomizationsApplicationErrors, type BulkCreateCustomizationsForMigrationRequest, type BulkCreateCustomizationsForMigrationResponse, type BulkCreateCustomizationsOptions, type BulkCreateCustomizationsRequest, type BulkCreateCustomizationsResponse, type BulkCreateCustomizationsValidationErrors, type BulkCustomizationResult, type BulkUpdateCustomizationsOptions, type BulkUpdateCustomizationsRequest, type BulkUpdateCustomizationsResponse, type Choice, ChoiceSortStrategy, type ChoiceSortStrategyWithLiterals, ChoiceType, type ChoiceTypeWithLiterals, type ChoiceValueOneOf, type ChoicesSettings, type CommonQueryWithEntityContext, type CreateCustomizationApplicationErrors, type CreateCustomizationRequest, type CreateCustomizationResponse, type CreateCustomizationValidationErrors, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomTag, type Customization, type CustomizationChoices, type CustomizationCreatedEnvelope, type CustomizationCustomizationSettingsOneOf, type CustomizationDeletedEnvelope, type CustomizationIdsWrapper, type CustomizationQuery, type CustomizationQuerySpec, CustomizationRenderType, type CustomizationRenderTypeWithLiterals, CustomizationType, type CustomizationTypeWithLiterals, type CustomizationUpdatedEnvelope, type CustomizationsQueryBuilder, type CustomizationsQueryResult, type DeleteCustomizationRequest, type DeleteCustomizationResponse, type DeleteCustomizationValidationErrors, type DomainEvent, type DomainEventBodyOneOf, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type File, type FocalPoint, type FreeTextSettings, type GetCustomizationOptions, type GetCustomizationRequest, type GetCustomizationResponse, type IdentificationData, type IdentificationDataIdOneOf, type InvalidateCache, type InvalidateCacheGetByOneOf, type ItemMetadata, type MaskedChoice, type MaskedCustomization, type MessageEnvelope, type MultipleColors, type Page, type Pages, type QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, type RecloneSiteRequest, type RecloneSiteResponse, type RemoveCustomizationChoicesApplicationErrors, type RemoveCustomizationChoicesOptions, type RemoveCustomizationChoicesRequest, type RemoveCustomizationChoicesResponse, type RemoveCustomizationChoicesValidationErrors, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, type SetCustomizationChoicesApplicationErrors, type SetCustomizationChoicesOptions, type SetCustomizationChoicesRequest, type SetCustomizationChoicesResponse, type SetCustomizationChoicesValidationErrors, SortOrder, type SortOrderWithLiterals, type Sorting, type URI, type URIs, type UpdateCustomization, type UpdateCustomizationChoicesApplicationErrors, type UpdateCustomizationChoicesOptions, type UpdateCustomizationChoicesRequest, type UpdateCustomizationChoicesResponse, type UpdateCustomizationChoicesValidationErrors, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, typedQueryCustomizations, updateCustomization, utils };
|
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// index.typings.ts
|
|
21
21
|
var index_typings_exports = {};
|
|
22
22
|
__export(index_typings_exports, {
|
|
23
|
+
ChoiceSortStrategy: () => ChoiceSortStrategy,
|
|
23
24
|
ChoiceType: () => ChoiceType,
|
|
24
25
|
CustomizationRenderType: () => CustomizationRenderType,
|
|
25
26
|
CustomizationType: () => CustomizationType,
|
|
@@ -38,6 +39,7 @@ __export(index_typings_exports, {
|
|
|
38
39
|
setCustomizationChoices: () => setCustomizationChoices2,
|
|
39
40
|
typedQueryCustomizations: () => typedQueryCustomizations,
|
|
40
41
|
updateCustomization: () => updateCustomization2,
|
|
42
|
+
updateCustomizationChoices: () => updateCustomizationChoices2,
|
|
41
43
|
utils: () => utils
|
|
42
44
|
});
|
|
43
45
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -579,6 +581,67 @@ function removeCustomizationChoices(payload) {
|
|
|
579
581
|
}
|
|
580
582
|
return __removeCustomizationChoices;
|
|
581
583
|
}
|
|
584
|
+
function updateCustomizationChoices(payload) {
|
|
585
|
+
function __updateCustomizationChoices({ host }) {
|
|
586
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
587
|
+
{
|
|
588
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
589
|
+
paths: [{ path: "choices.fieldMask" }]
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
593
|
+
paths: [{ path: "choices.choice.image.urlExpirationDate" }]
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
597
|
+
paths: [
|
|
598
|
+
{ path: "choices.choice.image.focalPoint.x" },
|
|
599
|
+
{ path: "choices.choice.image.focalPoint.y" }
|
|
600
|
+
]
|
|
601
|
+
}
|
|
602
|
+
]);
|
|
603
|
+
const metadata = {
|
|
604
|
+
entityFqdn: "wix.stores.catalog.v3.customization",
|
|
605
|
+
method: "POST",
|
|
606
|
+
methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomizationChoices",
|
|
607
|
+
packageName: PACKAGE_NAME,
|
|
608
|
+
migrationOptions: {
|
|
609
|
+
optInTransformResponse: true
|
|
610
|
+
},
|
|
611
|
+
url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
|
|
612
|
+
protoPath: "/v3/customizations/{customizationId}/update-choices",
|
|
613
|
+
data: serializedData,
|
|
614
|
+
host
|
|
615
|
+
}),
|
|
616
|
+
data: serializedData,
|
|
617
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
618
|
+
{
|
|
619
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
620
|
+
paths: [
|
|
621
|
+
{ path: "customization.createdDate" },
|
|
622
|
+
{ path: "customization.updatedDate" },
|
|
623
|
+
{
|
|
624
|
+
path: "customization.choicesSettings.choices.image.urlExpirationDate"
|
|
625
|
+
}
|
|
626
|
+
]
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
630
|
+
paths: [
|
|
631
|
+
{
|
|
632
|
+
path: "customization.choicesSettings.choices.image.focalPoint.x"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
path: "customization.choicesSettings.choices.image.focalPoint.y"
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
}
|
|
639
|
+
])
|
|
640
|
+
};
|
|
641
|
+
return metadata;
|
|
642
|
+
}
|
|
643
|
+
return __updateCustomizationChoices;
|
|
644
|
+
}
|
|
582
645
|
function bulkAddCustomizationChoices(payload) {
|
|
583
646
|
function __bulkAddCustomizationChoices({ host }) {
|
|
584
647
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -734,6 +797,14 @@ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
|
|
|
734
797
|
ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
|
|
735
798
|
return ChoiceType2;
|
|
736
799
|
})(ChoiceType || {});
|
|
800
|
+
var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
|
|
801
|
+
ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
|
|
802
|
+
ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
|
|
803
|
+
ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
|
|
804
|
+
ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
|
|
805
|
+
ChoiceSortStrategy2["MANUAL"] = "MANUAL";
|
|
806
|
+
return ChoiceSortStrategy2;
|
|
807
|
+
})(ChoiceSortStrategy || {});
|
|
737
808
|
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
738
809
|
RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
|
|
739
810
|
RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
|
|
@@ -1166,6 +1237,56 @@ async function removeCustomizationChoices2(customizationId, choiceIds, options)
|
|
|
1166
1237
|
throw transformedError;
|
|
1167
1238
|
}
|
|
1168
1239
|
}
|
|
1240
|
+
async function updateCustomizationChoices2(customizationId, revision, options) {
|
|
1241
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1242
|
+
const payload = (0, import_transform_paths2.transformPaths)(
|
|
1243
|
+
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1244
|
+
customizationId,
|
|
1245
|
+
revision,
|
|
1246
|
+
choices: options?.choices,
|
|
1247
|
+
fields: options?.fields
|
|
1248
|
+
}),
|
|
1249
|
+
[
|
|
1250
|
+
{
|
|
1251
|
+
transformFn: import_image.transformSDKImageToRESTImage,
|
|
1252
|
+
paths: [{ path: "choices.choice.image" }]
|
|
1253
|
+
}
|
|
1254
|
+
]
|
|
1255
|
+
);
|
|
1256
|
+
const reqOpts = updateCustomizationChoices(
|
|
1257
|
+
payload
|
|
1258
|
+
);
|
|
1259
|
+
sideEffects?.onSiteCall?.();
|
|
1260
|
+
try {
|
|
1261
|
+
const result = await httpClient.request(reqOpts);
|
|
1262
|
+
sideEffects?.onSuccess?.(result);
|
|
1263
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1264
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1265
|
+
{
|
|
1266
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1267
|
+
paths: [{ path: "customization.choicesSettings.choices.image" }]
|
|
1268
|
+
}
|
|
1269
|
+
])
|
|
1270
|
+
);
|
|
1271
|
+
} catch (err) {
|
|
1272
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1273
|
+
err,
|
|
1274
|
+
{
|
|
1275
|
+
spreadPathsToArguments: {},
|
|
1276
|
+
explicitPathsToArguments: {
|
|
1277
|
+
customizationId: "$[0]",
|
|
1278
|
+
revision: "$[1]",
|
|
1279
|
+
choices: "$[2].choices",
|
|
1280
|
+
fields: "$[2].fields"
|
|
1281
|
+
},
|
|
1282
|
+
singleArgumentUnchanged: false
|
|
1283
|
+
},
|
|
1284
|
+
["customizationId", "revision", "options"]
|
|
1285
|
+
);
|
|
1286
|
+
sideEffects?.onError?.(err);
|
|
1287
|
+
throw transformedError;
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1169
1290
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
1170
1291
|
const { httpClient, sideEffects } = arguments[2];
|
|
1171
1292
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1270,6 +1391,7 @@ async function bulkUpdateCustomizations2(customizations, options) {
|
|
|
1270
1391
|
}
|
|
1271
1392
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1272
1393
|
0 && (module.exports = {
|
|
1394
|
+
ChoiceSortStrategy,
|
|
1273
1395
|
ChoiceType,
|
|
1274
1396
|
CustomizationRenderType,
|
|
1275
1397
|
CustomizationType,
|
|
@@ -1288,6 +1410,7 @@ async function bulkUpdateCustomizations2(customizations, options) {
|
|
|
1288
1410
|
setCustomizationChoices,
|
|
1289
1411
|
typedQueryCustomizations,
|
|
1290
1412
|
updateCustomization,
|
|
1413
|
+
updateCustomizationChoices,
|
|
1291
1414
|
utils
|
|
1292
1415
|
});
|
|
1293
1416
|
//# sourceMappingURL=index.typings.js.map
|