@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 };
@@ -599,6 +599,50 @@ function updateCustomizationChoices(payload) {
599
599
  }
600
600
  return __updateCustomizationChoices;
601
601
  }
602
+ function reorderCustomizationChoices(payload) {
603
+ function __reorderCustomizationChoices({ host }) {
604
+ const metadata = {
605
+ entityFqdn: "wix.stores.catalog.v3.customization",
606
+ method: "POST",
607
+ methodFqn: "wix.stores.catalog.customization.v3.CustomizationService.ReorderCustomizationChoices",
608
+ packageName: PACKAGE_NAME,
609
+ migrationOptions: {
610
+ optInTransformResponse: true
611
+ },
612
+ url: resolveWixStoresCatalogCustomizationV3CustomizationServiceUrl({
613
+ protoPath: "/v3/customizations/{customizationId}/reorder-choices",
614
+ data: payload,
615
+ host
616
+ }),
617
+ data: payload,
618
+ transformResponse: (payload2) => transformPaths(payload2, [
619
+ {
620
+ transformFn: transformRESTTimestampToSDKTimestamp,
621
+ paths: [
622
+ { path: "customization.createdDate" },
623
+ { path: "customization.updatedDate" },
624
+ {
625
+ path: "customization.choicesSettings.choices.image.urlExpirationDate"
626
+ }
627
+ ]
628
+ },
629
+ {
630
+ transformFn: transformRESTFloatToSDKFloat,
631
+ paths: [
632
+ {
633
+ path: "customization.choicesSettings.choices.image.focalPoint.x"
634
+ },
635
+ {
636
+ path: "customization.choicesSettings.choices.image.focalPoint.y"
637
+ }
638
+ ]
639
+ }
640
+ ])
641
+ };
642
+ return metadata;
643
+ }
644
+ return __reorderCustomizationChoices;
645
+ }
602
646
  function bulkAddCustomizationChoices(payload) {
603
647
  function __bulkAddCustomizationChoices({ host }) {
604
648
  const serializedData = transformPaths(payload, [
@@ -736,26 +780,22 @@ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/i
736
780
  import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
737
781
  import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
738
782
  var CustomizationType = /* @__PURE__ */ ((CustomizationType2) => {
739
- CustomizationType2["UNKNOWN_CUSTOMIZATION_TYPE"] = "UNKNOWN_CUSTOMIZATION_TYPE";
740
783
  CustomizationType2["PRODUCT_OPTION"] = "PRODUCT_OPTION";
741
784
  CustomizationType2["MODIFIER"] = "MODIFIER";
742
785
  return CustomizationType2;
743
786
  })(CustomizationType || {});
744
787
  var CustomizationRenderType = /* @__PURE__ */ ((CustomizationRenderType2) => {
745
- CustomizationRenderType2["UNKNOWN_CUSTOMIZATION_RENDER_TYPE"] = "UNKNOWN_CUSTOMIZATION_RENDER_TYPE";
746
788
  CustomizationRenderType2["FREE_TEXT"] = "FREE_TEXT";
747
789
  CustomizationRenderType2["TEXT_CHOICES"] = "TEXT_CHOICES";
748
790
  CustomizationRenderType2["SWATCH_CHOICES"] = "SWATCH_CHOICES";
749
791
  return CustomizationRenderType2;
750
792
  })(CustomizationRenderType || {});
751
793
  var ChoiceType = /* @__PURE__ */ ((ChoiceType2) => {
752
- ChoiceType2["UNKNOWN_CHOICE_TYPE"] = "UNKNOWN_CHOICE_TYPE";
753
794
  ChoiceType2["CHOICE_TEXT"] = "CHOICE_TEXT";
754
795
  ChoiceType2["ONE_COLOR"] = "ONE_COLOR";
755
796
  return ChoiceType2;
756
797
  })(ChoiceType || {});
757
798
  var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
758
- ChoiceSortStrategy2["UNKNOWN_CHOICE_SORT_STRATEGY"] = "UNKNOWN_CHOICE_SORT_STRATEGY";
759
799
  ChoiceSortStrategy2["DEFAULT"] = "DEFAULT";
760
800
  ChoiceSortStrategy2["BY_NAME"] = "BY_NAME";
761
801
  ChoiceSortStrategy2["BY_PRODUCT_COUNT"] = "BY_PRODUCT_COUNT";
@@ -763,7 +803,6 @@ var ChoiceSortStrategy = /* @__PURE__ */ ((ChoiceSortStrategy2) => {
763
803
  return ChoiceSortStrategy2;
764
804
  })(ChoiceSortStrategy || {});
765
805
  var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
766
- RequestedFields2["UNKNOWN_REQUESTED_FIELD"] = "UNKNOWN_REQUESTED_FIELD";
767
806
  RequestedFields2["ASSIGNED_PRODUCTS_COUNT"] = "ASSIGNED_PRODUCTS_COUNT";
768
807
  return RequestedFields2;
769
808
  })(RequestedFields || {});
@@ -1244,6 +1283,48 @@ async function updateCustomizationChoices2(customizationId, revision, options) {
1244
1283
  throw transformedError;
1245
1284
  }
1246
1285
  }
1286
+ async function reorderCustomizationChoices2(customizationId, revision, options) {
1287
+ const { httpClient, sideEffects } = arguments[3];
1288
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1289
+ customizationId,
1290
+ revision,
1291
+ choiceIds: options?.choiceIds,
1292
+ fields: options?.fields
1293
+ });
1294
+ const reqOpts = reorderCustomizationChoices(
1295
+ payload
1296
+ );
1297
+ sideEffects?.onSiteCall?.();
1298
+ try {
1299
+ const result = await httpClient.request(reqOpts);
1300
+ sideEffects?.onSuccess?.(result);
1301
+ return renameKeysFromRESTResponseToSDKResponse(
1302
+ transformPaths2(result.data, [
1303
+ {
1304
+ transformFn: transformRESTImageToSDKImage,
1305
+ paths: [{ path: "customization.choicesSettings.choices.image" }]
1306
+ }
1307
+ ])
1308
+ );
1309
+ } catch (err) {
1310
+ const transformedError = sdkTransformError(
1311
+ err,
1312
+ {
1313
+ spreadPathsToArguments: {},
1314
+ explicitPathsToArguments: {
1315
+ customizationId: "$[0]",
1316
+ revision: "$[1]",
1317
+ choiceIds: "$[2].choiceIds",
1318
+ fields: "$[2].fields"
1319
+ },
1320
+ singleArgumentUnchanged: false
1321
+ },
1322
+ ["customizationId", "revision", "options"]
1323
+ );
1324
+ sideEffects?.onError?.(err);
1325
+ throw transformedError;
1326
+ }
1327
+ }
1247
1328
  async function bulkAddCustomizationChoices2(customizationsChoices, options) {
1248
1329
  const { httpClient, sideEffects } = arguments[2];
1249
1330
  const payload = transformPaths2(
@@ -1363,6 +1444,7 @@ export {
1363
1444
  getCustomization2 as getCustomization,
1364
1445
  queryCustomizations2 as queryCustomizations,
1365
1446
  removeCustomizationChoices2 as removeCustomizationChoices,
1447
+ reorderCustomizationChoices2 as reorderCustomizationChoices,
1366
1448
  setCustomizationChoices2 as setCustomizationChoices,
1367
1449
  typedQueryCustomizations,
1368
1450
  updateCustomization2 as updateCustomization,