@wix/auto_sdk_stores_customizations-v-3 1.0.69 → 1.0.71

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 +98 -5
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +70 -16
  5. package/build/cjs/index.typings.js +88 -5
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +58 -17
  8. package/build/cjs/meta.js +66 -5
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +1 -1
  11. package/build/es/index.mjs +97 -5
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +70 -16
  14. package/build/es/index.typings.mjs +87 -5
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +58 -17
  17. package/build/es/meta.mjs +65 -5
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +19 -3
  20. package/build/internal/cjs/index.js +98 -5
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +89 -17
  23. package/build/internal/cjs/index.typings.js +88 -5
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +58 -17
  26. package/build/internal/cjs/meta.js +66 -5
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +19 -3
  29. package/build/internal/es/index.mjs +97 -5
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +89 -17
  32. package/build/internal/es/index.typings.mjs +87 -5
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +58 -17
  35. package/build/internal/es/meta.mjs +65 -5
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -96,14 +96,12 @@ interface CustomizationCustomizationSettingsOneOf {
96
96
  choicesSettings?: ChoicesSettings;
97
97
  }
98
98
  declare enum CustomizationType {
99
- UNKNOWN_CUSTOMIZATION_TYPE = "UNKNOWN_CUSTOMIZATION_TYPE",
100
99
  PRODUCT_OPTION = "PRODUCT_OPTION",
101
100
  MODIFIER = "MODIFIER"
102
101
  }
103
102
  /** @enumType */
