@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;
@@ -152,7 +150,7 @@ interface ChoicesSettings {
152
150
  */
153
151
  choices?: Choice[];
154
152
  /**
155
- * Strategy for sorting choices.
153
+ * Strategy for sorting choices in storefront filter panels. Use [Update Customization](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/customizations-v3/update-customization) to change this value.
156
154
  *
157
155
  * Default: `DEFAULT`
158
156
  * @internal
@@ -227,14 +225,13 @@ interface ChoiceValueOneOf {
227
225
  colorCode?: string;
228
226
  }
229
227
  declare enum ChoiceType {
230
- UNKNOWN_CHOICE_TYPE = "UNKNOWN_CHOICE_TYPE",
231
228
  /** For a `customizationRenderType` of `TEXT_CHOICES`. */
232
229
  CHOICE_TEXT = "CHOICE_TEXT",
233
230
  /** For `customizationRenderType: SWATCH_CHOICES`. */
234
231
  ONE_COLOR = "ONE_COLOR"
235
232
  }
236
233
  /** @enumType */
237
- type ChoiceTypeWithLiterals = ChoiceType | 'UNKNOWN_CHOICE_TYPE' | 'CHOICE_TEXT' | 'ONE_COLOR';
234
+ type ChoiceTypeWithLiterals = ChoiceType | 'CHOICE_TEXT' | 'ONE_COLOR';
238
235
  interface MultipleColors {
239
236
  /**
240
237
  * A list of color codes.
@@ -256,18 +253,17 @@ interface FocalPoint {
256
253
  width?: number | null;
257
254
  }
258
255
  declare enum ChoiceSortStrategy {
259
- UNKNOWN_CHOICE_SORT_STRATEGY = "UNKNOWN_CHOICE_SORT_STRATEGY",
260
- /** Text choices are sorted by name, and swatch choices are sorted by the number of matching products. */
256
+ /** Default. Text choices are sorted by name, swatch choices are sorted by product count. */
261
257
  DEFAULT = "DEFAULT",
262
- /** Sort choices alphabetically by name, case-insensitive, with numeric values first. */
258
+ /** Alphabetically by name, case-insensitive. Numeric values are sorted first. */
263
259
  BY_NAME = "BY_NAME",
264
- /** Sort choices by the number of products assigned to each choice, in descending order. */
260
+ /** By the number of products assigned to each choice, in descending order. */
265
261
  BY_PRODUCT_COUNT = "BY_PRODUCT_COUNT",
266
- /** Sort choices by their order in the choices list. */
262
+ /** 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. */
267
263
  MANUAL = "MANUAL"
268
264
  }
269
265
  /** @enumType */
270
- type ChoiceSortStrategyWithLiterals = ChoiceSortStrategy | 'UNKNOWN_CHOICE_SORT_STRATEGY' | 'DEFAULT' | 'BY_NAME' | 'BY_PRODUCT_COUNT' | 'MANUAL';
266
+ type ChoiceSortStrategyWithLiterals = ChoiceSortStrategy | 'DEFAULT' | 'BY_NAME' | 'BY_PRODUCT_COUNT' | 'MANUAL';
271
267
  interface InvalidateCache extends InvalidateCacheGetByOneOf {
272
268
  /**
273
269
  * Invalidate by msId. NOT recommended, as this will invalidate the entire site cache!
@@ -448,13 +444,11 @@ interface GetCustomizationRequest {
448
444
  fields?: RequestedFieldsWithLiterals[];
449
445
  }
450
446
  declare enum RequestedFields {
451
- /** Unknown requested field. */
452
- UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
453
447
  /** Assigned products count. */
454
448
  ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT"
455
449
  }
456
450
  /** @enumType */
