@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +123 -0
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +98 -1
  5. package/build/cjs/index.typings.js +113 -0
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +87 -2
  8. package/build/cjs/meta.js +85 -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 +122 -0
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +98 -1
  14. package/build/es/index.typings.mjs +112 -0
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +87 -2
  17. package/build/es/meta.mjs +83 -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 +123 -0
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +134 -1
  23. package/build/internal/cjs/index.typings.js +113 -0
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +87 -2
  26. package/build/internal/cjs/meta.js +85 -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 +122 -0
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +134 -1
  32. package/build/internal/es/index.typings.mjs +112 -0
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +87 -2
  35. package/build/internal/es/meta.mjs +83 -1
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -194,6 +194,19 @@ interface Choice extends ChoiceValueOneOf {
194
194
  * @decimalValue options { gte:0, lte:999999999, maxScale:3 }
195
195
  */
196
196
  defaultAddedPrice?: string | null;
197
+ /**
198
+ * IDs of parent choices that this choice is grouped under for storefront filtering.
199
+ * A choice with `parentChoiceIds` is considered a "child" choice.
200
+ * Child choices are excluded from the top-level storefront filter list
201
+ * and displayed only under their parent choice groups.
202
+ *
203
+ * A child choice can have multiple parents, in which case it appears under each parent group.
204
+ * Only a single level of parent-child grouping is supported. A choice that is a parent can't also be a child.
205
+ * @internal
206
+ * @format GUID
207
+ * @maxSize 4
208
+ */
209
+ parentChoiceIds?: string[];
197
210
  }
198
211
  /** @oneof */
