@wix/auto_sdk_stores_customizations-v-3 1.0.67 → 1.0.68
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 +123 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +98 -1
- package/build/cjs/index.typings.js +113 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +87 -2
- package/build/cjs/meta.js +85 -2
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +122 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +98 -1
- package/build/es/index.typings.mjs +112 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +87 -2
- package/build/es/meta.mjs +83 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +23 -3
- package/build/internal/cjs/index.js +123 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +134 -1
- package/build/internal/cjs/index.typings.js +113 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +87 -2
- package/build/internal/cjs/meta.js +85 -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 +122 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +134 -1
- package/build/internal/es/index.typings.mjs +112 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +87 -2
- package/build/internal/es/meta.mjs +83 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -732,6 +732,40 @@ interface RemoveCustomizationChoicesResponse {
|
|
|
732
732
|
/** Updated customization. */
|
|
733
733
|
customization?: Customization;
|
|
734
734
|
}
|
|
735
|
+
interface UpdateCustomizationChoicesRequest {
|
|
736
|
+
/**
|
|
737
|
+
* Customization ID.
|
|
738
|
+
* @format GUID
|
|
739
|
+
*/
|
|
740
|
+
customizationId: string;
|
|
741
|
+
/**
|
|
742
|
+
* Revision number, which increments by 1 each time the customization is updated.
|
|
743
|
+
* To prevent conflicting changes,
|
|
744
|
+
* the current revision must be passed when updating the customization.
|
|
745
|
+
*/
|
|
746
|
+
revision: string;
|
|
747
|
+
/**
|
|
748
|
+
* Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization.
|
|
749
|
+
* @minSize 1
|
|
750
|
+
* @maxSize 100
|
|
751
|
+
*/
|
|
752
|
+
choices: MaskedChoice[];
|
|
753
|
+
/**
|
|
754
|
+
* Fields to include in the response.
|
|
755
|
+
*
|
|
756
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
757
|
+
* @maxSize 100
|
|
758
|
+
*/
|
|
759
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
760
|
+
}
|
|
761
|
+
interface MaskedChoice {
|
|
762
|
+
/** Choice to update. */
|
|
763
|
+
choice?: Choice;
|
|
764
|
+
}
|
|
765
|
+
interface UpdateCustomizationChoicesResponse {
|
|
766
|
+
/** Updated customization. */
|
|
767
|
+
customization?: Customization;
|
|
768
|
+
}
|
|
735
769
|
interface BulkAddCustomizationChoicesRequest {
|
|
736
770
|
/**
|
|
737
771
|
* List of customization IDs and choices.
|
|
@@ -1002,6 +1036,12 @@ type CreateCustomizationValidationErrors = {
|
|
|
1002
1036
|
ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY';
|
|
1003
1037
|
} | {
|
|
1004
1038
|
ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST';
|
|
1039
|
+
} | {
|
|
1040
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1041
|
+
} | {
|
|
1042
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1043
|
+
} | {
|
|
1044
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1005
1045
|
};
|
|
1006
1046
|
/** @docsIgnore */
|
|
1007
1047
|
type DeleteCustomizationValidationErrors = {
|
|
@@ -1040,6 +1080,12 @@ type BulkCreateCustomizationsValidationErrors = {
|
|
|
1040
1080
|
ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY';
|
|
1041
1081
|
} | {
|
|
1042
1082
|
ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST';
|
|
1083
|
+
} | {
|
|
1084
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1085
|
+
} | {
|
|
1086
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1087
|
+
} | {
|
|
1088
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1043
1089
|
};
|
|
1044
1090
|
/** @docsIgnore */
|
|
1045
1091
|
type AddCustomizationChoicesApplicationErrors = {
|
|
@@ -1058,6 +1104,12 @@ type AddCustomizationChoicesValidationErrors = {
|
|
|
1058
1104
|
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
1059
1105
|
} | {
|
|
1060
1106
|
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
1107
|
+
} | {
|
|
1108
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1109
|
+
} | {
|
|
1110
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1111
|
+
} | {
|
|
1112
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1061
1113
|
};
|
|
1062
1114
|
/** @docsIgnore */
|
|
1063
1115
|
type SetCustomizationChoicesApplicationErrors = {
|
|
@@ -1078,6 +1130,12 @@ type SetCustomizationChoicesValidationErrors = {
|
|
|
1078
1130
|
ruleName?: 'NOT_ALLOWED_DELETE_CHOICE_ASSIGNED_TO_PRODUCT';
|
|
1079
1131
|
} | {
|
|
1080
1132
|
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
1133
|
+
} | {
|
|
1134
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1135
|
+
} | {
|
|
1136
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1137
|
+
} | {
|
|
1138
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1081
1139
|
};
|
|
1082
1140
|
/** @docsIgnore */
|
|
1083
1141
|
type RemoveCustomizationChoicesApplicationErrors = {
|
|
@@ -1088,6 +1146,24 @@ type RemoveCustomizationChoicesApplicationErrors = {
|
|
|
1088
1146
|
/** @docsIgnore */
|
|
1089
1147
|
type RemoveCustomizationChoicesValidationErrors = {
|
|
1090
1148
|
ruleName?: 'NOT_ALLOWED_CUSTOMIZATION_WITHOUT_CHOICES';
|
|
1149
|
+
} | {
|
|
1150
|
+
ruleName?: 'PARENT_CHOICE_DELETE_REFERENCED';
|
|
1151
|
+
};
|
|
1152
|
+
/** @docsIgnore */
|
|
1153
|
+
type UpdateCustomizationChoicesApplicationErrors = {
|
|
1154
|
+
code?: 'CHOICE_NOT_FOUND';
|
|
1155
|
+
description?: string;
|
|
1156
|
+
data?: Record<string, any>;
|
|
1157
|
+
};
|
|
1158
|
+
/** @docsIgnore */
|
|
1159
|
+
type UpdateCustomizationChoicesValidationErrors = {
|
|
1160
|
+
ruleName?: 'UNSUPPORTED_CHOICE_FIELD';
|
|
1161
|
+
} | {
|
|
1162
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1163
|
+
} | {
|
|
1164
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1165
|
+
} | {
|
|
1166
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1091
1167
|
};
|
|
1092
1168
|
/** @docsIgnore */
|
|
1093
1169
|
type BulkAddCustomizationChoicesApplicationErrors = {
|
|
@@ -1104,6 +1180,12 @@ type BulkAddCustomizationChoicesValidationErrors = {
|
|
|
1104
1180
|
ruleName?: 'INVALID_CHOICE_TYPE';
|
|
1105
1181
|
} | {
|
|
1106
1182
|
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
1183
|
+
} | {
|
|
1184
|
+
ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
|
|
1185
|
+
} | {
|
|
1186
|
+
ruleName?: 'PARENT_CHOICE_NOT_FOUND';
|
|
1187
|
+
} | {
|
|
1188
|
+
ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
|
|
1107
1189
|
};
|
|
1108
1190
|
interface BaseEventMetadata {
|
|
1109
1191
|
/**
|
|
@@ -1693,6 +1775,21 @@ interface RemoveCustomizationChoicesOptions {
|
|
|
1693
1775
|
*/
|
|
1694
1776
|
fields?: RequestedFieldsWithLiterals[];
|
|
1695
1777
|
}
|
|
1778
|
+
interface UpdateCustomizationChoicesOptions {
|
|
1779
|
+
/**
|
|
1780
|
+
* Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization.
|
|
1781
|
+
* @minSize 1
|
|
1782
|
+
* @maxSize 100
|
|
1783
|
+
*/
|
|
1784
|
+
choices: MaskedChoice[];
|
|
1785
|
+
/**
|
|
1786
|
+
* Fields to include in the response.
|
|
1787
|
+
*
|
|
1788
|
+
* Supported values: `ASSIGNED_PRODUCTS_COUNT`
|
|
1789
|
+
* @maxSize 100
|
|
1790
|
+
*/
|
|
1791
|
+
fields?: RequestedFieldsWithLiterals[];
|
|
1792
|
+
}
|
|
1696
1793
|
/**
|
|
1697
1794
|
* Adds choices to multiple customizations.
|
|
1698
1795
|
* @param customizationsChoices - List of customization IDs and choices.
|
|
@@ -1756,4 +1853,4 @@ interface BulkUpdateCustomizationsOptions {
|
|
|
1756
1853
|
fields?: RequestedFieldsWithLiterals[];
|
|
1757
1854
|
}
|
|
1758
1855
|
|
|
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 };
|
|
1856
|
+
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 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 };
|
|
@@ -38,6 +38,7 @@ __export(index_typings_exports, {
|
|
|
38
38
|
setCustomizationChoices: () => setCustomizationChoices2,
|
|
39
39
|
typedQueryCustomizations: () => typedQueryCustomizations,
|
|
40
40
|
updateCustomization: () => updateCustomization2,
|
|
41
|
+
updateCustomizationChoices: () => updateCustomizationChoices2,
|
|
41
42
|
utils: () => utils
|
|
42
43
|
});
|
|
43
44
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -579,6 +580,67 @@ function removeCustomizationChoices(payload) {
|
|
|
579
580
|
}
|
|
580
581
|
return __removeCustomizationChoices;
|
|
581
582
|
}
|
|
583
|
+
function updateCustomizationChoices(payload) {
|
|
584
|
+
function __updateCustomizationChoices({ host }) {
|
|
585
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
586
|
+
{
|
|
587
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
588
|
+
paths: [{ path: "choices.fieldMask" }]
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
592
|
+
paths: [{ path: "choices.choice.image.urlExpirationDate" }]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
596
|
+
paths: [
|
|
597
|
+
{ path: "choices.choice.image.focalPoint.x" },
|
|
598
|
+
{ path: "choices.choice.image.focalPoint.y" }
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
]);
|
|
602
|
+
const metadata = {
|
|
603
|
+
entityFqdn: "wix.stores.catalog.v3.customization",
|
|
604
|
+
method: "POST",
|
|
605
|
+
methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomizationChoices",
|
|
606
|
+
packageName: PACKAGE_NAME,
|
|
607
|
+
migrationOptions: {
|
|
608
|
+
optInTransformResponse: true
|
|
609
|
+
},
|
|
610
|
+
url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
|
|
611
|
+
protoPath: "/v3/customizations/{customizationId}/update-choices",
|
|
612
|
+
data: serializedData,
|
|
613
|
+
host
|
|
614
|
+
}),
|
|
615
|
+
data: serializedData,
|
|
616
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
617
|
+
{
|
|
618
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
619
|
+
paths: [
|
|
620
|
+
{ path: "customization.createdDate" },
|
|
621
|
+
{ path: "customization.updatedDate" },
|
|
622
|
+
{
|
|
623
|
+
path: "customization.choicesSettings.choices.image.urlExpirationDate"
|
|
624
|
+
}
|
|
625
|
+
]
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
629
|
+
paths: [
|
|
630
|
+
{
|
|
631
|
+
path: "customization.choicesSettings.choices.image.focalPoint.x"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
path: "customization.choicesSettings.choices.image.focalPoint.y"
|
|
635
|
+
}
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
])
|
|
639
|
+
};
|
|
640
|
+
return metadata;
|
|
641
|
+
}
|
|
642
|
+
return __updateCustomizationChoices;
|
|
643
|
+
}
|
|
582
644
|
function bulkAddCustomizationChoices(payload) {
|
|
583
645
|
function __bulkAddCustomizationChoices({ host }) {
|
|
584
646
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -1166,6 +1228,56 @@ async function removeCustomizationChoices2(customizationId, choiceIds, options)
|
|
|
1166
1228
|
throw transformedError;
|
|
1167
1229
|
}
|
|
1168
1230
|
}
|
|
1231
|
+
async function updateCustomizationChoices2(customizationId, revision, options) {
|
|
1232
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
1233
|
+
const payload = (0, import_transform_paths2.transformPaths)(
|
|
1234
|
+
(0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1235
|
+
customizationId,
|
|
1236
|
+
revision,
|
|
1237
|
+
choices: options?.choices,
|
|
1238
|
+
fields: options?.fields
|
|
1239
|
+
}),
|
|
1240
|
+
[
|
|
1241
|
+
{
|
|
1242
|
+
transformFn: import_image.transformSDKImageToRESTImage,
|
|
1243
|
+
paths: [{ path: "choices.choice.image" }]
|
|
1244
|
+
}
|
|
1245
|
+
]
|
|
1246
|
+
);
|
|
1247
|
+
const reqOpts = updateCustomizationChoices(
|
|
1248
|
+
payload
|
|
1249
|
+
);
|
|
1250
|
+
sideEffects?.onSiteCall?.();
|
|
1251
|
+
try {
|
|
1252
|
+
const result = await httpClient.request(reqOpts);
|
|
1253
|
+
sideEffects?.onSuccess?.(result);
|
|
1254
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1255
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1256
|
+
{
|
|
1257
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1258
|
+
paths: [{ path: "customization.choicesSettings.choices.image" }]
|
|
1259
|
+
}
|
|
1260
|
+
])
|
|
1261
|
+
);
|
|
1262
|
+
} catch (err) {
|
|
1263
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1264
|
+
err,
|
|
1265
|
+
{
|
|
1266
|
+
spreadPathsToArguments: {},
|
|
1267
|
+
explicitPathsToArguments: {
|
|
1268
|
+
customizationId: "$[0]",
|
|
1269
|
+
revision: "$[1]",
|
|
1270
|
+
choices: "$[2].choices",
|
|
1271
|
+
fields: "$[2].fields"
|
|
1272
|
+
},
|
|
1273
|
+
singleArgumentUnchanged: false
|
|
1274
|
+
},
|
|
1275
|
+
["customizationId", "revision", "options"]
|
|
1276
|
+
);
|
|
1277
|
+
sideEffects?.onError?.(err);
|
|
1278
|
+
throw transformedError;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1169
1281
|
async function bulkAddCustomizationChoices2(customizationsChoices, options) {
|
|
1170
1282
|
const { httpClient, sideEffects } = arguments[2];
|
|
1171
1283
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1288,6 +1400,7 @@ async function bulkUpdateCustomizations2(customizations, options) {
|
|
|
1288
1400
|
setCustomizationChoices,
|
|
1289
1401
|
typedQueryCustomizations,
|
|
1290
1402
|
updateCustomization,
|
|
1403
|
+
updateCustomizationChoices,
|
|
1291
1404
|
utils
|
|
1292
1405
|
});
|
|
1293
1406
|
//# sourceMappingURL=index.typings.js.map
|