@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 };
@@ -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, [
@@ -1125,6 +1186,56 @@ async function removeCustomizationChoices2(customizationId, choiceIds, options)
1125
1186
  throw transformedError;
1126
1187
  }
1127
1188
  }
1189
+ async function updateCustomizationChoices2(customizationId, revision, options) {
1190
+ const { httpClient, sideEffects } = arguments[3];
1191
+ const payload = transformPaths2(
1192
+ renameKeysFromSDKRequestToRESTRequest({
1193
+ customizationId,
1194
+ revision,
1195
+ choices: options?.choices,
1196
+ fields: options?.fields
1197
+ }),
1198
+ [
1199
+ {
1200
+ transformFn: transformSDKImageToRESTImage,
1201
+ paths: [{ path: "choices.choice.image" }]
1202
+ }
1203
+ ]
1204
+ );
1205
+ const reqOpts = updateCustomizationChoices(
1206
+ payload
1207
+ );
1208
+ sideEffects?.onSiteCall?.();
1209
+ try {
1210
+ const result = await httpClient.request(reqOpts);
1211
+ sideEffects?.onSuccess?.(result);
1212
+ return renameKeysFromRESTResponseToSDKResponse(
1213
+ transformPaths2(result.data, [
1214
+ {
1215
+ transformFn: transformRESTImageToSDKImage,
1216
+ paths: [{ path: "customization.choicesSettings.choices.image" }]
1217
+ }
1218
+ ])
1219
+ );
1220
+ } catch (err) {
1221
+ const transformedError = sdkTransformError(
1222
+ err,
1223
+ {
1224
+ spreadPathsToArguments: {},
1225
+ explicitPathsToArguments: {
1226
+ customizationId: "$[0]",
1227
+ revision: "$[1]",
1228
+ choices: "$[2].choices",
1229
+ fields: "$[2].fields"
1230
+ },
1231
+ singleArgumentUnchanged: false
1232
+ },
1233
+ ["customizationId", "revision", "options"]
1234
+ );
1235
+ sideEffects?.onError?.(err);
1236
+ throw transformedError;
1237
+ }
1238
+ }
1128
1239
  async function bulkAddCustomizationChoices2(customizationsChoices, options) {
1129
1240
  const { httpClient, sideEffects } = arguments[2];
1130
1241
  const payload = transformPaths2(
@@ -1246,6 +1357,7 @@ export {
1246
1357
  setCustomizationChoices2 as setCustomizationChoices,
1247
1358
  typedQueryCustomizations,
1248
1359
  updateCustomization2 as updateCustomization,
1360
+ updateCustomizationChoices2 as updateCustomizationChoices,
1249
1361
  utils
1250
1362
  };
1251
1363
  //# sourceMappingURL=index.typings.mjs.map