199
212
  interface ChoiceValueOneOf {
@@ -732,6 +745,40 @@ interface RemoveCustomizationChoicesResponse {
732
745
  /** Updated customization. */
733
746
  customization?: Customization;
734
747
  }
748
+ interface UpdateCustomizationChoicesRequest {
749
+ /**
750
+ * Customization ID.
751
+ * @format GUID
752
+ */
753
+ customizationId: string;
754
+ /**
755
+ * Revision number, which increments by 1 each time the customization is updated.
756
+ * To prevent conflicting changes,
757
+ * the current revision must be passed when updating the customization.
758
+ */
759
+ revision: string;
760
+ /**
761
+ * Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization.
762
+ * @minSize 1
763
+ * @maxSize 100
764
+ */
765
+ choices: MaskedChoice[];
766
+ /**
767
+ * Fields to include in the response.
768
+ *
769
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
770
+ * @maxSize 100
771
+ */
772
+ fields?: RequestedFieldsWithLiterals[];
773
+ }
774
+ interface MaskedChoice {
775
+ /** Choice to update. */
776
+ choice?: Choice;
777
+ }
778
+ interface UpdateCustomizationChoicesResponse {
779
+ /** Updated customization. */
780
+ customization?: Customization;
781
+ }
735
782
  interface BulkAddCustomizationChoicesRequest {
736
783
  /**
737
784
  * List of customization IDs and choices.
@@ -1002,6 +1049,12 @@ type CreateCustomizationValidationErrors = {
1002
1049
  ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY';
1003
1050
  } | {
1004
1051
  ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST';
1052
+ } | {
1053
+ ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
1054
+ } | {
1055
+ ruleName?: 'PARENT_CHOICE_NOT_FOUND';
1056
+ } | {
1057
+ ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1005
1058
  };
1006
1059
  /** @docsIgnore */
1007
1060
  type DeleteCustomizationValidationErrors = {
@@ -1040,6 +1093,12 @@ type BulkCreateCustomizationsValidationErrors = {
1040
1093
  ruleName?: 'MIXED_CHOICE_IDS_CONSISTENCY';
1041
1094
  } | {
1042
1095
  ruleName?: 'ID_NOT_ALLOWED_IN_REQUEST';
1096
+ } | {
1097
+ ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
1098
+ } | {
1099
+ ruleName?: 'PARENT_CHOICE_NOT_FOUND';
1100
+ } | {
1101
+ ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1043
1102
  };
1044
1103
  /** @docsIgnore */
1045
1104
  type AddCustomizationChoicesApplicationErrors = {
@@ -1058,6 +1117,12 @@ type AddCustomizationChoicesValidationErrors = {
1058
1117
  ruleName?: 'INVALID_CHOICE_VALUE';
1059
1118
  } | {
1060
1119
  ruleName?: 'DUPLICATE_CHOICE_NAME';
1120
+ } | {
1121
+ ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
1122
+ } | {
1123
+ ruleName?: 'PARENT_CHOICE_NOT_FOUND';
1124
+ } | {
1125
+ ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1061
1126
  };
1062
1127
  /** @docsIgnore */
1063
1128
  type SetCustomizationChoicesApplicationErrors = {
@@ -1078,6 +1143,12 @@ type SetCustomizationChoicesValidationErrors = {
1078
1143
  ruleName?: 'NOT_ALLOWED_DELETE_CHOICE_ASSIGNED_TO_PRODUCT';
1079
1144
  } | {
1080
1145
  ruleName?: 'DUPLICATE_CHOICE_NAME';
1146
+ } | {
1147
+ ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
1148
+ } | {
1149
+ ruleName?: 'PARENT_CHOICE_NOT_FOUND';
1150
+ } | {
1151
+ ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1081
1152
  };
1082
1153
  /** @docsIgnore */
1083
1154
  type RemoveCustomizationChoicesApplicationErrors = {
@@ -1088,6 +1159,24 @@ type RemoveCustomizationChoicesApplicationErrors = {
1088
1159
  /** @docsIgnore */
1089
1160
  type RemoveCustomizationChoicesValidationErrors = {
1090
1161
  ruleName?: 'NOT_ALLOWED_CUSTOMIZATION_WITHOUT_CHOICES';
1162
+ } | {
1163
+ ruleName?: 'PARENT_CHOICE_DELETE_REFERENCED';
1164
+ };
1165
+ /** @docsIgnore */
1166
+ type UpdateCustomizationChoicesApplicationErrors = {
1167
+ code?: 'CHOICE_NOT_FOUND';
1168
+ description?: string;
1169
+ data?: Record<string, any>;
1170
+ };
1171
+ /** @docsIgnore */
1172
+ type UpdateCustomizationChoicesValidationErrors = {
1173
+ ruleName?: 'UNSUPPORTED_CHOICE_FIELD';
1174
+ } | {
1175
+ ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
1176
+ } | {
1177
+ ruleName?: 'PARENT_CHOICE_NOT_FOUND';
1178
+ } | {
1179
+ ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1091
1180
  };
1092
1181
  /** @docsIgnore */
1093
1182
  type BulkAddCustomizationChoicesApplicationErrors = {
@@ -1104,6 +1193,12 @@ type BulkAddCustomizationChoicesValidationErrors = {
1104
1193
  ruleName?: 'INVALID_CHOICE_TYPE';
1105
1194
  } | {
1106
1195
  ruleName?: 'INVALID_CHOICE_VALUE';
1196
+ } | {
1197
+ ruleName?: 'PARENT_CHOICE_SELF_REFERENCE';
1198
+ } | {
1199
+ ruleName?: 'PARENT_CHOICE_NOT_FOUND';
1200
+ } | {
1201
+ ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1107
1202
  };
1108
1203
  interface BaseEventMetadata {
1109
1204
  /**
@@ -1693,6 +1788,44 @@ interface RemoveCustomizationChoicesOptions {
1693
1788
  */
1694
1789
  fields?: RequestedFieldsWithLiterals[];
1695
1790
  }
1791
+ /**
1792
+ * Updates properties of existing choices in a customization.
1793
+ * Choices are identified by their IDs. Only the fields specified in `fieldMask` are updated.
1794
+ *
1795
+ * Currently supports updating `parentChoiceIds`.
1796
+ * @param customizationId - Customization ID.
1797
+ * @param revision - Revision number, which increments by 1 each time the customization is updated.
1798
+ * To prevent conflicting changes,
1799
+ * the current revision must be passed when updating the customization.
1800
+ * @internal
1801
+ * @documentationMaturity preview
1802
+ * @requiredField customizationId
1803
+ * @requiredField options.choices
1804
+ * @requiredField options.choices.choice
1805
+ * @requiredField revision
1806
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
1807
+ * @applicableIdentity APP
1808
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomizationChoices
1809
+ */
1810
+ declare function updateCustomizationChoices(customizationId: string, revision: string, options?: NonNullablePaths<UpdateCustomizationChoicesOptions, `choices` | `choices.${number}.choice`, 4>): Promise<NonNullablePaths<UpdateCustomizationChoicesResponse, `customization.freeTextInput.minCharCount` | `customization.freeTextInput.maxCharCount` | `customization.freeTextInput.title` | `customization.choicesSettings.choices` | `customization.choicesSettings.choices.${number}.colorCode` | `customization.choicesSettings.choices.${number}._id` | `customization.choicesSettings.choices.${number}.choiceType` | `customization.choicesSettings.choices.${number}.name` | `customization.name` | `customization.customizationType` | `customization.customizationRenderType`, 6> & {
1811
+ __applicationErrorsType?: UpdateCustomizationChoicesApplicationErrors;
1812
+ __validationErrorsType?: UpdateCustomizationChoicesValidationErrors;
1813
+ }>;
1814
+ interface UpdateCustomizationChoicesOptions {
1815
+ /**
1816
+ * Choices to update. Each item must include a `choice` with a valid `id` matching an existing choice in the customization.
1817
+ * @minSize 1
1818
+ * @maxSize 100
1819
+ */
1820
+ choices: MaskedChoice[];
1821
+ /**
1822
+ * Fields to include in the response.
1823
+ *
1824
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1825
+ * @maxSize 100
1826
+ */
1827
+ fields?: RequestedFieldsWithLiterals[];
1828
+ }
1696
1829
  /**
1697
1830
  * Adds choices to multiple customizations.
1698
1831
  * @param customizationsChoices - List of customization IDs and choices.
@@ -1756,4 +1889,4 @@ interface BulkUpdateCustomizationsOptions {
1756
1889
  fields?: RequestedFieldsWithLiterals[];
1757
1890
  }
1758
1891
 
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 };
1892
+ 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, updateCustomizationChoices, 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