@wix/auto_sdk_stores_customizations-v-3 1.0.22 → 1.0.24
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.
- package/build/cjs/index.d.ts +29 -9
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{stores-catalog-v3-customization-customizations-v-3.universal-CT4feroB.d.ts → index.typings.d.ts} +409 -1
- package/build/cjs/index.typings.js +1208 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +29 -9
- package/build/es/index.mjs +1 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/{stores-catalog-v3-customization-customizations-v-3.universal-CT4feroB.d.mts → index.typings.d.mts} +409 -1
- package/build/es/index.typings.mjs +1168 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +29 -9
- package/build/internal/cjs/index.js +1 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{stores-catalog-v3-customization-customizations-v-3.universal-CT4feroB.d.ts → index.typings.d.ts} +409 -1
- package/build/internal/cjs/index.typings.js +1208 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +2 -1
- package/build/internal/es/index.d.mts +29 -9
- package/build/internal/es/index.mjs +1 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{stores-catalog-v3-customization-customizations-v-3.universal-CT4feroB.d.mts → index.typings.d.mts} +409 -1
- package/build/internal/es/index.typings.mjs +1168 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +2 -1
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Customizations include options and modifiers which can later be applied to products.
|
|
3
5
|
* Options are designed to add variations to a product, where modifiers add a customizable change to the product but without creating another variant.
|
|
@@ -861,6 +863,113 @@ declare enum WebhookIdentityType {
|
|
|
861
863
|
}
|
|
862
864
|
/** @enumType */
|
|
863
865
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
866
|
+
type CreateCustomizationApplicationErrors = {
|
|
867
|
+
code?: 'OPTIONS_LIMIT_EXCEEDED';
|
|
868
|
+
description?: string;
|
|
869
|
+
data?: Record<string, any>;
|
|
870
|
+
} | {
|
|
871
|
+
code?: 'MODIFIERS_LIMIT_EXCEEDED';
|
|
872
|
+
description?: string;
|
|
873
|
+
data?: Record<string, any>;
|
|
874
|
+
} | {
|
|
875
|
+
code?: 'INVALID_CUSTOMIZATION_RENDER_TYPE';
|
|
876
|
+
description?: string;
|
|
877
|
+
data?: Record<string, any>;
|
|
878
|
+
} | {
|
|
879
|
+
code?: 'INVALID_FREE_TEXT_SETTINGS';
|
|
880
|
+
description?: string;
|
|
881
|
+
data?: Record<string, any>;
|
|
882
|
+
};
|
|
883
|
+
type CreateCustomizationValidationErrors = {
|
|
884
|
+
ruleName?: 'ONLY_SPACES_STRING_ERROR';
|
|
885
|
+
} | {
|
|
886
|
+
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
887
|
+
};
|
|
888
|
+
type DeleteCustomizationValidationErrors = {
|
|
889
|
+
ruleName?: 'NOT_ALLOWED_DELETE_CUSTOMIZATION_ASSIGNED_TO_PRODUCT';
|
|
890
|
+
};
|
|
891
|
+
type BulkCreateCustomizationsApplicationErrors = {
|
|
892
|
+
code?: 'OPTIONS_LIMIT_EXCEEDED';
|
|
893
|
+
description?: string;
|
|
894
|
+
data?: Record<string, any>;
|
|
895
|
+
} | {
|
|
896
|
+
code?: 'MODIFIERS_LIMIT_EXCEEDED';
|
|
897
|
+
description?: string;
|
|
898
|
+
data?: Record<string, any>;
|
|
899
|
+
} | {
|
|
900
|
+
code?: 'DOESNT_SUPPORT_CHOICES';
|
|
901
|
+
description?: string;
|
|
902
|
+
data?: Record<string, any>;
|
|
903
|
+
} | {
|
|
904
|
+
code?: 'CHOICES_LIMIT_EXCEEDED';
|
|
905
|
+
description?: string;
|
|
906
|
+
data?: CustomizationIdsWrapper;
|
|
907
|
+
};
|
|
908
|
+
type BulkCreateCustomizationsValidationErrors = {
|
|
909
|
+
ruleName?: 'ONLY_SPACES_STRING_ERROR';
|
|
910
|
+
} | {
|
|
911
|
+
ruleName?: 'INVALID_CHOICE_TYPE';
|
|
912
|
+
} | {
|
|
913
|
+
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
914
|
+
} | {
|
|
915
|
+
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
916
|
+
};
|
|
917
|
+
type AddCustomizationChoicesApplicationErrors = {
|
|
918
|
+
code?: 'CHOICES_LIMIT_EXCEEDED';
|
|
919
|
+
description?: string;
|
|
920
|
+
data?: Record<string, any>;
|
|
921
|
+
} | {
|
|
922
|
+
code?: 'DOESNT_SUPPORT_CHOICES';
|
|
923
|
+
description?: string;
|
|
924
|
+
data?: Record<string, any>;
|
|
925
|
+
};
|
|
926
|
+
type AddCustomizationChoicesValidationErrors = {
|
|
927
|
+
ruleName?: 'INVALID_CHOICE_TYPE';
|
|
928
|
+
} | {
|
|
929
|
+
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
930
|
+
} | {
|
|
931
|
+
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
932
|
+
};
|
|
933
|
+
type SetCustomizationChoicesApplicationErrors = {
|
|
934
|
+
code?: 'DOESNT_SUPPORT_CHOICES';
|
|
935
|
+
description?: string;
|
|
936
|
+
data?: Record<string, any>;
|
|
937
|
+
} | {
|
|
938
|
+
code?: 'CHOICES_LIMIT_EXCEEDED';
|
|
939
|
+
description?: string;
|
|
940
|
+
data?: CustomizationIdsWrapper;
|
|
941
|
+
};
|
|
942
|
+
type SetCustomizationChoicesValidationErrors = {
|
|
943
|
+
ruleName?: 'INVALID_CHOICE_TYPE';
|
|
944
|
+
} | {
|
|
945
|
+
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
946
|
+
} | {
|
|
947
|
+
ruleName?: 'NOT_ALLOWED_DELETE_CHOICE_ASSIGNED_TO_PRODUCT';
|
|
948
|
+
} | {
|
|
949
|
+
ruleName?: 'DUPLICATE_CHOICE_NAME';
|
|
950
|
+
};
|
|
951
|
+
type RemoveCustomizationChoicesApplicationErrors = {
|
|
952
|
+
code?: 'CHOICE_ASSIGNED_TO_PRODUCT';
|
|
953
|
+
description?: string;
|
|
954
|
+
data?: Record<string, any>;
|
|
955
|
+
};
|
|
956
|
+
type RemoveCustomizationChoicesValidationErrors = {
|
|
957
|
+
ruleName?: 'NOT_ALLOWED_CUSTOMIZATION_WITHOUT_CHOICES';
|
|
958
|
+
};
|
|
959
|
+
type BulkAddCustomizationChoicesApplicationErrors = {
|
|
960
|
+
code?: 'CHOICES_LIMIT_EXCEEDED';
|
|
961
|
+
description?: string;
|
|
962
|
+
data?: CustomizationIdsWrapper;
|
|
963
|
+
} | {
|
|
964
|
+
code?: 'DOESNT_SUPPORT_CHOICES';
|
|
965
|
+
description?: string;
|
|
966
|
+
data?: Record<string, any>;
|
|
967
|
+
};
|
|
968
|
+
type BulkAddCustomizationChoicesValidationErrors = {
|
|
969
|
+
ruleName?: 'INVALID_CHOICE_TYPE';
|
|
970
|
+
} | {
|
|
971
|
+
ruleName?: 'INVALID_CHOICE_VALUE';
|
|
972
|
+
};
|
|
864
973
|
interface BaseEventMetadata {
|
|
865
974
|
/**
|
|
866
975
|
* App instance ID.
|
|
@@ -909,14 +1018,144 @@ interface CustomizationCreatedEnvelope {
|
|
|
909
1018
|
entity: Customization;
|
|
910
1019
|
metadata: EventMetadata;
|
|
911
1020
|
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Triggered when a customization is created.
|
|
1023
|
+
* @permissionScope Manage Stores - all permissions
|
|
1024
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1025
|
+
* @permissionScope Manage Stores
|
|
1026
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1027
|
+
* @permissionScope Read v3 catalog
|
|
1028
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_READ
|
|
1029
|
+
* @permissionScope Manage Products
|
|
1030
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1031
|
+
* @permissionScope Read Stores - all read permissions
|
|
1032
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
1033
|
+
* @permissionScope Read Products
|
|
1034
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
1035
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1036
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1037
|
+
* @permissionScope Product write in v3 catalog
|
|
1038
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
|
|
1039
|
+
* @permissionScope Read customizations in v3 catalog
|
|
1040
|
+
* @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ
|
|
1041
|
+
* @permissionScope Manage v3 catalog
|
|
1042
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_WRITE
|
|
1043
|
+
* @permissionScope Manage Orders
|
|
1044
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
1045
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_READ
|
|
1046
|
+
* @webhook
|
|
1047
|
+
* @eventType wix.stores.catalog.v3.customization_created
|
|
1048
|
+
* @serviceIdentifier wix.stores.catalog.customization.v3.CustomizationService
|
|
1049
|
+
* @slug created
|
|
1050
|
+
* @documentationMaturity preview
|
|
1051
|
+
*/
|
|
1052
|
+
declare function onCustomizationCreated(handler: (event: CustomizationCreatedEnvelope) => void | Promise<void>): void;
|
|
912
1053
|
interface CustomizationDeletedEnvelope {
|
|
913
1054
|
entity: Customization;
|
|
914
1055
|
metadata: EventMetadata;
|
|
915
1056
|
}
|
|
1057
|
+
/**
|
|
1058
|
+
* Triggered when a customization is deleted.
|
|
1059
|
+
* @permissionScope Manage Stores - all permissions
|
|
1060
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1061
|
+
* @permissionScope Manage Stores
|
|
1062
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1063
|
+
* @permissionScope Read v3 catalog
|
|
1064
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_READ
|
|
1065
|
+
* @permissionScope Manage Products
|
|
1066
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1067
|
+
* @permissionScope Read Stores - all read permissions
|
|
1068
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
1069
|
+
* @permissionScope Read Products
|
|
1070
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
1071
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1072
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1073
|
+
* @permissionScope Product write in v3 catalog
|
|
1074
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
|
|
1075
|
+
* @permissionScope Read customizations in v3 catalog
|
|
1076
|
+
* @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ
|
|
1077
|
+
* @permissionScope Manage v3 catalog
|
|
1078
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_WRITE
|
|
1079
|
+
* @permissionScope Manage Orders
|
|
1080
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
1081
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_READ
|
|
1082
|
+
* @webhook
|
|
1083
|
+
* @eventType wix.stores.catalog.v3.customization_deleted
|
|
1084
|
+
* @serviceIdentifier wix.stores.catalog.customization.v3.CustomizationService
|
|
1085
|
+
* @slug deleted
|
|
1086
|
+
* @documentationMaturity preview
|
|
1087
|
+
*/
|
|
1088
|
+
declare function onCustomizationDeleted(handler: (event: CustomizationDeletedEnvelope) => void | Promise<void>): void;
|
|
916
1089
|
interface CustomizationUpdatedEnvelope {
|
|
917
1090
|
entity: Customization;
|
|
918
1091
|
metadata: EventMetadata;
|
|
919
1092
|
}
|
|
1093
|
+
/**
|
|
1094
|
+
* Triggered when a customization is updated.
|
|
1095
|
+
* @permissionScope Manage Stores - all permissions
|
|
1096
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1097
|
+
* @permissionScope Manage Stores
|
|
1098
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
1099
|
+
* @permissionScope Read v3 catalog
|
|
1100
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_READ
|
|
1101
|
+
* @permissionScope Manage Products
|
|
1102
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
1103
|
+
* @permissionScope Read Stores - all read permissions
|
|
1104
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
1105
|
+
* @permissionScope Read Products
|
|
1106
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
1107
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1108
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1109
|
+
* @permissionScope Product write in v3 catalog
|
|
1110
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
|
|
1111
|
+
* @permissionScope Read customizations in v3 catalog
|
|
1112
|
+
* @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ
|
|
1113
|
+
* @permissionScope Manage v3 catalog
|
|
1114
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_WRITE
|
|
1115
|
+
* @permissionScope Manage Orders
|
|
1116
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
1117
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_READ
|
|
1118
|
+
* @webhook
|
|
1119
|
+
* @eventType wix.stores.catalog.v3.customization_updated
|
|
1120
|
+
* @serviceIdentifier wix.stores.catalog.customization.v3.CustomizationService
|
|
1121
|
+
* @slug updated
|
|
1122
|
+
* @documentationMaturity preview
|
|
1123
|
+
*/
|
|
1124
|
+
declare function onCustomizationUpdated(handler: (event: CustomizationUpdatedEnvelope) => void | Promise<void>): void;
|
|
1125
|
+
type CustomizationNonNullablePaths = `freeTextInput.minCharCount` | `freeTextInput.maxCharCount` | `freeTextInput.title` | `choicesSettings.choices` | `choicesSettings.choices.${number}.colorCode` | `choicesSettings.choices.${number}._id` | `choicesSettings.choices.${number}.choiceType` | `choicesSettings.choices.${number}.name` | `choicesSettings.choices.${number}.assignedProductsCount` | `name` | `customizationType` | `customizationRenderType`;
|
|
1126
|
+
/**
|
|
1127
|
+
* Creates a customization.
|
|
1128
|
+
* @param customization - Customization to create.
|
|
1129
|
+
* @public
|
|
1130
|
+
* @documentationMaturity preview
|
|
1131
|
+
* @requiredField customization
|
|
1132
|
+
* @requiredField customization.choicesSettings.choices
|
|
1133
|
+
* @requiredField customization.customizationRenderType
|
|
1134
|
+
* @requiredField customization.customizationSettings
|
|
1135
|
+
* @requiredField customization.customizationType
|
|
1136
|
+
* @requiredField customization.name
|
|
1137
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_CREATE
|
|
1138
|
+
* @applicableIdentity APP
|
|
1139
|
+
* @returns Created customization.
|
|
1140
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.CreateCustomization
|
|
1141
|
+
*/
|
|
1142
|
+
declare function createCustomization(customization: NonNullablePaths<Customization, `choicesSettings.choices` | `customizationRenderType` | `customizationType` | `freeTextInput.title` | `name`>): Promise<NonNullablePaths<Customization, CustomizationNonNullablePaths> & {
|
|
1143
|
+
__applicationErrorsType?: CreateCustomizationApplicationErrors;
|
|
1144
|
+
__validationErrorsType?: CreateCustomizationValidationErrors;
|
|
1145
|
+
}>;
|
|
1146
|
+
/**
|
|
1147
|
+
* Retrieves a customization.
|
|
1148
|
+
* @param customizationId - Customization ID.
|
|
1149
|
+
* @public
|
|
1150
|
+
* @documentationMaturity preview
|
|
1151
|
+
* @requiredField customizationId
|
|
1152
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_READ
|
|
1153
|
+
* @applicableIdentity APP
|
|
1154
|
+
* @applicableIdentity VISITOR
|
|
1155
|
+
* @returns Customization.
|
|
1156
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.GetCustomization
|
|
1157
|
+
*/
|
|
1158
|
+
declare function getCustomization(customizationId: string, options?: GetCustomizationOptions): Promise<NonNullablePaths<Customization, CustomizationNonNullablePaths>>;
|
|
920
1159
|
interface GetCustomizationOptions {
|
|
921
1160
|
/**
|
|
922
1161
|
* Fields to include in the response.
|
|
@@ -926,6 +1165,24 @@ interface GetCustomizationOptions {
|
|
|
926
1165
|
*/
|
|
927
1166
|
fields?: RequestedFieldsWithLiterals[];
|
|
928
1167
|
}
|
|
1168
|
+
/**
|
|
1169
|
+
* Updates a customization.
|
|
1170
|
+
*
|
|
1171
|
+
* Each time the customization is updated, `revision` increments by 1.
|
|
1172
|
+
* The current `revision` must be passed when updating the customization.
|
|
1173
|
+
* This ensures you're working with the latest customization and prevents unintended overwrites.
|
|
1174
|
+
* @param _id - Customization ID.
|
|
1175
|
+
* @public
|
|
1176
|
+
* @documentationMaturity preview
|
|
1177
|
+
* @requiredField _id
|
|
1178
|
+
* @requiredField customization
|
|
1179
|
+
* @requiredField customization.revision
|
|
1180
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
|
|
1181
|
+
* @applicableIdentity APP
|
|
1182
|
+
* @returns Updated customization.
|
|
1183
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomization
|
|
1184
|
+
*/
|
|
1185
|
+
declare function updateCustomization(_id: string, customization: NonNullablePaths<UpdateCustomization, `revision`>, options?: UpdateCustomizationOptions): Promise<NonNullablePaths<Customization, CustomizationNonNullablePaths>>;
|
|
929
1186
|
interface UpdateCustomization {
|
|
930
1187
|
/**
|
|
931
1188
|
* Free text input settings.
|
|
@@ -1000,6 +1257,45 @@ interface UpdateCustomizationOptions {
|
|
|
1000
1257
|
*/
|
|
1001
1258
|
fields?: RequestedFieldsWithLiterals[];
|
|
1002
1259
|
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Deletes a customization.
|
|
1262
|
+
*
|
|
1263
|
+
* > **Note:** A customization cannot be deleted if it is assigned to one or more products.
|
|
1264
|
+
* @param customizationId - Customization ID.
|
|
1265
|
+
* @public
|
|
1266
|
+
* @documentationMaturity preview
|
|
1267
|
+
* @requiredField customizationId
|
|
1268
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_DELETE
|
|
1269
|
+
* @applicableIdentity APP
|
|
1270
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.DeleteCustomization
|
|
1271
|
+
*/
|
|
1272
|
+
declare function deleteCustomization(customizationId: string): Promise<void & {
|
|
1273
|
+
__validationErrorsType?: DeleteCustomizationValidationErrors;
|
|
1274
|
+
}>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Retrieves a list of up to 100 customizations, given the provided filtering, sorting, and cursor paging.
|
|
1277
|
+
* Pass supported values to the `fields` array in the request to include those fields in the response.
|
|
1278
|
+
*
|
|
1279
|
+
*
|
|
1280
|
+
* Query Customizations runs with these defaults, which you can override:
|
|
1281
|
+
*
|
|
1282
|
+
* - `createdDate` is sorted in `DESC` order
|
|
1283
|
+
* - `cursorPaging.limit` is `100`
|
|
1284
|
+
*
|
|
1285
|
+
* For field support for filters and sorting,
|
|
1286
|
+
* see [Customizations: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/customizations-v3/supported-filters-and-sorting).
|
|
1287
|
+
*
|
|
1288
|
+
* To learn about working with _Query_ endpoints, see
|
|
1289
|
+
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language),
|
|
1290
|
+
* and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
1291
|
+
* @public
|
|
1292
|
+
* @documentationMaturity preview
|
|
1293
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_READ
|
|
1294
|
+
* @applicableIdentity APP
|
|
1295
|
+
* @applicableIdentity VISITOR
|
|
1296
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations
|
|
1297
|
+
*/
|
|
1298
|
+
declare function queryCustomizations(options?: QueryCustomizationsOptions): CustomizationsQueryBuilder;
|
|
1003
1299
|
interface QueryCustomizationsOptions {
|
|
1004
1300
|
/**
|
|
1005
1301
|
* Fields to include in the response.
|
|
@@ -1086,6 +1382,22 @@ interface CustomizationsQueryBuilder {
|
|
|
1086
1382
|
/** @documentationMaturity preview */
|
|
1087
1383
|
find: () => Promise<CustomizationsQueryResult>;
|
|
1088
1384
|
}
|
|
1385
|
+
/**
|
|
1386
|
+
* Creates multiple brands.
|
|
1387
|
+
* @param customizations - Customizations to create.
|
|
1388
|
+
* @public
|
|
1389
|
+
* @documentationMaturity preview
|
|
1390
|
+
* @requiredField customizations
|
|
1391
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_CREATE
|
|
1392
|
+
* @applicableIdentity APP
|
|
1393
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkCreateCustomizations
|
|
1394
|
+
*/
|
|
1395
|
+
declare function bulkCreateCustomizations(customizations: Customization[], options?: BulkCreateCustomizationsOptions): Promise<NonNullablePaths<BulkCreateCustomizationsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
1396
|
+
[P in CustomizationNonNullablePaths]: `results.${number}.customization.${P}`;
|
|
1397
|
+
}[CustomizationNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`> & {
|
|
1398
|
+
__applicationErrorsType?: BulkCreateCustomizationsApplicationErrors;
|
|
1399
|
+
__validationErrorsType?: BulkCreateCustomizationsValidationErrors;
|
|
1400
|
+
}>;
|
|
1089
1401
|
interface BulkCreateCustomizationsOptions {
|
|
1090
1402
|
/**
|
|
1091
1403
|
* Whether to return the full customization entities in the response.
|
|
@@ -1094,6 +1406,24 @@ interface BulkCreateCustomizationsOptions {
|
|
|
1094
1406
|
*/
|
|
1095
1407
|
returnEntity?: boolean;
|
|
1096
1408
|
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Adds choices to a customization.
|
|
1411
|
+
* @param customizationId - Customization ID.
|
|
1412
|
+
* @param choices - Choices to add.
|
|
1413
|
+
* @public
|
|
1414
|
+
* @documentationMaturity preview
|
|
1415
|
+
* @requiredField choices
|
|
1416
|
+
* @requiredField customizationId
|
|
1417
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
|
|
1418
|
+
* @applicableIdentity APP
|
|
1419
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.AddCustomizationChoices
|
|
1420
|
+
*/
|
|
1421
|
+
declare function addCustomizationChoices(customizationId: string, choices: Choice[], options?: AddCustomizationChoicesOptions): Promise<NonNullablePaths<AddCustomizationChoicesResponse, {
|
|
1422
|
+
[P in CustomizationNonNullablePaths]: `customization.${P}`;
|
|
1423
|
+
}[CustomizationNonNullablePaths]> & {
|
|
1424
|
+
__applicationErrorsType?: AddCustomizationChoicesApplicationErrors;
|
|
1425
|
+
__validationErrorsType?: AddCustomizationChoicesValidationErrors;
|
|
1426
|
+
}>;
|
|
1097
1427
|
interface AddCustomizationChoicesOptions {
|
|
1098
1428
|
/**
|
|
1099
1429
|
* Fields to include in the response.
|
|
@@ -1103,6 +1433,26 @@ interface AddCustomizationChoicesOptions {
|
|
|
1103
1433
|
*/
|
|
1104
1434
|
fields?: RequestedFieldsWithLiterals[];
|
|
1105
1435
|
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Sets a customization's choices. Any and all existing choices will be overridden.
|
|
1438
|
+
*
|
|
1439
|
+
* > **Note:** A choice cannot be overridden if it is assigned to one or more products.
|
|
1440
|
+
* @param customizationId - Customization ID.
|
|
1441
|
+
* @param choices - Choices to set.
|
|
1442
|
+
* @public
|
|
1443
|
+
* @documentationMaturity preview
|
|
1444
|
+
* @requiredField choices
|
|
1445
|
+
* @requiredField customizationId
|
|
1446
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
|
|
1447
|
+
* @applicableIdentity APP
|
|
1448
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.SetCustomizationChoices
|
|
1449
|
+
*/
|
|
1450
|
+
declare function setCustomizationChoices(customizationId: string, choices: Choice[], options?: SetCustomizationChoicesOptions): Promise<NonNullablePaths<SetCustomizationChoicesResponse, {
|
|
1451
|
+
[P in CustomizationNonNullablePaths]: `customization.${P}`;
|
|
1452
|
+
}[CustomizationNonNullablePaths]> & {
|
|
1453
|
+
__applicationErrorsType?: SetCustomizationChoicesApplicationErrors;
|
|
1454
|
+
__validationErrorsType?: SetCustomizationChoicesValidationErrors;
|
|
1455
|
+
}>;
|
|
1106
1456
|
interface SetCustomizationChoicesOptions {
|
|
1107
1457
|
/**
|
|
1108
1458
|
* Fields to include in the response.
|
|
@@ -1112,6 +1462,26 @@ interface SetCustomizationChoicesOptions {
|
|
|
1112
1462
|
*/
|
|
1113
1463
|
fields?: RequestedFieldsWithLiterals[];
|
|
1114
1464
|
}
|
|
1465
|
+
/**
|
|
1466
|
+
* Removes choices from a customization.
|
|
1467
|
+
*
|
|
1468
|
+
* +> **Note:** A choice cannot be removed if it is assigned to one or more products.
|
|
1469
|
+
* @param customizationId - Customization ID.
|
|
1470
|
+
* @param choiceIds - IDs of choices to remove.
|
|
1471
|
+
* @public
|
|
1472
|
+
* @documentationMaturity preview
|
|
1473
|
+
* @requiredField choiceIds
|
|
1474
|
+
* @requiredField customizationId
|
|
1475
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
|
|
1476
|
+
* @applicableIdentity APP
|
|
1477
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.RemoveCustomizationChoices
|
|
1478
|
+
*/
|
|
1479
|
+
declare function removeCustomizationChoices(customizationId: string, choiceIds: string[], options?: RemoveCustomizationChoicesOptions): Promise<NonNullablePaths<RemoveCustomizationChoicesResponse, {
|
|
1480
|
+
[P in CustomizationNonNullablePaths]: `customization.${P}`;
|
|
1481
|
+
}[CustomizationNonNullablePaths]> & {
|
|
1482
|
+
__applicationErrorsType?: RemoveCustomizationChoicesApplicationErrors;
|
|
1483
|
+
__validationErrorsType?: RemoveCustomizationChoicesValidationErrors;
|
|
1484
|
+
}>;
|
|
1115
1485
|
interface RemoveCustomizationChoicesOptions {
|
|
1116
1486
|
/** Customization revision. */
|
|
1117
1487
|
revision?: string;
|
|
@@ -1123,6 +1493,24 @@ interface RemoveCustomizationChoicesOptions {
|
|
|
1123
1493
|
*/
|
|
1124
1494
|
fields?: RequestedFieldsWithLiterals[];
|
|
1125
1495
|
}
|
|
1496
|
+
/**
|
|
1497
|
+
* Adds choices to multiple customizations.
|
|
1498
|
+
* @param customizationsChoices - List of customization IDs and choices.
|
|
1499
|
+
* @public
|
|
1500
|
+
* @documentationMaturity preview
|
|
1501
|
+
* @requiredField customizationsChoices
|
|
1502
|
+
* @requiredField customizationsChoices.choices
|
|
1503
|
+
* @requiredField customizationsChoices.customizationId
|
|
1504
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
|
|
1505
|
+
* @applicableIdentity APP
|
|
1506
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkAddCustomizationChoices
|
|
1507
|
+
*/
|
|
1508
|
+
declare function bulkAddCustomizationChoices(customizationsChoices: NonNullablePaths<CustomizationChoices, `choices` | `customizationId`>[], options?: BulkAddCustomizationChoicesOptions): Promise<NonNullablePaths<BulkAddCustomizationChoicesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
1509
|
+
[P in CustomizationNonNullablePaths]: `results.${number}.customization.${P}`;
|
|
1510
|
+
}[CustomizationNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`> & {
|
|
1511
|
+
__applicationErrorsType?: BulkAddCustomizationChoicesApplicationErrors;
|
|
1512
|
+
__validationErrorsType?: BulkAddCustomizationChoicesValidationErrors;
|
|
1513
|
+
}>;
|
|
1126
1514
|
interface BulkAddCustomizationChoicesOptions {
|
|
1127
1515
|
/**
|
|
1128
1516
|
* Whether to return the full customization entities in the response.
|
|
@@ -1138,6 +1526,26 @@ interface BulkAddCustomizationChoicesOptions {
|
|
|
1138
1526
|
*/
|
|
1139
1527
|
fields?: RequestedFieldsWithLiterals[];
|
|
1140
1528
|
}
|
|
1529
|
+
/**
|
|
1530
|
+
* Updates multiple customizations.
|
|
1531
|
+
*
|
|
1532
|
+
* Each time the customization is updated, `revision` increments by 1.
|
|
1533
|
+
* The current `revision` must be passed when updating the customization.
|
|
1534
|
+
* This ensures you're working with the latest customization and prevents unintended overwrites.
|
|
1535
|
+
* @param customizations - List of customizations to update.
|
|
1536
|
+
* @public
|
|
1537
|
+
* @documentationMaturity preview
|
|
1538
|
+
* @requiredField customizations
|
|
1539
|
+
* @requiredField customizations.customization._id
|
|
1540
|
+
* @requiredField customizations.customization.name
|
|
1541
|
+
* @requiredField customizations.customization.revision
|
|
1542
|
+
* @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
|
|
1543
|
+
* @applicableIdentity APP
|
|
1544
|
+
* @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkUpdateCustomizations
|
|
1545
|
+
*/
|
|
1546
|
+
declare function bulkUpdateCustomizations(customizations: NonNullablePaths<MaskedCustomization, `customization._id` | `customization.name` | `customization.revision`>[], options?: BulkUpdateCustomizationsOptions): Promise<NonNullablePaths<BulkUpdateCustomizationsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
1547
|
+
[P in CustomizationNonNullablePaths]: `results.${number}.customization.${P}`;
|
|
1548
|
+
}[CustomizationNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
1141
1549
|
interface BulkUpdateCustomizationsOptions {
|
|
1142
1550
|
/**
|
|
1143
1551
|
* Whether to return the full customization entities in the response.
|
|
@@ -1154,4 +1562,4 @@ interface BulkUpdateCustomizationsOptions {
|
|
|
1154
1562
|
fields?: RequestedFieldsWithLiterals[];
|
|
1155
1563
|
}
|
|
1156
1564
|
|
|
1157
|
-
export { type
|
|
1565
|
+
export { 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 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 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, 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 QueryCustomizationsOptions, type QueryCustomizationsRequest, type QueryCustomizationsResponse, 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 UpdateCustomization, type UpdateCustomizationOptions, type UpdateCustomizationRequest, type UpdateCustomizationResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, addCustomizationChoices, bulkAddCustomizationChoices, bulkCreateCustomizations, bulkUpdateCustomizations, createCustomization, deleteCustomization, getCustomization, onCustomizationCreated, onCustomizationDeleted, onCustomizationUpdated, queryCustomizations, removeCustomizationChoices, setCustomizationChoices, updateCustomization };
|