104
- type CustomizationTypeWithLiterals = CustomizationType | 'UNKNOWN_CUSTOMIZATION_TYPE' | 'PRODUCT_OPTION' | 'MODIFIER';
103
+ type CustomizationTypeWithLiterals = CustomizationType | 'PRODUCT_OPTION' | 'MODIFIER';
105
104
  declare enum CustomizationRenderType {
106
- UNKNOWN_CUSTOMIZATION_RENDER_TYPE = "UNKNOWN_CUSTOMIZATION_RENDER_TYPE",
107
105
  /** Customization by free text input. */
108
106
  FREE_TEXT = "FREE_TEXT",
109
107
  /** Customization by selection of text choices. */
@@ -112,7 +110,7 @@ declare enum CustomizationRenderType {
112
110
  SWATCH_CHOICES = "SWATCH_CHOICES"
113
111
  }
114
112
  /** @enumType */
115
- type CustomizationRenderTypeWithLiterals = CustomizationRenderType | 'UNKNOWN_CUSTOMIZATION_RENDER_TYPE' | 'FREE_TEXT' | 'TEXT_CHOICES' | 'SWATCH_CHOICES';
113
+ type CustomizationRenderTypeWithLiterals = CustomizationRenderType | 'FREE_TEXT' | 'TEXT_CHOICES' | 'SWATCH_CHOICES';
116
114
  interface FreeTextSettings {
117
115
  /** Minimum text character length. */
118
116
  minCharCount?: number;
@@ -207,14 +205,13 @@ interface ChoiceValueOneOf {
207
205
  colorCode?: string;
208
206
  }
209
207
  declare enum ChoiceType {
210
- UNKNOWN_CHOICE_TYPE = "UNKNOWN_CHOICE_TYPE",
211
208
  /** For a `customizationRenderType` of `TEXT_CHOICES`. */
212
209
  CHOICE_TEXT = "CHOICE_TEXT",
213
210
  /** For `customizationRenderType: SWATCH_CHOICES`. */
214
211
  ONE_COLOR = "ONE_COLOR"
215
212
  }
216
213
  /** @enumType */
217
- type ChoiceTypeWithLiterals = ChoiceType | 'UNKNOWN_CHOICE_TYPE' | 'CHOICE_TEXT' | 'ONE_COLOR';
214
+ type ChoiceTypeWithLiterals = ChoiceType | 'CHOICE_TEXT' | 'ONE_COLOR';
218
215
  interface MultipleColors {
219
216
  /**
220
217
  * A list of color codes.
@@ -236,18 +233,17 @@ interface FocalPoint {
236
233
  width?: number | null;
237
234
  }
238
235
  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. */
236
+ /** Default. Text choices are sorted by name, swatch choices are sorted by product count. */
241
237
  DEFAULT = "DEFAULT",
242
- /** Sort choices alphabetically by name, case-insensitive, with numeric values first. */
238
+ /** Alphabetically by name, case-insensitive. Numeric values are sorted first. */
243
239
  BY_NAME = "BY_NAME",
244
- /** Sort choices by the number of products assigned to each choice, in descending order. */
240
+ /** By the number of products assigned to each choice, in descending order. */
245
241
  BY_PRODUCT_COUNT = "BY_PRODUCT_COUNT",
246
- /** Sort choices by their order in the choices list. */
242
+ /** By the order of the choices list. Use [Reorder Customization Choices](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/customizations-v3/reorder-customization-choices) to set the order. */
247
243
  MANUAL = "MANUAL"
248
244
  }
249
245
  /** @enumType */
250
- type ChoiceSortStrategyWithLiterals = ChoiceSortStrategy | 'UNKNOWN_CHOICE_SORT_STRATEGY' | 'DEFAULT' | 'BY_NAME' | 'BY_PRODUCT_COUNT' | 'MANUAL';
246
+ type ChoiceSortStrategyWithLiterals = ChoiceSortStrategy | 'DEFAULT' | 'BY_NAME' | 'BY_PRODUCT_COUNT' | 'MANUAL';
251
247
  interface InvalidateCache extends InvalidateCacheGetByOneOf {
252
248
  /**
253
249
  * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!
@@ -428,13 +424,11 @@ interface GetCustomizationRequest {
428
424
  fields?: RequestedFieldsWithLiterals[];
429
425
  }
430
426
  declare enum RequestedFields {
431
- /** Unknown requested field. */
432
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
433
427
  /** Assigned products count. */
434
428
  ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT"
435
429
  }
436
430
  /** @enumType */
437
- type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'ASSIGNED_PRODUCTS_COUNT';
431
+ type RequestedFieldsWithLiterals = RequestedFields | 'ASSIGNED_PRODUCTS_COUNT';
438
432
  interface GetCustomizationResponse {
439
433
  /** Customization. */
440
434
  customization?: Customization;
@@ -780,6 +774,40 @@ interface UpdateCustomizationChoicesResponse {
780
774
  /** Updated customization. */
781
775
  customization?: Customization;
782
776
  }
777
+ interface ReorderCustomizationChoicesRequest {
778
+ /**
779
+ * Customization ID.
780
+ * @format GUID
781
+ */
782
+ customizationId: string;
783
+ /** Revision number, which increments by 1 each time the customization is updated. To prevent conflicting changes, the current revision must be passed when updating the customization. */
784
+ revision: string;
785
+ /**
786
+ * Choice IDs in the desired display order. Must contain exactly the same set of IDs as the customization's current choices — no additions or removals.
787
+ * @format GUID
788
+ * @minSize 1
789
+ * @maxSize 200
790
+ */
791
+ choiceIds: string[];
792
+ /**
793
+ * Fields to include in the response.
794
+ *
795
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
796
+ * @maxSize 100
797
+ */
798
+ fields?: RequestedFieldsWithLiterals[];
799
+ }
800
+ interface ReorderCustomizationChoicesResponse {
801
+ /** Updated customization. */
802
+ customization?: Customization;
803
+ }
804
+ /** Additional error details returned with the `CHOICE_IDS_MISMATCH` error. */
805
+ interface ChoiceIdsMismatchData {
806
+ /** Choice IDs that exist in the customization but are missing from the request. */
807
+ missingIds?: string[];
808
+ /** Choice IDs included in the request that don't exist in the customization. */
809
+ extraIds?: string[];
810
+ }
783
811
  interface BulkAddCustomizationChoicesRequest {
784
812
  /**
785
813
  * List of customization IDs and choices.
@@ -1180,6 +1208,16 @@ type UpdateCustomizationChoicesValidationErrors = {
1180
1208
  ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1181
1209
  };
1182
1210
  /** @docsIgnore */
1211
+ type ReorderCustomizationChoicesApplicationErrors = {
1212
+ code?: 'DOESNT_SUPPORT_CHOICES';
1213
+ description?: string;
1214
+ data?: Record<string, any>;
1215
+ } | {
1216
+ code?: 'CHOICE_IDS_MISMATCH';
1217
+ description?: string;
1218
+ data?: ChoiceIdsMismatchData;
1219
+ };
1220
+ /** @docsIgnore */
1183
1221
  type BulkAddCustomizationChoicesApplicationErrors = {
1184
1222
  code?: 'CHOICES_LIMIT_EXCEEDED';
1185
1223
  description?: string;
@@ -1804,6 +1842,22 @@ interface UpdateCustomizationChoicesOptions {
1804
1842
  */
1805
1843
  fields?: RequestedFieldsWithLiterals[];
1806
1844
  }
1845
+ interface ReorderCustomizationChoicesOptions {
1846
+ /**
1847
+ * Choice IDs in the desired display order. Must contain exactly the same set of IDs as the customization's current choices — no additions or removals.
1848
+ * @format GUID
1849
+ * @minSize 1
1850
+ * @maxSize 200
1851
+ */
1852
+ choiceIds: string[];
1853
+ /**
1854
+ * Fields to include in the response.
1855
+ *
1856
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1857
+ * @maxSize 100
1858
+ */
1859
+ fields?: RequestedFieldsWithLiterals[];
1860
+ }
1807
1861
  /**
1808
1862
  * Adds choices to multiple customizations.
1809
1863
  * @param customizationsChoices - List of customization IDs and choices.
@@ -1867,4 +1921,4 @@ interface BulkUpdateCustomizationsOptions {
1867
1921
  fields?: RequestedFieldsWithLiterals[];
1868
1922
  }
1869
1923
 
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 };
1924
+ 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, type ChoiceIdsMismatchData, 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, type ReorderCustomizationChoicesApplicationErrors, type ReorderCustomizationChoicesOptions, type ReorderCustomizationChoicesRequest, type ReorderCustomizationChoicesResponse, 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 };
@@ -36,6 +36,7 @@ __export(index_typings_exports, {
36
36
  getCustomization: () => getCustomization2,
37
37
  queryCustomizations: () => queryCustomizations2,
38
38
  removeCustomizationChoices: () => removeCustomizationChoices2,
39
+ reorderCustomizationChoices: () => reorderCustomizationChoices2,
39
40
  setCustomizationChoices: () => setCustomizationChoices2,
40
41
  typedQueryCustomizations: () => typedQueryCustomizations,
41
42
  updateCustomization: () => updateCustomization2,
@@ -642,6 +643,50 @@ function updateCustomizationChoices(payload) {
642
643
  }
643
644
  return __updateCustomizationChoices;
644
645
  }
646
+ function reorderCustomizationChoices(payload) {
647
+ function __reorderCustomizationChoices({ host }) {
648
+ const metadata = {
649
+ entityFqdn: "wix.stores.catalog.v3.customization",
650
+ method: "POST",
651
+ methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.ReorderCustomizationChoices",
652
+ packageName: PACKAGE_NAME,
653
+ migrationOptions: {
654
+ optInTransformResponse: true
655
+ },
656
+ url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
657
+ protoPath: "/v3/customizations/{customizationId}/reorder-choices",
658
+ data: payload,
659
+ host
660
+ }),
661
+ data: payload,
662
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
663
+ {
664
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
665
+ paths: [
666
+ { path: "customization.createdDate" },
667
+ { path: "customization.updatedDate" },
668
+ {
669
+ path: "customization.choicesSettings.choices.image.urlExpirationDate"
670
+ }
671
+ ]
672
+ },
673
+ {
674
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
675
+ paths: [
676
+ {
677
+ path: "customization.choicesSettings.choices.image.focalPoint.x"
678
+ },
679
+ {
680
+ path: "customization.choicesSettings.choices.image.focalPoint.y"
681
+ }
682
+ ]
683
+ }
684
+ ])
685
+ };
686
+ return metadata;
687
+ }
688
+ return __reorderCustomizationChoices;
689
+ }
645
690
  function bulkAddCustomizationChoices(payload) {
646
691
  function __bulkAddCustomizationChoices({ host }) {
647
692
  const serializedData = (0, import_transform_paths.transformPaths)(payload, [
@@ -779,26 +824,22 @@ var import_image2 = require("@wix/sdk-runtime/transformations/image");
779
824
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
780
825
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
781
826
  var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
782
- CustomizationType2["UNKNOWN_CUSTOMIZATION_TYPE"] = "UNKNOWN_CUSTOMIZATION_TYPE";
783
827
  CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
784
828
  CustomizationType2["MODIFIER"] = "MODIFIER";
785
829
  return CustomizationType2;
786
830
  })(CustomizationType || {});
787
831
  var CustomizationRenderType = /* @__PURE__ */ ((CustomizationRenderType2) => {
788
- CustomizationRenderType2["UNKNOWN_CUSTOMIZATION_RENDER_TYPE"] = "UNKNOWN_CUSTOMIZATION_RENDER_TYPE";
789
832
  CustomizationRenderType2["FREE_TEXT"] = "FREE_TEXT";
790
833
  CustomizationRenderType2["TEXT_CHOICES"] = "TEXT_CHOICES";
791
834
  CustomizationRenderType2["SWATCH_CHOICES"] = "SWATCH_CHOICES";
792
835
  return CustomizationRenderType2;
793
836
  })(CustomizationRenderType || {});
794
837
  var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
795
- ChoiceType2["UNKNOWN_CHOICE_TYPE"] = "UNKNOWN_CHOICE_TYPE";
796
838
  ChoiceType2["CHOICE_TEXT"] = "CHOICE_TEXT";
797
839
  ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
798
840
  return ChoiceType2;
799
841
  })(ChoiceType || {});
800
842
  var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
801
- ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
802
843
  ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
803
844
  ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
804
845
  ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
@@ -806,7 +847,6 @@ var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
806
847
  return ChoiceSortStrategy2;
807
848
  })(ChoiceSortStrategy || {});
808
849
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
809
- RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
810
850
  RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
811
851
  return RequestedFields2;
812
852
  })(RequestedFields || {});
