@wix/auto_sdk_stores_customizations-v-3 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.context.d.ts +31 -0
  11. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.context.js +40 -0
  12. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.context.js.map +1 -0
  13. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.http.d.ts +63 -0
  14. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.http.js +683 -0
  15. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.http.js.map +1 -0
  16. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.meta.d.ts +35 -0
  17. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.meta.js +237 -0
  18. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.meta.js.map +1 -0
  19. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.public.d.ts +130 -0
  20. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.public.js +126 -0
  21. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.public.js.map +1 -0
  22. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.types.d.ts +736 -0
  23. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.types.js +51 -0
  24. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.types.js.map +1 -0
  25. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.universal.d.ts +1281 -0
  26. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.universal.js +764 -0
  27. package/build/cjs/src/stores-catalog-v3-customization-customizations-v-3.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.context.d.ts +31 -0
  39. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.context.js +31 -0
  40. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.context.js.map +1 -0
  41. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.http.d.ts +63 -0
  42. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.http.js +669 -0
  43. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.http.js.map +1 -0
  44. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.meta.d.ts +35 -0
  45. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.meta.js +200 -0
  46. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.meta.js.map +1 -0
  47. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.public.d.ts +130 -0
  48. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.public.js +106 -0
  49. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.public.js.map +1 -0
  50. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.types.d.ts +736 -0
  51. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.types.js +48 -0
  52. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.types.js.map +1 -0
  53. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.universal.d.ts +1281 -0
  54. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.universal.js +727 -0
  55. package/build/es/src/stores-catalog-v3-customization-customizations-v-3.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.context.d.ts +31 -0
  66. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.context.js +40 -0
  67. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.context.js.map +1 -0
  68. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.http.d.ts +63 -0
  69. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.http.js +683 -0
  70. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.http.js.map +1 -0
  71. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.meta.d.ts +35 -0
  72. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.meta.js +237 -0
  73. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.meta.js.map +1 -0
  74. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.public.d.ts +130 -0
  75. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.public.js +126 -0
  76. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.public.js.map +1 -0
  77. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.types.d.ts +736 -0
  78. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.types.js +51 -0
  79. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.types.js.map +1 -0
  80. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.universal.d.ts +1281 -0
  81. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.universal.js +764 -0
  82. package/build/internal/cjs/src/stores-catalog-v3-customization-customizations-v-3.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.context.d.ts +31 -0
  93. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.context.js +31 -0
  94. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.context.js.map +1 -0
  95. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.http.d.ts +63 -0
  96. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.http.js +669 -0
  97. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.http.js.map +1 -0
  98. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.meta.d.ts +35 -0
  99. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.meta.js +200 -0
  100. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.meta.js.map +1 -0
  101. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.public.d.ts +130 -0
  102. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.public.js +106 -0
  103. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.public.js.map +1 -0
  104. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.types.d.ts +736 -0
  105. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.types.js +48 -0
  106. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.types.js.map +1 -0
  107. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.universal.d.ts +1281 -0
  108. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.universal.js +727 -0
  109. package/build/internal/es/src/stores-catalog-v3-customization-customizations-v-3.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1281 @@
