@wix/auto_sdk_stores_customizations-v-3 1.0.23 → 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 +2 -2
- package/build/cjs/{stores-catalog-v3-customization-customizations-v-3.universal-DHhFp3oV.d.ts → index.typings.d.ts} +302 -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 +2 -2
- package/build/es/{stores-catalog-v3-customization-customizations-v-3.universal-DHhFp3oV.d.mts → index.typings.d.mts} +302 -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 +2 -2
- package/build/internal/cjs/{stores-catalog-v3-customization-customizations-v-3.universal-DHhFp3oV.d.ts → index.typings.d.ts} +302 -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 +2 -2
- package/build/internal/es/{stores-catalog-v3-customization-customizations-v-3.universal-DHhFp3oV.d.mts → index.typings.d.mts} +302 -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
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { Customization, CreateCustomizationApplicationErrors, CreateCustomizationValidationErrors, GetCustomizationOptions, UpdateCustomization, UpdateCustomizationOptions, DeleteCustomizationValidationErrors, QueryCustomizationsOptions, CustomizationsQueryBuilder, BulkCreateCustomizationsOptions, BulkCreateCustomizationsResponse, BulkCreateCustomizationsApplicationErrors, BulkCreateCustomizationsValidationErrors, Choice, AddCustomizationChoicesOptions, AddCustomizationChoicesResponse, AddCustomizationChoicesApplicationErrors, AddCustomizationChoicesValidationErrors, SetCustomizationChoicesOptions, SetCustomizationChoicesResponse, SetCustomizationChoicesApplicationErrors, SetCustomizationChoicesValidationErrors, RemoveCustomizationChoicesOptions, RemoveCustomizationChoicesResponse, RemoveCustomizationChoicesApplicationErrors, RemoveCustomizationChoicesValidationErrors, CustomizationChoices, BulkAddCustomizationChoicesOptions, BulkAddCustomizationChoicesResponse, BulkAddCustomizationChoicesApplicationErrors, BulkAddCustomizationChoicesValidationErrors, MaskedCustomization, BulkUpdateCustomizationsOptions, BulkUpdateCustomizationsResponse, CustomizationCreatedEnvelope, CustomizationDeletedEnvelope, CustomizationUpdatedEnvelope } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, AddCustomizationChoicesRequest, App, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkAddCustomizationChoicesRequest, BulkCreateCustomizationsRequest, BulkCustomizationResult, BulkUpdateCustomizationsRequest, ChoiceType, ChoiceValueOneOf, ChoicesSettings, CreateCustomizationRequest, CreateCustomizationResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, CustomTag, CustomizationCustomizationSettingsOneOf, CustomizationIdsWrapper, CustomizationRenderType, CustomizationType, CustomizationsQueryResult, DeleteCustomizationRequest, DeleteCustomizationResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, File, FocalPoint, FreeTextSettings, GetCustomizationRequest, GetCustomizationResponse, IdentificationData, IdentificationDataIdOneOf, InvalidateCache, InvalidateCacheGetByOneOf, ItemMetadata, MessageEnvelope, MultipleColors, Page, QueryCustomizationsRequest, QueryCustomizationsResponse, RemoveCustomizationChoicesRequest, RequestedFields, RestoreInfo, SetCustomizationChoicesRequest, SortOrder, Sorting, URI, UpdateCustomizationRequest, UpdateCustomizationResponse, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createCustomization$1(httpClient: HttpClient): CreateCustomizationSignature;
|
|
6
6
|
interface CreateCustomizationSignature {
|
|
@@ -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.
|
|
@@ -1016,14 +1018,144 @@ interface CustomizationCreatedEnvelope {
|
|
|
1016
1018
|
entity: Customization;
|
|
1017
1019
|
metadata: EventMetadata;
|
|
1018
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;
|
|
1019
1053
|
interface CustomizationDeletedEnvelope {
|
|
1020
1054
|
entity: Customization;
|
|
1021
1055
|
metadata: EventMetadata;
|
|
1022
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;
|
|
1023
1089
|
interface CustomizationUpdatedEnvelope {
|
|
1024
1090
|
entity: Customization;
|
|
1025
1091
|
metadata: EventMetadata;
|
|
1026
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>>;
|
|
1027
1159
|
interface GetCustomizationOptions {
|
|
1028
1160
|
/**
|
|
1029
1161
|
* Fields to include in the response.
|
|
@@ -1033,6 +1165,24 @@ interface GetCustomizationOptions {
|
|
|
1033
1165
|
*/
|
|
1034
1166
|
fields?: RequestedFieldsWithLiterals[];
|
|
1035
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>>;
|
|
1036
1186
|
interface UpdateCustomization {
|
|
1037
1187
|
/**
|
|
1038
1188
|
* Free text input settings.
|
|
@@ -1107,6 +1257,45 @@ interface UpdateCustomizationOptions {
|
|
|
1107
1257
|
*/
|
|
1108
1258
|
fields?: RequestedFieldsWithLiterals[];
|
|
1109
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;
|
|
1110
1299
|
interface QueryCustomizationsOptions {
|
|
1111
1300
|
/**
|
|
1112
1301
|
* Fields to include in the response.
|
|
@@ -1193,6 +1382,22 @@ interface CustomizationsQueryBuilder {
|
|
|
1193
1382
|
/** @documentationMaturity preview */
|
|
1194
1383
|
find: () => Promise<CustomizationsQueryResult>;
|
|
1195
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
|
+
}>;
|
|
1196
1401
|
interface BulkCreateCustomizationsOptions {
|
|
1197
1402
|
/**
|
|
1198
1403
|
* Whether to return the full customization entities in the response.
|
|
@@ -1201,6 +1406,24 @@ interface BulkCreateCustomizationsOptions {
|
|
|
1201
1406
|
*/
|
|
1202
1407
|
returnEntity?: boolean;
|
|
1203
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
|
+
}>;
|
|
1204
1427
|
interface AddCustomizationChoicesOptions {
|
|
1205
1428
|
/**
|
|
1206
1429
|
* Fields to include in the response.
|
|
@@ -1210,6 +1433,26 @@ interface AddCustomizationChoicesOptions {
|
|
|
1210
1433
|
*/
|
|
1211
1434
|
fields?: RequestedFieldsWithLiterals[];
|
|
1212
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
|
+
}>;
|
|
1213
1456
|
interface SetCustomizationChoicesOptions {
|
|
1214
1457
|
/**
|
|
1215
1458
|
* Fields to include in the response.
|
|
@@ -1219,6 +1462,26 @@ interface SetCustomizationChoicesOptions {
|
|
|
1219
1462
|
*/
|
|
1220
1463
|
fields?: RequestedFieldsWithLiterals[];
|
|
1221
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
|
+
}>;
|
|
1222
1485
|
interface RemoveCustomizationChoicesOptions {
|
|
1223
1486
|
/** Customization revision. */
|
|
1224
1487
|
revision?: string;
|
|
@@ -1230,6 +1493,24 @@ interface RemoveCustomizationChoicesOptions {
|
|
|
1230
1493
|
*/
|
|
1231
1494
|
fields?: RequestedFieldsWithLiterals[];
|
|
1232
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
|
+
}>;
|
|
1233
1514
|
interface BulkAddCustomizationChoicesOptions {
|
|
1234
1515
|
/**
|
|
1235
1516
|
* Whether to return the full customization entities in the response.
|
|
@@ -1245,6 +1526,26 @@ interface BulkAddCustomizationChoicesOptions {
|
|
|
1245
1526
|
*/
|
|
1246
1527
|
fields?: RequestedFieldsWithLiterals[];
|
|
1247
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`>>;
|
|
1248
1549
|
interface BulkUpdateCustomizationsOptions {
|
|
1249
1550
|
/**
|
|
1250
1551
|
* Whether to return the full customization entities in the response.
|
|
@@ -1261,4 +1562,4 @@ interface BulkUpdateCustomizationsOptions {
|
|
|
1261
1562
|
fields?: RequestedFieldsWithLiterals[];
|
|
1262
1563
|
}
|
|
1263
1564
|
|
|
1264
|
-
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 };
|