457
- type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'ASSIGNED_PRODUCTS_COUNT';
451
+ type RequestedFieldsWithLiterals = RequestedFields | 'ASSIGNED_PRODUCTS_COUNT';
458
452
  interface GetCustomizationResponse {
459
453
  /** Customization. */
460
454
  customization?: Customization;
@@ -800,6 +794,40 @@ interface UpdateCustomizationChoicesResponse {
800
794
  /** Updated customization. */
801
795
  customization?: Customization;
802
796
  }
797
+ interface ReorderCustomizationChoicesRequest {
798
+ /**
799
+ * Customization ID.
800
+ * @format GUID
801
+ */
802
+ customizationId: string;
803
+ /** 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. */
804
+ revision: string;
805
+ /**
806
+ * 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.
807
+ * @format GUID
808
+ * @minSize 1
809
+ * @maxSize 200
810
+ */
811
+ choiceIds: string[];
812
+ /**
813
+ * Fields to include in the response.
814
+ *
815
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
816
+ * @maxSize 100
817
+ */
818
+ fields?: RequestedFieldsWithLiterals[];
819
+ }
820
+ interface ReorderCustomizationChoicesResponse {
821
+ /** Updated customization. */
822
+ customization?: Customization;
823
+ }
824
+ /** Additional error details returned with the `CHOICE_IDS_MISMATCH` error. */
825
+ interface ChoiceIdsMismatchData {
826
+ /** Choice IDs that exist in the customization but are missing from the request. */
827
+ missingIds?: string[];
828
+ /** Choice IDs included in the request that don't exist in the customization. */
829
+ extraIds?: string[];
830
+ }
803
831
  interface BulkAddCustomizationChoicesRequest {
804
832
  /**
805
833
  * List of customization IDs and choices.
@@ -1200,6 +1228,16 @@ type UpdateCustomizationChoicesValidationErrors = {
1200
1228
  ruleName?: 'PARENT_CHOICE_HIERARCHY_VIOLATION';
1201
1229
  };
1202
1230
  /** @docsIgnore */
1231
+ type ReorderCustomizationChoicesApplicationErrors = {
1232
+ code?: 'DOESNT_SUPPORT_CHOICES';
1233
+ description?: string;
1234
+ data?: Record<string, any>;
1235
+ } | {
1236
+ code?: 'CHOICE_IDS_MISMATCH';
1237
+ description?: string;
1238
+ data?: ChoiceIdsMismatchData;
1239
+ };
1240
+ /** @docsIgnore */
1203
1241
  type BulkAddCustomizationChoicesApplicationErrors = {
1204
1242
  code?: 'CHOICES_LIMIT_EXCEEDED';
1205
1243
  description?: string;
@@ -1847,6 +1885,40 @@ interface UpdateCustomizationChoicesOptions {
1847
1885
  */
1848
1886
  fields?: RequestedFieldsWithLiterals[];
1849
1887
  }
1888
+ /**
1889
+ * Reorders a customization's choices. The new order is persisted and reflected in the customization's choices list.
1890
+ *
1891
+ * To control how choices are sorted in storefront filter panels, use [Update Customization](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/customizations-v3/update-customization) to set the `choicesSettings.sortOrder` field.
1892
+ * @param customizationId - Customization ID.
1893
+ * @param revision - 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.
1894
+ * @internal
1895
+ * @documentationMaturity preview
1896
+ * @requiredField customizationId
1897
+ * @requiredField options.choiceIds
1898
+ * @requiredField revision
1899
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
1900
+ * @applicableIdentity APP
1901
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.ReorderCustomizationChoices
1902
+ */
1903
+ declare function reorderCustomizationChoices(customizationId: string, revision: string, options?: NonNullablePaths<ReorderCustomizationChoicesOptions, `choiceIds`, 2>): Promise<NonNullablePaths<ReorderCustomizationChoicesResponse, `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> & {
1904
+ __applicationErrorsType?: ReorderCustomizationChoicesApplicationErrors;
1905
+ }>;
1906
+ interface ReorderCustomizationChoicesOptions {
1907
+ /**
1908
+ * 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.
1909
+ * @format GUID
1910
+ * @minSize 1
1911
+ * @maxSize 200
1912
+ */
1913
+ choiceIds: string[];
1914
+ /**
1915
+ * Fields to include in the response.
1916
+ *
1917
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1918
+ * @maxSize 100
1919
+ */
1920
+ fields?: RequestedFieldsWithLiterals[];
1921
+ }
1850
1922
  /**
1851
1923
  * Adds choices to multiple customizations.
1852
1924
  * @param customizationsChoices - List of customization IDs and choices.
@@ -1910,4 +1982,4 @@ interface BulkUpdateCustomizationsOptions {
1910
1982
  fields?: RequestedFieldsWithLiterals[];
1911
1983
  }
1912
1984
 
1913
- 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, updateCustomizationChoices, utils };
1985
+ 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, reorderCustomizationChoices, setCustomizationChoices, typedQueryCustomizations, updateCustomization, updateCustomizationChoices, 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,