@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +133 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +112 -1
  5. package/build/cjs/index.typings.js +123 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +101 -2
  8. package/build/cjs/meta.js +95 -2
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +131 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +112 -1
  14. package/build/es/index.typings.mjs +121 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +101 -2
  17. package/build/es/meta.mjs +92 -1
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +23 -3
  20. package/build/internal/cjs/index.js +133 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +155 -1
  23. package/build/internal/cjs/index.typings.js +123 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +101 -2
  26. package/build/internal/cjs/meta.js +95 -2
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +23 -3
  29. package/build/internal/es/index.mjs +131 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +155 -1
  32. package/build/internal/es/index.typings.mjs +121 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +101 -2
  35. package/build/internal/es/meta.mjs +92 -1
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. 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 };
@@ -538,6 +538,67 @@ function removeCustomizationChoices(payload) {
538
538
  }
539
539
  return __removeCustomizationChoices;
540
540
  }
541
+ function updateCustomizationChoices(payload) {
542
+ function __updateCustomizationChoices({ host }) {
543
+ const serializedData = transformPaths(payload, [
544
+ {
545
+ transformFn: transformSDKFieldMaskToRESTFieldMask,
546
+ paths: [{ path: "choices.fieldMask" }]
547
+ },
548
+ {
549
+ transformFn: transformSDKTimestampToRESTTimestamp,
550
+ paths: [{ path: "choices.choice.image.urlExpirationDate" }]
551
+ },
552
+ {
553
+ transformFn: transformSDKFloatToRESTFloat,
554
+ paths: [
555
+ { path: "choices.choice.image.focalPoint.x" },
556
+ { path: "choices.choice.image.focalPoint.y" }
557
+ ]
558
+ }
559
+ ]);
560
+ const metadata = {
561
+ entityFqdn: "wix.stores.catalog.v3.customization",
562
+ method: "POST",
563
+ methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomizationChoices",
564
+ packageName: PACKAGE_NAME,
565
+ migrationOptions: {
566
+ optInTransformResponse: true
567
+ },
568
+ url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
569
+ protoPath: "/v3/customizations/{customizationId}/update-choices",
570
+ data: serializedData,
571
+ host
572
+ }),
573
+ data: serializedData,
574
+ transformResponse: (payload2) => transformPaths(payload2, [
575
+ {
576
+ transformFn: transformRESTTimestampToSDKTimestamp,
577
+ paths: [
578
+ { path: "customization.createdDate" },
579
+ { path: "customization.updatedDate" },
580
+ {
581
+ path: "customization.choicesSettings.choices.image.urlExpirationDate"
582
+ }
583
+ ]
584
+ },
585
+ {
586
+ transformFn: transformRESTFloatToSDKFloat,
587
+ paths: [
588
+ {
589
+ path: "customization.choicesSettings.choices.image.focalPoint.x"
590
+ },
591
+ {
592
+ path: "customization.choicesSettings.choices.image.focalPoint.y"
593
+ }
594
+ ]
595
+ }
596
+ ])
597
+ };
598
+ return metadata;
599
+ }
600
+ return __updateCustomizationChoices;
601
+ }
541
602
  function bulkAddCustomizationChoices(payload) {
542
603
  function __bulkAddCustomizationChoices({ host }) {
543
604
  const serializedData = transformPaths(payload, [
@@ -693,6 +754,14 @@ var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
693
754
  ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
694
755
  return ChoiceType2;
695
756
  })(ChoiceType || {});
757
+ var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
758
+ ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
759
+ ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
760
+ ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
761
+ ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
762
+ ChoiceSortStrategy2["MANUAL"] = "MANUAL";
763
+ return ChoiceSortStrategy2;
764
+ })(ChoiceSortStrategy || {});
696
765
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
697
766
  RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
698
767
  RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
@@ -1125,6 +1194,56 @@ async function removeCustomizationChoices2(customizationId, choiceIds, options)
1125
1194
  throw transformedError;
1126
1195
  }
1127
1196
  }
1197
+ async function updateCustomizationChoices2(customizationId, revision, options) {
1198
+ const { httpClient, sideEffects } = arguments[3];
1199
+ const payload = transformPaths2(
1200
+ renameKeysFromSDKRequestToRESTRequest({
1201
+ customizationId,
1202
+ revision,
1203
+ choices: options?.choices,
1204
+ fields: options?.fields
1205
+ }),
1206
+ [
1207
+ {
1208
+ transformFn: transformSDKImageToRESTImage,
1209
+ paths: [{ path: "choices.choice.image" }]
1210
+ }
1211
+ ]
1212
+ );
1213
+ const reqOpts = updateCustomizationChoices(
1214
+ payload
1215
+ );
1216
+ sideEffects?.onSiteCall?.();
1217
+ try {
1218
+ const result = await httpClient.request(reqOpts);
1219
+ sideEffects?.onSuccess?.(result);
1220
+ return renameKeysFromRESTResponseToSDKResponse(
1221
+ transformPaths2(result.data, [
1222
+ {
1223
+ transformFn: transformRESTImageToSDKImage,
1224
+ paths: [{ path: "customization.choicesSettings.choices.image" }]
1225
+ }
1226
+ ])
1227
+ );
1228
+ } catch (err) {
1229
+ const transformedError = sdkTransformError(
1230
+ err,
1231
+ {
1232
+ spreadPathsToArguments: {},
1233
+ explicitPathsToArguments: {
1234
+ customizationId: "$[0]",
1235
+ revision: "$[1]",
1236
+ choices: "$[2].choices",
1237
+ fields: "$[2].fields"
1238
+ },
1239
+ singleArgumentUnchanged: false
1240
+ },
1241
+ ["customizationId", "revision", "options"]
1242
+ );
1243
+ sideEffects?.onError?.(err);
1244
+ throw transformedError;
1245
+ }
1246
+ }
1128
1247
  async function bulkAddCustomizationChoices2(customizationsChoices, options) {
1129
1248
  const { httpClient, sideEffects } = arguments[2];
1130
1249
  const payload = transformPaths2(
@@ -1228,6 +1347,7 @@ async function bulkUpdateCustomizations2(customizations, options) {
1228
1347
  }
1229
1348
  }
1230
1349
  export {
1350
+ ChoiceSortStrategy,
1231
1351
  ChoiceType,
1232
1352
  CustomizationRenderType,
1233
1353
  CustomizationType,
@@ -1246,6 +1366,7 @@ export {
1246
1366
  setCustomizationChoices2 as setCustomizationChoices,
1247
1367
  typedQueryCustomizations,
1248
1368
  updateCustomization2 as updateCustomization,
1369
+ updateCustomizationChoices2 as updateCustomizationChoices,
1249
1370
  utils
1250
1371
  };
1251
1372
  //# sourceMappingURL=index.typings.mjs.map