@@ -1287,6 +1327,48 @@ async function updateCustomizationChoices2(customizationId, revision, options) {
1287
1327
  throw transformedError;
1288
1328
  }
1289
1329
  }
1330
+ async function reorderCustomizationChoices2(customizationId, revision, options) {
1331
+ const { httpClient, sideEffects } = arguments[3];
1332
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
1333
+ customizationId,
1334
+ revision,
1335
+ choiceIds: options?.choiceIds,
1336
+ fields: options?.fields
1337
+ });
1338
+ const reqOpts = reorderCustomizationChoices(
1339
+ payload
1340
+ );
1341
+ sideEffects?.onSiteCall?.();
1342
+ try {
1343
+ const result = await httpClient.request(reqOpts);
1344
+ sideEffects?.onSuccess?.(result);
1345
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
1346
+ (0, import_transform_paths2.transformPaths)(result.data, [
1347
+ {
1348
+ transformFn: import_image2.transformRESTImageToSDKImage,
1349
+ paths: [{ path: "customization.choicesSettings.choices.image" }]
1350
+ }
1351
+ ])
1352
+ );
1353
+ } catch (err) {
1354
+ const transformedError = (0, import_transform_error.transformError)(
1355
+ err,
1356
+ {
1357
+ spreadPathsToArguments: {},
1358
+ explicitPathsToArguments: {
1359
+ customizationId: "$[0]",
1360
+ revision: "$[1]",
1361
+ choiceIds: "$[2].choiceIds",
1362
+ fields: "$[2].fields"
1363
+ },
1364
+ singleArgumentUnchanged: false
1365
+ },
1366
+ ["customizationId", "revision", "options"]
1367
+ );
1368
+ sideEffects?.onError?.(err);
1369
+ throw transformedError;
1370
+ }
1371
+ }
1290
1372
  async function bulkAddCustomizationChoices2(customizationsChoices, options) {
1291
1373
  const { httpClient, sideEffects } = arguments[2];
1292
1374
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -1407,6 +1489,7 @@ async function bulkUpdateCustomizations2(customizations, options) {
1407
1489
  getCustomization,
1408
1490
  queryCustomizations,
1409
1491
  removeCustomizationChoices,
1492
+ reorderCustomizationChoices,
1410
1493
  setCustomizationChoices,
1411
1494
  typedQueryCustomizations,
1412
1495
  updateCustomization,