1
+ /**
2
+ * Customizations include options and modifiers which can later be applied to products.
3
+ * Options are designed to add variations to a product, where modifiers add a customizable change to the product but without creating another variant.
4
+ */
5
+ export interface Customization extends CustomizationCustomizationSettingsOneOf {
6
+ /**
7
+ * Free text input settings.
8
+ *
9
+ * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`.
10
+ */
11
+ freeTextInput?: FreeTextSettings;
12
+ /**
13
+ * Choices settings.
14
+ *
15
+ * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`.
16
+ */
17
+ choicesSettings?: ChoicesSettings;
18
+ /**
19
+ * Customization ID.
20
+ * @readonly
21
+ */
22
+ _id?: string | null;
23
+ /**
24
+ * Revision number, which increments by 1 each time the customization is updated.
25
+ * To prevent conflicting changes,
26
+ * the current revision must be passed when updating the customization.
27
+ *
28
+ * Ignored when creating a customization.
29
+ * @readonly
30
+ */
31
+ revision?: string | null;
32
+ /**
33
+ * Date and time the customization was created.
34
+ * @readonly
35
+ */
36
+ _createdDate?: Date | null;
37
+ /**
38
+ * Date and time the customization was updated.
39
+ * @readonly
40
+ */
41
+ _updatedDate?: Date | null;
42
+ /** Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`). */
43
+ name?: string;
44
+ /** Customization type. */
45
+ customizationType?: CustomizationType;
46
+ /**
47
+ * Customization render type.
48
+ *
49
+ * Defines how the customization will be displayed in the storefront.
50
+ */
51
+ customizationRenderType?: CustomizationRenderType;
52
+ /**
53
+ * Number of products this customization is assigned to.
54
+ * > **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.
55
+ * @readonly
56
+ */
57
+ assignedProductsCount?: number | null;
58
+ }
59
+ /** @oneof */
60
+ export interface CustomizationCustomizationSettingsOneOf {
61
+ /**
62
+ * Free text input settings.
63
+ *
64
+ * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`.
65
+ */
66
+ freeTextInput?: FreeTextSettings;
67
+ /**
68
+ * Choices settings.
69
+ *
70
+ * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`.
71
+ */
72
+ choicesSettings?: ChoicesSettings;
73
+ }
74
+ export declare enum CustomizationType {
75
+ UNKNOWN_CUSTOMIZATION_TYPE = "UNKNOWN_CUSTOMIZATION_TYPE",
76
+ PRODUCT_OPTION = "PRODUCT_OPTION",
77
+ MODIFIER = "MODIFIER"
78
+ }
79
+ export declare enum CustomizationRenderType {
80
+ UNKNOWN_CUSTOMIZATION_RENDER_TYPE = "UNKNOWN_CUSTOMIZATION_RENDER_TYPE",
81
+ FREE_TEXT = "FREE_TEXT",
82
+ TEXT_CHOICES = "TEXT_CHOICES",
83
+ SWATCH_CHOICES = "SWATCH_CHOICES"
84
+ }
85
+ export interface FreeTextSettings {
86
+ /** Minimum text character length. */
87
+ minCharCount?: number;
88
+ /** Maximum text character length. */
89
+ maxCharCount?: number;
90
+ /** Default amount added to a product's price when this choice is assigned to a modifier. */
91
+ defaultAddedPrice?: string | null;
92
+ /** Title to display to customer for their free-text input. */
93
+ title?: string;
94
+ }
95
+ export interface ChoicesSettings {
96
+ /** List of choices. */
97
+ choices?: Choice[];
98
+ }
99
+ export interface Choice extends ChoiceValueOneOf {
100
+ /** Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color). */
101
+ colorCode?: string;
102
+ /**
103
+ * Choice ID.
104
+ * @readonly
105
+ */
106
+ _id?: string;
107
+ /**
108
+ * Choice type.
109
+ *
110
+ * > **Notes:**
111
+ * > + For `customizationRenderType: SWATCH_CHOICES`, the supported `choiceType` values are: `ONE_COLOR`, `MULTIPLE_COLORS`, or `IMAGE`.
112
+ * > + For a `customizationRenderType` of `TEXT_CHOICES` and `FREE_TEXT`, the supported `choiceType` value is: `CHOICE_TEXT`.
113
+ */
114
+ choiceType?: ChoiceType;
115
+ /**
116
+ * A read-only key generated based on choice name. Used for eCommerce integration.
117
+ * @readonly
118
+ */
119
+ key?: string | null;
120
+ /** Choice name. */
121
+ name?: string;
122
+ /** Default amount added to a product's price when this customization is assigned to a modifier. */
123
+ defaultAddedPrice?: string | null;
124
+ /**
125
+ * Number of products this choice is assigned to .
126
+ * @readonly
127
+ */
128
+ assignedProductsCount?: number;
129
+ }
130
+ /** @oneof */
131
+ export interface ChoiceValueOneOf {
132
+ /** Color code in HEX format, [as described by MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color). */
133
+ colorCode?: string;
134
+ }
135
+ export declare enum ChoiceType {
136
+ UNKNOWN_CHOICE_TYPE = "UNKNOWN_CHOICE_TYPE",
137
+ /** For a `customizationRenderType` of `TEXT_CHOICES` and `FREE_TEXT`. */
138
+ CHOICE_TEXT = "CHOICE_TEXT",
139
+ /** For `customizationRenderType: SWATCH_CHOICES`. */
140
+ ONE_COLOR = "ONE_COLOR",
141
+ /** For `customizationRenderType: SWATCH_CHOICES`. */
142
+ MULTIPLE_COLORS = "MULTIPLE_COLORS",
143
+ /** For `customizationRenderType: SWATCH_CHOICES`. */
144
+ IMAGE = "IMAGE"
145
+ }
146
+ export interface MultipleColors {
147
+ /** A list of color codes. */
148
+ colorCodes?: string[];
149
+ }
150
+ export interface FocalPoint {
151
+ /** X-coordinate of the focal point. */
152
+ x?: number;
153
+ /** Y-coordinate of the focal point. */
154
+ y?: number;
155
+ /** crop by height */
156
+ height?: number | null;
157
+ /** crop by width */
158
+ width?: number | null;
159
+ }
160
+ export interface InvalidateCache extends InvalidateCacheGetByOneOf {
161
+ /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
162
+ metaSiteId?: string;
163
+ /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
164
+ siteId?: string;
165
+ /** Invalidate by App */
166
+ app?: App;
167
+ /** Invalidate by page id */
168
+ page?: Page;
169
+ /** Invalidate by URI path */
170
+ uri?: URI;
171
+ /** Invalidate by file (for media files such as PDFs) */
172
+ file?: File;
173
+ /** tell us why you're invalidating the cache. You don't need to add your app name */
174
+ reason?: string | null;
175
+ /** Is local DS */
176
+ localDc?: boolean;
177
+ hardPurge?: boolean;
178
+ }
179
+ /** @oneof */
180
+ export interface InvalidateCacheGetByOneOf {
181
+ /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
182
+ metaSiteId?: string;
183
+ /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
184
+ siteId?: string;
185
+ /** Invalidate by App */
186
+ app?: App;
187
+ /** Invalidate by page id */
188
+ page?: Page;
189
+ /** Invalidate by URI path */
190
+ uri?: URI;
191
+ /** Invalidate by file (for media files such as PDFs) */
192
+ file?: File;
193
+ }
194
+ export interface App {
195
+ /** The AppDefId */
196
+ appDefId?: string;
197
+ /** The instance Id */
198
+ instanceId?: string;
199
+ }
200
+ export interface Page {
201
+ /** the msid the page is on */
202
+ metaSiteId?: string;
203
+ /** Invalidate by Page ID */
204
+ pageId?: string;
205
+ }
206
+ export interface URI {
207
+ /** the msid the URI is on */
208
+ metaSiteId?: string;
209
+ /** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
210
+ uriPath?: string;
211
+ }
212
+ export interface File {
213
+ /** the msid the file is related to */
214
+ metaSiteId?: string;
215
+ /** Invalidate by filename (for media files such as PDFs) */
216
+ fileName?: string;
217
+ }
218
+ export interface CreateCustomizationRequest {
219
+ /** Customization to create. */
220
+ customization: Customization;
221
+ }
222
+ export interface CreateCustomizationResponse {
223
+ /** Created customization. */
224
+ customization?: Customization;
225
+ }
226
+ export interface GetCustomizationRequest {
227
+ /** Customization ID. */
228
+ customizationId: string;
229
+ /**
230
+ * Fields to include in the response.
231
+ *
232
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
233
+ */
234
+ fields?: RequestedFields[];
235
+ }
236
+ export declare enum RequestedFields {
237
+ /** Unknown requested field. */
238
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
239
+ /** Assigned products count. */
240
+ ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT"
241
+ }
242
+ export interface GetCustomizationResponse {
243
+ /** Customization. */
244
+ customization?: Customization;
245
+ }
246
+ export interface UpdateCustomizationRequest {
247
+ /** Customization to update. */
248
+ customization: Customization;
249
+ /**
250
+ * Fields to include in the response.
251
+ *
252
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
253
+ */
254
+ fields?: RequestedFields[];
255
+ }
256
+ export interface UpdateCustomizationResponse {
257
+ /** Updated customization. */
258
+ customization?: Customization;
259
+ }
260
+ export interface DeleteCustomizationRequest {
261
+ /** Customization ID. */
262
+ customizationId: string;
263
+ }
264
+ export interface DeleteCustomizationResponse {
265
+ }
266
+ export interface QueryCustomizationsRequest {
267
+ /** Query options. */
268
+ query?: CursorQuery;
269
+ /**
270
+ * Fields to include in the response.
271
+ *
272
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
273
+ */
274
+ fields?: RequestedFields[];
275
+ }
276
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
277
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
278
+ cursorPaging?: CursorPaging;
279
+ /**
280
+ * Filter object in the following format:
281
+ * `"filter" : {
282
+ * "fieldName1": "value1",
283
+ * "fieldName2":{"$operator":"value2"}
284
+ * }`
285
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
286
+ */
287
+ filter?: Record<string, any> | null;
288
+ /**
289
+ * Sort object in the following format:
290
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
291
+ */
292
+ sort?: Sorting[];
293
+ }
294
+ /** @oneof */
295
+ export interface CursorQueryPagingMethodOneOf {
296
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
297
+ cursorPaging?: CursorPaging;
298
+ }
299
+ export interface Sorting {
300
+ /** Name of the field to sort by. */
301
+ fieldName?: string;
302
+ /** Sort order. */
303
+ order?: SortOrder;
304
+ }
305
+ export declare enum SortOrder {
306
+ /** Ascending order. */
307
+ ASC = "ASC",
308
+ /** Descending order. */
309
+ DESC = "DESC"
310
+ }
311
+ export interface CursorPaging {
312
+ /** Maximum number of items to return in the results. */
313
+ limit?: number | null;
314
+ /**
315
+ * Pointer to the next or previous page in the list of results.
316
+ *
317
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
318
+ * Not relevant for the first request.
319
+ */
320
+ cursor?: string | null;
321
+ }
322
+ export interface QueryCustomizationsResponse {
323
+ /** List of customizations. */
324
+ customizations?: Customization[];
325
+ /** Details on the paged set of results returned. */
326
+ pagingMetadata?: CursorPagingMetadata;
327
+ }
328
+ export interface CursorPagingMetadata {
329
+ /** Number of items returned in the response. */
330
+ count?: number | null;
331
+ /** Cursor strings that point to the next page, previous page, or both. */
332
+ cursors?: Cursors;
333
+ /**
334
+ * Whether there are more pages to retrieve following the current page.
335
+ *
336
+ * + `true`: Another page of results can be retrieved.
337
+ * + `false`: This is the last page.
338
+ */
339
+ hasNext?: boolean | null;
340
+ }
341
+ export interface Cursors {
342
+ /** Cursor string pointing to the next page in the list of results. */
343
+ next?: string | null;
344
+ /** Cursor pointing to the previous page in the list of results. */
345
+ prev?: string | null;
346
+ }
347
+ export interface BulkCreateCustomizationsRequest {
348
+ /** Customizations to create. */
349
+ customizations: Customization[];
350
+ /**
351
+ * Whether to return the full customization entities in the response.
352
+ *
353
+ * Default: `false`
354
+ */
355
+ returnEntity?: boolean;
356
+ }
357
+ export interface BulkCreateCustomizationsResponse {
358
+ /** Customizations created by bulk action. */
359
+ results?: BulkCustomizationResult[];
360
+ /** Bulk action metadata. */
361
+ bulkActionMetadata?: BulkActionMetadata;
362
+ }
363
+ export interface BulkCustomizationResult {
364
+ /** Bulk action metadata for customization. */
365
+ itemMetadata?: ItemMetadata;
366
+ /**
367
+ * Full customization entity.
368
+ *
369
+ * Returned only if `returnEntity: true` is passed in the request.
370
+ */
371
+ customization?: Customization;
372
+ }
373
+ export interface ItemMetadata {
374
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
375
+ _id?: string | null;
376
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
377
+ originalIndex?: number;
378
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
379
+ success?: boolean;
380
+ /** Details about the error in case of failure. */
381
+ error?: ApplicationError;
382
+ }
383
+ export interface ApplicationError {
384
+ /** Error code. */
385
+ code?: string;
386
+ /** Description of the error. */
387
+ description?: string;
388
+ /** Data related to the error. */
389
+ data?: Record<string, any> | null;
390
+ }
391
+ export interface BulkActionMetadata {
392
+ /** Number of items that were successfully processed. */
393
+ totalSuccesses?: number;
394
+ /** Number of items that couldn't be processed. */
395
+ totalFailures?: number;
396
+ /** Number of failures without details because detailed failure threshold was exceeded. */
397
+ undetailedFailures?: number;
398
+ }
399
+ export interface CustomizationIdsWrapper {
400
+ /**
401
+ * list of all the customization ids that are invalid
402
+ * e.g list of failed choices ids
403
+ */
404
+ customizationIds?: string[];
405
+ }
406
+ export interface AddCustomizationChoicesRequest {
407
+ /** Customization ID. */
408
+ customizationId: string;
409
+ /** Choices to add. */
410
+ choices: Choice[];
411
+ /**
412
+ * Fields to include in the response.
413
+ *
414
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
415
+ */
416
+ fields?: RequestedFields[];
417
+ }
418
+ export interface AddCustomizationChoicesResponse {
419
+ /** Updated customization. */
420
+ customization?: Customization;
421
+ }
422
+ export interface SetCustomizationChoicesRequest {
423
+ /** Customization ID. */
424
+ customizationId: string;
425
+ /** Choices to set. */
426
+ choices: Choice[];
427
+ /**
428
+ * Fields to include in the response.
429
+ *
430
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
431
+ */
432
+ fields?: RequestedFields[];
433
+ }
434
+ export interface SetCustomizationChoicesResponse {
435
+ /** Updated customization. */
436
+ customization?: Customization;
437
+ }
438
+ export interface RemoveCustomizationChoicesRequest {
439
+ /** Customization ID. */
440
+ customizationId: string;
441
+ /** IDs of choices to remove. */
442
+ choiceIds: string[];
443
+ /** Customization revision. */
444
+ revision?: string;
445
+ /**
446
+ * Fields to include in the response.
447
+ *
448
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
449
+ */
450
+ fields?: RequestedFields[];
451
+ }
452
+ export interface RemoveCustomizationChoicesResponse {
453
+ /** Updated customization. */
454
+ customization?: Customization;
455
+ }
456
+ export interface BulkAddCustomizationChoicesRequest {
457
+ /** List of customization IDs and choices. */
458
+ customizationsChoices: CustomizationChoices[];
459
+ /**
460
+ * Whether to return the full customization entities in the response.
461
+ *
462
+ * Default: `false`
463
+ */
464
+ returnEntity?: boolean;
465
+ /**
466
+ * Fields to include in the response.
467
+ *
468
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
469
+ */
470
+ fields?: RequestedFields[];
471
+ }
472
+ export interface CustomizationChoices {
473
+ /** Customization ID. */
474
+ customizationId?: string;
475
+ /** Choices to add. */
476
+ choices?: Choice[];
477
+ }
478
+ export interface BulkAddCustomizationChoicesResponse {
479
+ /** Customizations updated by bulk action. */
480
+ results?: BulkCustomizationResult[];
481
+ /** Bulk action metadata. */
482
+ bulkActionMetadata?: BulkActionMetadata;
483
+ }
484
+ export interface BulkUpdateCustomizationsRequest {
485
+ /** List of customizations to update. */
486
+ customizations: MaskedCustomization[];
487
+ /**
488
+ * Whether to return the full customization entities in the response.
489
+ *
490
+ * Default: `false`
491
+ */
492
+ returnEntity?: boolean;
493
+ /**
494
+ * Fields to include in the response.
495
+ *
496
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
497
+ */
498
+ fields?: RequestedFields[];
499
+ }
500
+ export interface MaskedCustomization {
501
+ /** Customization to update. */
502
+ customization?: Customization;
503
+ }
504
+ export interface BulkUpdateCustomizationsResponse {
505
+ /** Customizations updated by bulk action. */
506
+ results?: BulkCustomizationResult[];
507
+ /** Bulk action metadata. */
508
+ bulkActionMetadata?: BulkActionMetadata;
509
+ }
510
+ export interface DomainEvent extends DomainEventBodyOneOf {
511
+ createdEvent?: EntityCreatedEvent;
512
+ updatedEvent?: EntityUpdatedEvent;
513
+ deletedEvent?: EntityDeletedEvent;
514
+ actionEvent?: ActionEvent;
515
+ /**
516
+ * Unique event ID.
517
+ * Allows clients to ignore duplicate webhooks.
518
+ */
519
+ _id?: string;
520
+ /**
521
+ * Assumes actions are also always typed to an entity_type
522
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
523
+ */
524
+ entityFqdn?: string;
525
+ /**
526
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
527
+ * This is although the created/updated/deleted notion is duplication of the oneof types
528
+ * Example: created/updated/deleted/started/completed/email_opened
529
+ */
530
+ slug?: string;
531
+ /** ID of the entity associated with the event. */
532
+ entityId?: string;
533
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
534
+ eventTime?: Date | null;
535
+ /**
536
+ * Whether the event was triggered as a result of a privacy regulation application
537
+ * (for example, GDPR).
538
+ */
539
+ triggeredByAnonymizeRequest?: boolean | null;
540
+ /** If present, indicates the action that triggered the event. */
541
+ originatedFrom?: string | null;
542
+ /**
543
+ * A sequence number defining the order of updates to the underlying entity.
544
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
545
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
546
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
547
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
548
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
549
+ */
550
+ entityEventSequence?: string | null;
551
+ }
552
+ /** @oneof */
553
+ export interface DomainEventBodyOneOf {
554
+ createdEvent?: EntityCreatedEvent;
555
+ updatedEvent?: EntityUpdatedEvent;
556
+ deletedEvent?: EntityDeletedEvent;
557
+ actionEvent?: ActionEvent;
558
+ }
559
+ export interface EntityCreatedEvent {
560
+ entity?: string;
561
+ }
562
+ export interface RestoreInfo {
563
+ deletedDate?: Date | null;
564
+ }
565
+ export interface EntityUpdatedEvent {
566
+ /**
567
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
568
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
569
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
570
+ */
571
+ currentEntity?: string;
572
+ }
573
+ export interface EntityDeletedEvent {
574
+ /** Entity that was deleted */
575
+ deletedEntity?: string | null;
576
+ }
577
+ export interface ActionEvent {
578
+ body?: string;
579
+ }
580
+ export interface Empty {
581
+ }
582
+ export interface MessageEnvelope {
583
+ /** App instance ID. */
584
+ instanceId?: string | null;
585
+ /** Event type. */
586
+ eventType?: string;
587
+ /** The identification type and identity data. */
588
+ identity?: IdentificationData;
589
+ /** Stringify payload. */
590
+ data?: string;
591
+ }
592
+ export interface IdentificationData extends IdentificationDataIdOneOf {
593
+ /** ID of a site visitor that has not logged in to the site. */
594
+ anonymousVisitorId?: string;
595
+ /** ID of a site visitor that has logged in to the site. */
596
+ memberId?: string;
597
+ /** ID of a Wix user (site owner, contributor, etc.). */
598
+ wixUserId?: string;
599
+ /** ID of an app. */
600
+ appId?: string;
601
+ /** @readonly */
602
+ identityType?: WebhookIdentityType;
603
+ }
604
+ /** @oneof */
605
+ export interface IdentificationDataIdOneOf {
606
+ /** ID of a site visitor that has not logged in to the site. */
607
+ anonymousVisitorId?: string;
608
+ /** ID of a site visitor that has logged in to the site. */
609
+ memberId?: string;
610
+ /** ID of a Wix user (site owner, contributor, etc.). */
611
+ wixUserId?: string;
612
+ /** ID of an app. */
613
+ appId?: string;
614
+ }
615
+ export declare enum WebhookIdentityType {
616
+ UNKNOWN = "UNKNOWN",
617
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
618
+ MEMBER = "MEMBER",
619
+ WIX_USER = "WIX_USER",
620
+ APP = "APP"
621
+ }
622
+ interface FreeTextSettingsNonNullableFields {
623
+ minCharCount: number;
624
+ maxCharCount: number;
625
+ title: string;
626
+ }
627
+ interface MultipleColorsNonNullableFields {
628
+ colorCodes: string[];
629
+ }
630
+ interface ChoiceNonNullableFields {
631
+ colorCode: string;
632
+ colorCodes?: MultipleColorsNonNullableFields;
633
+ image: string;
634
+ _id: string;
635
+ choiceType: ChoiceType;
636
+ name: string;
637
+ assignedProductsCount: number;
638
+ }
639
+ interface ChoicesSettingsNonNullableFields {
640
+ choices: ChoiceNonNullableFields[];
641
+ }
642
+ export interface CustomizationNonNullableFields {
643
+ freeTextInput?: FreeTextSettingsNonNullableFields;
644
+ choicesSettings?: ChoicesSettingsNonNullableFields;
645
+ name: string;
646
+ customizationType: CustomizationType;
647
+ customizationRenderType: CustomizationRenderType;
648
+ }
649
+ export interface CreateCustomizationResponseNonNullableFields {
650
+ customization?: CustomizationNonNullableFields;
651
+ }
652
+ export interface GetCustomizationResponseNonNullableFields {
653
+ customization?: CustomizationNonNullableFields;
654
+ }
655
+ export interface UpdateCustomizationResponseNonNullableFields {
656
+ customization?: CustomizationNonNullableFields;
657
+ }
658
+ export interface QueryCustomizationsResponseNonNullableFields {
659
+ customizations: CustomizationNonNullableFields[];
660
+ }
661
+ interface ApplicationErrorNonNullableFields {
662
+ code: string;
663
+ description: string;
664
+ }
665
+ interface ItemMetadataNonNullableFields {
666
+ originalIndex: number;
667
+ success: boolean;
668
+ error?: ApplicationErrorNonNullableFields;
669
+ }
670
+ interface BulkCustomizationResultNonNullableFields {
671
+ itemMetadata?: ItemMetadataNonNullableFields;
672
+ customization?: CustomizationNonNullableFields;
673
+ }
674
+ interface BulkActionMetadataNonNullableFields {
675
+ totalSuccesses: number;
676
+ totalFailures: number;
677
+ undetailedFailures: number;
678
+ }
679
+ export interface BulkCreateCustomizationsResponseNonNullableFields {
680
+ results: BulkCustomizationResultNonNullableFields[];
681
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
682
+ }
683
+ export interface AddCustomizationChoicesResponseNonNullableFields {
684
+ customization?: CustomizationNonNullableFields;
685
+ }
686
+ export interface SetCustomizationChoicesResponseNonNullableFields {
687
+ customization?: CustomizationNonNullableFields;
688
+ }
689
+ export interface RemoveCustomizationChoicesResponseNonNullableFields {
690
+ customization?: CustomizationNonNullableFields;
691
+ }
692
+ export interface BulkAddCustomizationChoicesResponseNonNullableFields {
693
+ results: BulkCustomizationResultNonNullableFields[];
694
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
695
+ }
696
+ export interface BulkUpdateCustomizationsResponseNonNullableFields {
697
+ results: BulkCustomizationResultNonNullableFields[];
698
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
699
+ }
700
+ export interface BaseEventMetadata {
701
+ /** App instance ID. */
702
+ instanceId?: string | null;
703
+ /** Event type. */
704
+ eventType?: string;
705
+ /** The identification type and identity data. */
706
+ identity?: IdentificationData;
707
+ }
708
+ export interface EventMetadata extends BaseEventMetadata {
709
+ /**
710
+ * Unique event ID.
711
+ * Allows clients to ignore duplicate webhooks.
712
+ */
713
+ _id?: string;
714
+ /**
715
+ * Assumes actions are also always typed to an entity_type
716
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
717
+ */
718
+ entityFqdn?: string;
719
+ /**
720
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
721
+ * This is although the created/updated/deleted notion is duplication of the oneof types
722
+ * Example: created/updated/deleted/started/completed/email_opened
723
+ */
724
+ slug?: string;
725
+ /** ID of the entity associated with the event. */
726
+ entityId?: string;
727
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
728
+ eventTime?: Date | null;
729
+ /**
730
+ * Whether the event was triggered as a result of a privacy regulation application
731
+ * (for example, GDPR).
732
+ */
733
+ triggeredByAnonymizeRequest?: boolean | null;
734
+ /** If present, indicates the action that triggered the event. */
735
+ originatedFrom?: string | null;
736
+ /**
737
+ * A sequence number defining the order of updates to the underlying entity.
738
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
739
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
740
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
741
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
742
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
743
+ */
744
+ entityEventSequence?: string | null;
745
+ }
746
+ export interface CustomizationCreatedEnvelope {
747
+ entity: Customization;
748
+ metadata: EventMetadata;
749
+ }
750
+ /**
751
+ * Triggered when a customization is created.
752
+ * @permissionScope Read v3 catalog
753
+ * @permissionScopeId SCOPE.STORES.CATALOG_READ
754
+ * @permissionScope Manage Products
755
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
756
+ * @permissionScope Read Products
757
+ * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
758
+ * @permissionScope Product write in v3 catalog
759
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
760
+ * @permissionScope Read customizations in v3 catalog
761
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ
762
+ * @permissionScope Manage v3 catalog
763
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
764
+ * @permissionScope Manage Orders
765
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
766
+ * @permissionId WIX_STORES.CUSTOMIZATION_READ
767
+ * @webhook
768
+ * @eventType wix.stores.catalog.v3.customization_created
769
+ * @documentationMaturity preview
770
+ */
771
+ export declare function onCustomizationCreated(handler: (event: CustomizationCreatedEnvelope) => void | Promise<void>): void;
772
+ export interface CustomizationDeletedEnvelope {
773
+ entity: Customization;
774
+ metadata: EventMetadata;
775
+ }
776
+ /**
777
+ * Triggered when a customization is deleted.
778
+ * @webhook
779
+ * @eventType wix.stores.catalog.v3.customization_deleted
780
+ * @documentationMaturity preview
781
+ */
782
+ export declare function onCustomizationDeleted(handler: (event: CustomizationDeletedEnvelope) => void | Promise<void>): void;
783
+ export interface CustomizationUpdatedEnvelope {
784
+ entity: Customization;
785
+ metadata: EventMetadata;
786
+ }
787
+ /**
788
+ * Triggered when a customization is updated.
789
+ * @webhook
790
+ * @eventType wix.stores.catalog.v3.customization_updated
791
+ * @documentationMaturity preview
792
+ */
793
+ export declare function onCustomizationUpdated(handler: (event: CustomizationUpdatedEnvelope) => void | Promise<void>): void;
794
+ /**
795
+ * Creates a customization.
796
+ * @param customization - Customization to create.
797
+ * @public
798
+ * @documentationMaturity preview
799
+ * @requiredField customization
800
+ * @requiredField customization.choicesSettings.choices
801
+ * @requiredField customization.customizationRenderType
802
+ * @requiredField customization.customizationType
803
+ * @requiredField customization.freeTextInput.title
804
+ * @requiredField customization.name
805
+ * @permissionId WIX_STORES.CUSTOMIZATION_CREATE
806
+ * @permissionScope Customization write in v3 catalog
807
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
808
+ * @permissionScope Manage Products
809
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
810
+ * @permissionScope Product write in v3 catalog
811
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
812
+ * @permissionScope Manage v3 catalog
813
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
814
+ * @applicableIdentity APP
815
+ * @returns Created customization.
816
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.CreateCustomization
817
+ */
818
+ export declare function createCustomization(customization: Customization): Promise<Customization & CustomizationNonNullableFields>;
819
+ /**
820
+ * Retrieves a customization.
821
+ * @param customizationId - Customization ID.
822
+ * @public
823
+ * @documentationMaturity preview
824
+ * @requiredField customizationId
825
+ * @permissionId WIX_STORES.CUSTOMIZATION_READ
826
+ * @permissionScope Read v3 catalog
827
+ * @permissionScopeId SCOPE.STORES.CATALOG_READ
828
+ * @permissionScope Manage Products
829
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
830
+ * @permissionScope Read Products
831
+ * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
832
+ * @permissionScope Product write in v3 catalog
833
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
834
+ * @permissionScope Read customizations in v3 catalog
835
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ
836
+ * @permissionScope Manage v3 catalog
837
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
838
+ * @permissionScope Manage Orders
839
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
840
+ * @applicableIdentity APP
841
+ * @applicableIdentity VISITOR
842
+ * @returns Customization.
843
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.GetCustomization
844
+ */
845
+ export declare function getCustomization(customizationId: string, options?: GetCustomizationOptions): Promise<Customization & CustomizationNonNullableFields>;
846
+ export interface GetCustomizationOptions {
847
+ /**
848
+ * Fields to include in the response.
849
+ *
850
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
851
+ */
852
+ fields?: RequestedFields[];
853
+ }
854
+ /**
855
+ * Updates a customization.
856
+ *
857
+ * Each time the customization is updated, `revision` increments by 1.
858
+ * The current `revision` must be passed when updating the customization.
859
+ * This ensures you're working with the latest customization and prevents unintended overwrites.
860
+ * @param _id - Customization ID.
861
+ * @public
862
+ * @documentationMaturity preview
863
+ * @requiredField _id
864
+ * @requiredField customization
865
+ * @requiredField customization.revision
866
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
867
+ * @permissionScope Customization write in v3 catalog
868
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
869
+ * @permissionScope Manage Products
870
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
871
+ * @permissionScope Product write in v3 catalog
872
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
873
+ * @permissionScope Manage v3 catalog
874
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
875
+ * @applicableIdentity APP
876
+ * @returns Updated customization.
877
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.UpdateCustomization
878
+ */
879
+ export declare function updateCustomization(_id: string | null, customization: UpdateCustomization, options?: UpdateCustomizationOptions): Promise<Customization & CustomizationNonNullableFields>;
880
+ export interface UpdateCustomization {
881
+ /**
882
+ * Free text input settings.
883
+ *
884
+ * > **Note:** To be passed along with `customizationRenderType: FREE_TEXT`.
885
+ */
886
+ freeTextInput?: FreeTextSettings;
887
+ /**
888
+ * Choices settings.
889
+ *
890
+ * > **Note:** Must be passed along with `customizationRenderType` of `SWATCH_CHOICES` and `TEXT_CHOICES`.
891
+ */
892
+ choicesSettings?: ChoicesSettings;
893
+ /**
894
+ * Customization ID.
895
+ * @readonly
896
+ */
897
+ _id?: string | null;
898
+ /**
899
+ * Revision number, which increments by 1 each time the customization is updated.
900
+ * To prevent conflicting changes,
901
+ * the current revision must be passed when updating the customization.
902
+ *
903
+ * Ignored when creating a customization.
904
+ * @readonly
905
+ */
906
+ revision?: string | null;
907
+ /**
908
+ * Date and time the customization was created.
909
+ * @readonly
910
+ */
911
+ _createdDate?: Date | null;
912
+ /**
913
+ * Date and time the customization was updated.
914
+ * @readonly
915
+ */
916
+ _updatedDate?: Date | null;
917
+ /** Customization name for options (for example, `"color"`, `"size"`) and modifiers (for example, `"greeting card"`). */
918
+ name?: string;
919
+ /** Customization type. */
920
+ customizationType?: CustomizationType;
921
+ /**
922
+ * Customization render type.
923
+ *
924
+ * Defines how the customization will be displayed in the storefront.
925
+ */
926
+ customizationRenderType?: CustomizationRenderType;
927
+ /**
928
+ * Number of products this customization is assigned to.
929
+ * > **Note:** Returned only when you pass `"ASSIGNED_PRODUCTS_COUNT"` to the `fields` array in Customizations API requests.
930
+ * @readonly
931
+ */
932
+ assignedProductsCount?: number | null;
933
+ }
934
+ export interface UpdateCustomizationOptions {
935
+ /**
936
+ * Fields to include in the response.
937
+ *
938
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
939
+ */
940
+ fields?: RequestedFields[];
941
+ }
942
+ /**
943
+ * Deletes a customization.
944
+ *
945
+ * > **Note:** A customization cannot be deleted if it is assigned to one or more products.
946
+ * @param customizationId - Customization ID.
947
+ * @public
948
+ * @documentationMaturity preview
949
+ * @requiredField customizationId
950
+ * @permissionId WIX_STORES.CUSTOMIZATION_DELETE
951
+ * @permissionScope Customization write in v3 catalog
952
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
953
+ * @permissionScope Manage Products
954
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
955
+ * @permissionScope Product write in v3 catalog
956
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
957
+ * @permissionScope Manage v3 catalog
958
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
959
+ * @applicableIdentity APP
960
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.DeleteCustomization
961
+ */
962
+ export declare function deleteCustomization(customizationId: string): Promise<void>;
963
+ /**
964
+ * Retrieves a list of up to 100 customizations, given the provided filtering, sorting, and cursor paging.
965
+ * Pass supported values to the `fields` array in the request to include those fields in the response.
966
+ *
967
+ *
968
+ * Query Customizations runs with these defaults, which you can override:
969
+ *
970
+ * - `createdDate` is sorted in `DESC` order
971
+ * - `cursorPaging.limit` is `100`
972
+ *
973
+ * For field support for filters and sorting,
974
+ * see [Customizations: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/customizations-v3/supported-filters-and-sorting).
975
+ *
976
+ * To learn about working with _Query_ endpoints, see
977
+ * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language),
978
+ * and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
979
+ * @public
980
+ * @documentationMaturity preview
981
+ * @permissionScope Read v3 catalog
982
+ * @permissionScopeId SCOPE.STORES.CATALOG_READ
983
+ * @permissionScope Manage Products
984
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
985
+ * @permissionScope Read Products
986
+ * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
987
+ * @permissionScope Product write in v3 catalog
988
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
989
+ * @permissionScope Read customizations in v3 catalog
990
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_READ
991
+ * @permissionScope Manage v3 catalog
992
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
993
+ * @permissionScope Manage Orders
994
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
995
+ * @permissionId WIX_STORES.CUSTOMIZATION_READ
996
+ * @applicableIdentity APP
997
+ * @applicableIdentity VISITOR
998
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.QueryCustomizations
999
+ */
1000
+ export declare function queryCustomizations(options?: QueryCustomizationsOptions): CustomizationsQueryBuilder;
1001
+ export interface QueryCustomizationsOptions {
1002
+ /**
1003
+ * Fields to include in the response.
1004
+ *
1005
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1006
+ */
1007
+ fields?: RequestedFields[] | undefined;
1008
+ }
1009
+ interface QueryCursorResult {
1010
+ cursors: Cursors;
1011
+ hasNext: () => boolean;
1012
+ hasPrev: () => boolean;
1013
+ length: number;
1014
+ pageSize: number;
1015
+ }
1016
+ export interface CustomizationsQueryResult extends QueryCursorResult {
1017
+ items: Customization[];
1018
+ query: CustomizationsQueryBuilder;
1019
+ next: () => Promise<CustomizationsQueryResult>;
1020
+ prev: () => Promise<CustomizationsQueryResult>;
1021
+ }
1022
+ export interface CustomizationsQueryBuilder {
1023
+ /** @param propertyName - Property whose value is compared with `value`.
1024
+ * @param value - Value to compare against.
1025
+ * @documentationMaturity preview
1026
+ */
1027
+ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any) => CustomizationsQueryBuilder;
1028
+ /** @param propertyName - Property whose value is compared with `value`.
1029
+ * @param value - Value to compare against.
1030
+ * @documentationMaturity preview
1031
+ */
1032
+ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any) => CustomizationsQueryBuilder;
1033
+ /** @param propertyName - Property whose value is compared with `value`.
1034
+ * @param value - Value to compare against.
1035
+ * @documentationMaturity preview
1036
+ */
1037
+ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder;
1038
+ /** @param propertyName - Property whose value is compared with `value`.
1039
+ * @param value - Value to compare against.
1040
+ * @documentationMaturity preview
1041
+ */
1042
+ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder;
1043
+ /** @param propertyName - Property whose value is compared with `value`.
1044
+ * @param value - Value to compare against.
1045
+ * @documentationMaturity preview
1046
+ */
1047
+ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder;
1048
+ /** @param propertyName - Property whose value is compared with `value`.
1049
+ * @param value - Value to compare against.
1050
+ * @documentationMaturity preview
1051
+ */
1052
+ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => CustomizationsQueryBuilder;
1053
+ /** @param propertyName - Property whose value is compared with `string`.
1054
+ * @param string - String to compare against. Case-insensitive.
1055
+ * @documentationMaturity preview
1056
+ */
1057
+ startsWith: (propertyName: '_id' | 'name', value: string) => CustomizationsQueryBuilder;
1058
+ /** @param propertyName - Property whose value is compared with `values`.
1059
+ * @param values - List of values to compare against.
1060
+ * @documentationMaturity preview
1061
+ */
1062
+ hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any[]) => CustomizationsQueryBuilder;
1063
+ /** @documentationMaturity preview */
1064
+ in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: any) => CustomizationsQueryBuilder;
1065
+ /** @documentationMaturity preview */
1066
+ exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name' | 'customizationType' | 'customizationRenderType', value: boolean) => CustomizationsQueryBuilder;
1067
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1068
+ * @documentationMaturity preview
1069
+ */
1070
+ ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'name'>) => CustomizationsQueryBuilder;
1071
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1072
+ * @documentationMaturity preview
1073
+ */
1074
+ descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'name'>) => CustomizationsQueryBuilder;
1075
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1076
+ * @documentationMaturity preview
1077
+ */
1078
+ limit: (limit: number) => CustomizationsQueryBuilder;
1079
+ /** @param cursor - A pointer to specific record
1080
+ * @documentationMaturity preview
1081
+ */
1082
+ skipTo: (cursor: string) => CustomizationsQueryBuilder;
1083
+ /** @documentationMaturity preview */
1084
+ find: () => Promise<CustomizationsQueryResult>;
1085
+ }
1086
+ /**
1087
+ * Creates multiple brands.
1088
+ * @param customizations - Customizations to create.
1089
+ * @public
1090
+ * @documentationMaturity preview
1091
+ * @requiredField customizations
1092
+ * @permissionId WIX_STORES.CUSTOMIZATION_CREATE
1093
+ * @permissionScope Customization write in v3 catalog
1094
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
1095
+ * @permissionScope Manage Products
1096
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
1097
+ * @permissionScope Product write in v3 catalog
1098
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
1099
+ * @permissionScope Manage v3 catalog
1100
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
1101
+ * @applicableIdentity APP
1102
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkCreateCustomizations
1103
+ */
1104
+ export declare function bulkCreateCustomizations(customizations: Customization[], options?: BulkCreateCustomizationsOptions): Promise<BulkCreateCustomizationsResponse & BulkCreateCustomizationsResponseNonNullableFields>;
1105
+ export interface BulkCreateCustomizationsOptions {
1106
+ /**
1107
+ * Whether to return the full customization entities in the response.
1108
+ *
1109
+ * Default: `false`
1110
+ */
1111
+ returnEntity?: boolean;
1112
+ }
1113
+ /**
1114
+ * Adds choices to a customization.
1115
+ * @param customizationId - Customization ID.
1116
+ * @param choices - Choices to add.
1117
+ * @public
1118
+ * @documentationMaturity preview
1119
+ * @requiredField choices
1120
+ * @requiredField customizationId
1121
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
1122
+ * @permissionScope Customization write in v3 catalog
1123
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
1124
+ * @permissionScope Manage Products
1125
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
1126
+ * @permissionScope Product write in v3 catalog
1127
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
1128
+ * @permissionScope Manage v3 catalog
1129
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
1130
+ * @applicableIdentity APP
1131
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.AddCustomizationChoices
1132
+ */
1133
+ export declare function addCustomizationChoices(customizationId: string, choices: Choice[], options?: AddCustomizationChoicesOptions): Promise<AddCustomizationChoicesResponse & AddCustomizationChoicesResponseNonNullableFields>;
1134
+ export interface AddCustomizationChoicesOptions {
1135
+ /**
1136
+ * Fields to include in the response.
1137
+ *
1138
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1139
+ */
1140
+ fields?: RequestedFields[];
1141
+ }
1142
+ /**
1143
+ * Sets a customization's choices. Any and all existing choices will be overridden.
1144
+ *
1145
+ * > **Note:** A choice cannot be overridden if it is assigned to one or more products.
1146
+ * @param customizationId - Customization ID.
1147
+ * @param choices - Choices to set.
1148
+ * @public
1149
+ * @documentationMaturity preview
1150
+ * @requiredField choices
1151
+ * @requiredField customizationId
1152
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
1153
+ * @permissionScope Customization write in v3 catalog
1154
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
1155
+ * @permissionScope Manage Products
1156
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
1157
+ * @permissionScope Product write in v3 catalog
1158
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
1159
+ * @permissionScope Manage v3 catalog
1160
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
1161
+ * @applicableIdentity APP
1162
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.SetCustomizationChoices
1163
+ */
1164
+ export declare function setCustomizationChoices(customizationId: string, choices: Choice[], options?: SetCustomizationChoicesOptions): Promise<SetCustomizationChoicesResponse & SetCustomizationChoicesResponseNonNullableFields>;
1165
+ export interface SetCustomizationChoicesOptions {
1166
+ /**
1167
+ * Fields to include in the response.
1168
+ *
1169
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1170
+ */
1171
+ fields?: RequestedFields[];
1172
+ }
1173
+ /**
1174
+ * Removes choices from a customization.
1175
+ *
1176
+ * +> **Note:** A choice cannot be removed if it is assigned to one or more products.
1177
+ * @param customizationId - Customization ID.
1178
+ * @param choiceIds - IDs of choices to remove.
1179
+ * @public
1180
+ * @documentationMaturity preview
1181
+ * @requiredField choiceIds
1182
+ * @requiredField customizationId
1183
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
1184
+ * @permissionScope Customization write in v3 catalog
1185
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
1186
+ * @permissionScope Manage Products
1187
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
1188
+ * @permissionScope Product write in v3 catalog
1189
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
1190
+ * @permissionScope Manage v3 catalog
1191
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
1192
+ * @applicableIdentity APP
1193
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.RemoveCustomizationChoices
1194
+ */
1195
+ export declare function removeCustomizationChoices(customizationId: string, choiceIds: string[], options?: RemoveCustomizationChoicesOptions): Promise<RemoveCustomizationChoicesResponse & RemoveCustomizationChoicesResponseNonNullableFields>;
1196
+ export interface RemoveCustomizationChoicesOptions {
1197
+ /** Customization revision. */
1198
+ revision?: string;
1199
+ /**
1200
+ * Fields to include in the response.
1201
+ *
1202
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1203
+ */
1204
+ fields?: RequestedFields[];
1205
+ }
1206
+ /**
1207
+ * Adds choices to multiple customizations.
1208
+ * @param customizationsChoices - List of customization IDs and choices.
1209
+ * @public
1210
+ * @documentationMaturity preview
1211
+ * @requiredField customizationsChoices
1212
+ * @requiredField customizationsChoices.choices
1213
+ * @requiredField customizationsChoices.customizationId
1214
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
1215
+ * @permissionScope Customization write in v3 catalog
1216
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
1217
+ * @permissionScope Manage Products
1218
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
1219
+ * @permissionScope Product write in v3 catalog
1220
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
1221
+ * @permissionScope Manage v3 catalog
1222
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
1223
+ * @applicableIdentity APP
1224
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkAddCustomizationChoices
1225
+ */
1226
+ export declare function bulkAddCustomizationChoices(customizationsChoices: CustomizationChoices[], options?: BulkAddCustomizationChoicesOptions): Promise<BulkAddCustomizationChoicesResponse & BulkAddCustomizationChoicesResponseNonNullableFields>;
1227
+ export interface BulkAddCustomizationChoicesOptions {
1228
+ /**
1229
+ * Whether to return the full customization entities in the response.
1230
+ *
1231
+ * Default: `false`
1232
+ */
1233
+ returnEntity?: boolean;
1234
+ /**
1235
+ * Fields to include in the response.
1236
+ *
1237
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1238
+ */
1239
+ fields?: RequestedFields[];
1240
+ }
1241
+ /**
1242
+ * Updates multiple customizations.
1243
+ *
1244
+ * Each time the customization is updated, `revision` increments by 1.
1245
+ * The current `revision` must be passed when updating the customization.
1246
+ * This ensures you're working with the latest customization and prevents unintended overwrites.
1247
+ * @param customizations - List of customizations to update.
1248
+ * @public
1249
+ * @documentationMaturity preview
1250
+ * @requiredField customizations
1251
+ * @requiredField customizations.customization._id
1252
+ * @requiredField customizations.customization.name
1253
+ * @requiredField customizations.customization.revision
1254
+ * @permissionId WIX_STORES.CUSTOMIZATION_UPDATE
1255
+ * @permissionScope Customization write in v3 catalog
1256
+ * @permissionScopeId SCOPE.STORES.CUSTOMIZATION_WRITE
1257
+ * @permissionScope Manage Products
1258
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
1259
+ * @permissionScope Product write in v3 catalog
1260
+ * @permissionScopeId SCOPE.STORES.PRODUCT_WRITE
1261
+ * @permissionScope Manage v3 catalog
1262
+ * @permissionScopeId SCOPE.STORES.CATALOG_WRITE
1263
+ * @applicableIdentity APP
1264
+ * @fqn wix.stores.catalog.customization.v3.CustomizationService.BulkUpdateCustomizations
1265
+ */
1266
+ export declare function bulkUpdateCustomizations(customizations: MaskedCustomization[], options?: BulkUpdateCustomizationsOptions): Promise<BulkUpdateCustomizationsResponse & BulkUpdateCustomizationsResponseNonNullableFields>;
1267
+ export interface BulkUpdateCustomizationsOptions {
1268
+ /**
1269
+ * Whether to return the full customization entities in the response.
1270
+ *
1271
+ * Default: `false`
1272
+ */
1273
+ returnEntity?: boolean;
1274
+ /**
1275
+ * Fields to include in the response.
1276
+ *
1277
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
1278
+ */
1279
+ fields?: RequestedFields[];
1280
+ }
1281
+ export {};