@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,736 @@
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 Image {
151
+ /** WixMedia image ID. */
152
+ id?: string;
153
+ /** Image URL. */
154
+ url?: string;
155
+ /**
156
+ * Original image height.
157
+ * @readonly
158
+ */
159
+ height?: number;
160
+ /**
161
+ * Original image width.
162
+ * @readonly
163
+ */
164
+ width?: number;
165
+ /** Image alt text. */
166
+ altText?: string | null;
167
+ /**
168
+ * Image filename.
169
+ * @readonly
170
+ */
171
+ filename?: string | null;
172
+ }
173
+ export interface FocalPoint {
174
+ /** X-coordinate of the focal point. */
175
+ x?: number;
176
+ /** Y-coordinate of the focal point. */
177
+ y?: number;
178
+ /** crop by height */
179
+ height?: number | null;
180
+ /** crop by width */
181
+ width?: number | null;
182
+ }
183
+ export interface InvalidateCache extends InvalidateCacheGetByOneOf {
184
+ /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
185
+ metaSiteId?: string;
186
+ /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
187
+ siteId?: string;
188
+ /** Invalidate by App */
189
+ app?: App;
190
+ /** Invalidate by page id */
191
+ page?: Page;
192
+ /** Invalidate by URI path */
193
+ uri?: URI;
194
+ /** Invalidate by file (for media files such as PDFs) */
195
+ file?: File;
196
+ /** tell us why you're invalidating the cache. You don't need to add your app name */
197
+ reason?: string | null;
198
+ /** Is local DS */
199
+ localDc?: boolean;
200
+ hardPurge?: boolean;
201
+ }
202
+ /** @oneof */
203
+ export interface InvalidateCacheGetByOneOf {
204
+ /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
205
+ metaSiteId?: string;
206
+ /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
207
+ siteId?: string;
208
+ /** Invalidate by App */
209
+ app?: App;
210
+ /** Invalidate by page id */
211
+ page?: Page;
212
+ /** Invalidate by URI path */
213
+ uri?: URI;
214
+ /** Invalidate by file (for media files such as PDFs) */
215
+ file?: File;
216
+ }
217
+ export interface App {
218
+ /** The AppDefId */
219
+ appDefId?: string;
220
+ /** The instance Id */
221
+ instanceId?: string;
222
+ }
223
+ export interface Page {
224
+ /** the msid the page is on */
225
+ metaSiteId?: string;
226
+ /** Invalidate by Page ID */
227
+ pageId?: string;
228
+ }
229
+ export interface URI {
230
+ /** the msid the URI is on */
231
+ metaSiteId?: string;
232
+ /** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
233
+ uriPath?: string;
234
+ }
235
+ export interface File {
236
+ /** the msid the file is related to */
237
+ metaSiteId?: string;
238
+ /** Invalidate by filename (for media files such as PDFs) */
239
+ fileName?: string;
240
+ }
241
+ export interface CreateCustomizationRequest {
242
+ /** Customization to create. */
243
+ customization: Customization;
244
+ }
245
+ export interface CreateCustomizationResponse {
246
+ /** Created customization. */
247
+ customization?: Customization;
248
+ }
249
+ export interface GetCustomizationRequest {
250
+ /** Customization ID. */
251
+ customizationId: string;
252
+ /**
253
+ * Fields to include in the response.
254
+ *
255
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
256
+ */
257
+ fields?: RequestedFields[];
258
+ }
259
+ export declare enum RequestedFields {
260
+ /** Unknown requested field. */
261
+ UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
262
+ /** Assigned products count. */
263
+ ASSIGNED_PRODUCTS_COUNT = "ASSIGNED_PRODUCTS_COUNT"
264
+ }
265
+ export interface GetCustomizationResponse {
266
+ /** Customization. */
267
+ customization?: Customization;
268
+ }
269
+ export interface UpdateCustomizationRequest {
270
+ /** Customization to update. */
271
+ customization: Customization;
272
+ /**
273
+ * Fields to include in the response.
274
+ *
275
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
276
+ */
277
+ fields?: RequestedFields[];
278
+ }
279
+ export interface UpdateCustomizationResponse {
280
+ /** Updated customization. */
281
+ customization?: Customization;
282
+ }
283
+ export interface DeleteCustomizationRequest {
284
+ /** Customization ID. */
285
+ customizationId: string;
286
+ }
287
+ export interface DeleteCustomizationResponse {
288
+ }
289
+ export interface QueryCustomizationsRequest {
290
+ /** Query options. */
291
+ query?: CursorQuery;
292
+ /**
293
+ * Fields to include in the response.
294
+ *
295
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
296
+ */
297
+ fields?: RequestedFields[];
298
+ }
299
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
300
+ /** 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`. */
301
+ cursorPaging?: CursorPaging;
302
+ /**
303
+ * Filter object in the following format:
304
+ * `"filter" : {
305
+ * "fieldName1": "value1",
306
+ * "fieldName2":{"$operator":"value2"}
307
+ * }`
308
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
309
+ */
310
+ filter?: Record<string, any> | null;
311
+ /**
312
+ * Sort object in the following format:
313
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
314
+ */
315
+ sort?: Sorting[];
316
+ }
317
+ /** @oneof */
318
+ export interface CursorQueryPagingMethodOneOf {
319
+ /** 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`. */
320
+ cursorPaging?: CursorPaging;
321
+ }
322
+ export interface Sorting {
323
+ /** Name of the field to sort by. */
324
+ fieldName?: string;
325
+ /** Sort order. */
326
+ order?: SortOrder;
327
+ }
328
+ export declare enum SortOrder {
329
+ /** Ascending order. */
330
+ ASC = "ASC",
331
+ /** Descending order. */
332
+ DESC = "DESC"
333
+ }
334
+ export interface CursorPaging {
335
+ /** Maximum number of items to return in the results. */
336
+ limit?: number | null;
337
+ /**
338
+ * Pointer to the next or previous page in the list of results.
339
+ *
340
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
341
+ * Not relevant for the first request.
342
+ */
343
+ cursor?: string | null;
344
+ }
345
+ export interface QueryCustomizationsResponse {
346
+ /** List of customizations. */
347
+ customizations?: Customization[];
348
+ /** Details on the paged set of results returned. */
349
+ pagingMetadata?: CursorPagingMetadata;
350
+ }
351
+ export interface CursorPagingMetadata {
352
+ /** Number of items returned in the response. */
353
+ count?: number | null;
354
+ /** Cursor strings that point to the next page, previous page, or both. */
355
+ cursors?: Cursors;
356
+ /**
357
+ * Whether there are more pages to retrieve following the current page.
358
+ *
359
+ * + `true`: Another page of results can be retrieved.
360
+ * + `false`: This is the last page.
361
+ */
362
+ hasNext?: boolean | null;
363
+ }
364
+ export interface Cursors {
365
+ /** Cursor string pointing to the next page in the list of results. */
366
+ next?: string | null;
367
+ /** Cursor pointing to the previous page in the list of results. */
368
+ prev?: string | null;
369
+ }
370
+ export interface BulkCreateCustomizationsRequest {
371
+ /** Customizations to create. */
372
+ customizations: Customization[];
373
+ /**
374
+ * Whether to return the full customization entities in the response.
375
+ *
376
+ * Default: `false`
377
+ */
378
+ returnEntity?: boolean;
379
+ }
380
+ export interface BulkCreateCustomizationsResponse {
381
+ /** Customizations created by bulk action. */
382
+ results?: BulkCustomizationResult[];
383
+ /** Bulk action metadata. */
384
+ bulkActionMetadata?: BulkActionMetadata;
385
+ }
386
+ export interface BulkCustomizationResult {
387
+ /** Bulk action metadata for customization. */
388
+ itemMetadata?: ItemMetadata;
389
+ /**
390
+ * Full customization entity.
391
+ *
392
+ * Returned only if `returnEntity: true` is passed in the request.
393
+ */
394
+ customization?: Customization;
395
+ }
396
+ export interface ItemMetadata {
397
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
398
+ id?: string | null;
399
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
400
+ originalIndex?: number;
401
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
402
+ success?: boolean;
403
+ /** Details about the error in case of failure. */
404
+ error?: ApplicationError;
405
+ }
406
+ export interface ApplicationError {
407
+ /** Error code. */
408
+ code?: string;
409
+ /** Description of the error. */
410
+ description?: string;
411
+ /** Data related to the error. */
412
+ data?: Record<string, any> | null;
413
+ }
414
+ export interface BulkActionMetadata {
415
+ /** Number of items that were successfully processed. */
416
+ totalSuccesses?: number;
417
+ /** Number of items that couldn't be processed. */
418
+ totalFailures?: number;
419
+ /** Number of failures without details because detailed failure threshold was exceeded. */
420
+ undetailedFailures?: number;
421
+ }
422
+ export interface CustomizationIdsWrapper {
423
+ /**
424
+ * list of all the customization ids that are invalid
425
+ * e.g list of failed choices ids
426
+ */
427
+ customizationIds?: string[];
428
+ }
429
+ export interface AddCustomizationChoicesRequest {
430
+ /** Customization ID. */
431
+ customizationId: string;
432
+ /** Choices to add. */
433
+ choices: Choice[];
434
+ /**
435
+ * Fields to include in the response.
436
+ *
437
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
438
+ */
439
+ fields?: RequestedFields[];
440
+ }
441
+ export interface AddCustomizationChoicesResponse {
442
+ /** Updated customization. */
443
+ customization?: Customization;
444
+ }
445
+ export interface SetCustomizationChoicesRequest {
446
+ /** Customization ID. */
447
+ customizationId: string;
448
+ /** Choices to set. */
449
+ choices: Choice[];
450
+ /**
451
+ * Fields to include in the response.
452
+ *
453
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
454
+ */
455
+ fields?: RequestedFields[];
456
+ }
457
+ export interface SetCustomizationChoicesResponse {
458
+ /** Updated customization. */
459
+ customization?: Customization;
460
+ }
461
+ export interface RemoveCustomizationChoicesRequest {
462
+ /** Customization ID. */
463
+ customizationId: string;
464
+ /** IDs of choices to remove. */
465
+ choiceIds: string[];
466
+ /** Customization revision. */
467
+ revision?: string;
468
+ /**
469
+ * Fields to include in the response.
470
+ *
471
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
472
+ */
473
+ fields?: RequestedFields[];
474
+ }
475
+ export interface RemoveCustomizationChoicesResponse {
476
+ /** Updated customization. */
477
+ customization?: Customization;
478
+ }
479
+ export interface BulkAddCustomizationChoicesRequest {
480
+ /** List of customization IDs and choices. */
481
+ customizationsChoices: CustomizationChoices[];
482
+ /**
483
+ * Whether to return the full customization entities in the response.
484
+ *
485
+ * Default: `false`
486
+ */
487
+ returnEntity?: boolean;
488
+ /**
489
+ * Fields to include in the response.
490
+ *
491
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
492
+ */
493
+ fields?: RequestedFields[];
494
+ }
495
+ export interface CustomizationChoices {
496
+ /** Customization ID. */
497
+ customizationId?: string;
498
+ /** Choices to add. */
499
+ choices?: Choice[];
500
+ }
501
+ export interface BulkAddCustomizationChoicesResponse {
502
+ /** Customizations updated by bulk action. */
503
+ results?: BulkCustomizationResult[];
504
+ /** Bulk action metadata. */
505
+ bulkActionMetadata?: BulkActionMetadata;
506
+ }
507
+ export interface BulkUpdateCustomizationsRequest {
508
+ /** List of customizations to update. */
509
+ customizations: MaskedCustomization[];
510
+ /**
511
+ * Whether to return the full customization entities in the response.
512
+ *
513
+ * Default: `false`
514
+ */
515
+ returnEntity?: boolean;
516
+ /**
517
+ * Fields to include in the response.
518
+ *
519
+ * Supported values: `ASSIGNED_PRODUCTS_COUNT`
520
+ */
521
+ fields?: RequestedFields[];
522
+ }
523
+ export interface MaskedCustomization {
524
+ /** Customization to update. */
525
+ customization?: Customization;
526
+ }
527
+ export interface BulkUpdateCustomizationsResponse {
528
+ /** Customizations updated by bulk action. */
529
+ results?: BulkCustomizationResult[];
530
+ /** Bulk action metadata. */
531
+ bulkActionMetadata?: BulkActionMetadata;
532
+ }
533
+ export interface DomainEvent extends DomainEventBodyOneOf {
534
+ createdEvent?: EntityCreatedEvent;
535
+ updatedEvent?: EntityUpdatedEvent;
536
+ deletedEvent?: EntityDeletedEvent;
537
+ actionEvent?: ActionEvent;
538
+ /**
539
+ * Unique event ID.
540
+ * Allows clients to ignore duplicate webhooks.
541
+ */
542
+ id?: string;
543
+ /**
544
+ * Assumes actions are also always typed to an entity_type
545
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
546
+ */
547
+ entityFqdn?: string;
548
+ /**
549
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
550
+ * This is although the created/updated/deleted notion is duplication of the oneof types
551
+ * Example: created/updated/deleted/started/completed/email_opened
552
+ */
553
+ slug?: string;
554
+ /** ID of the entity associated with the event. */
555
+ entityId?: string;
556
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
557
+ eventTime?: Date | null;
558
+ /**
559
+ * Whether the event was triggered as a result of a privacy regulation application
560
+ * (for example, GDPR).
561
+ */
562
+ triggeredByAnonymizeRequest?: boolean | null;
563
+ /** If present, indicates the action that triggered the event. */
564
+ originatedFrom?: string | null;
565
+ /**
566
+ * A sequence number defining the order of updates to the underlying entity.
567
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
568
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
569
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
570
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
571
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
572
+ */
573
+ entityEventSequence?: string | null;
574
+ }
575
+ /** @oneof */
576
+ export interface DomainEventBodyOneOf {
577
+ createdEvent?: EntityCreatedEvent;
578
+ updatedEvent?: EntityUpdatedEvent;
579
+ deletedEvent?: EntityDeletedEvent;
580
+ actionEvent?: ActionEvent;
581
+ }
582
+ export interface EntityCreatedEvent {
583
+ entityAsJson?: string;
584
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
585
+ restoreInfo?: RestoreInfo;
586
+ }
587
+ export interface RestoreInfo {
588
+ deletedDate?: Date | null;
589
+ }
590
+ export interface EntityUpdatedEvent {
591
+ /**
592
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
593
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
594
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
595
+ */
596
+ currentEntityAsJson?: string;
597
+ }
598
+ export interface EntityDeletedEvent {
599
+ /** Entity that was deleted */
600
+ deletedEntityAsJson?: string | null;
601
+ }
602
+ export interface ActionEvent {
603
+ bodyAsJson?: string;
604
+ }
605
+ export interface Empty {
606
+ }
607
+ export interface MessageEnvelope {
608
+ /** App instance ID. */
609
+ instanceId?: string | null;
610
+ /** Event type. */
611
+ eventType?: string;
612
+ /** The identification type and identity data. */
613
+ identity?: IdentificationData;
614
+ /** Stringify payload. */
615
+ data?: string;
616
+ }
617
+ export interface IdentificationData extends IdentificationDataIdOneOf {
618
+ /** ID of a site visitor that has not logged in to the site. */
619
+ anonymousVisitorId?: string;
620
+ /** ID of a site visitor that has logged in to the site. */
621
+ memberId?: string;
622
+ /** ID of a Wix user (site owner, contributor, etc.). */
623
+ wixUserId?: string;
624
+ /** ID of an app. */
625
+ appId?: string;
626
+ /** @readonly */
627
+ identityType?: WebhookIdentityType;
628
+ }
629
+ /** @oneof */
630
+ export interface IdentificationDataIdOneOf {
631
+ /** ID of a site visitor that has not logged in to the site. */
632
+ anonymousVisitorId?: string;
633
+ /** ID of a site visitor that has logged in to the site. */
634
+ memberId?: string;
635
+ /** ID of a Wix user (site owner, contributor, etc.). */
636
+ wixUserId?: string;
637
+ /** ID of an app. */
638
+ appId?: string;
639
+ }
640
+ export declare enum WebhookIdentityType {
641
+ UNKNOWN = "UNKNOWN",
642
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
643
+ MEMBER = "MEMBER",
644
+ WIX_USER = "WIX_USER",
645
+ APP = "APP"
646
+ }
647
+ interface FreeTextSettingsNonNullableFields {
648
+ minCharCount: number;
649
+ maxCharCount: number;
650
+ title: string;
651
+ }
652
+ interface MultipleColorsNonNullableFields {
653
+ colorCodes: string[];
654
+ }
655
+ interface FocalPointNonNullableFields {
656
+ x: number;
657
+ y: number;
658
+ }
659
+ interface ImageNonNullableFields {
660
+ id: string;
661
+ url: string;
662
+ height: number;
663
+ width: number;
664
+ focalPoint?: FocalPointNonNullableFields;
665
+ }
666
+ interface ChoiceNonNullableFields {
667
+ colorCode: string;
668
+ colorCodes?: MultipleColorsNonNullableFields;
669
+ image?: ImageNonNullableFields;
670
+ id: string;
671
+ choiceType: ChoiceType;
672
+ name: string;
673
+ assignedProductsCount: number;
674
+ }
675
+ interface ChoicesSettingsNonNullableFields {
676
+ choices: ChoiceNonNullableFields[];
677
+ }
678
+ interface CustomizationNonNullableFields {
679
+ freeTextInput?: FreeTextSettingsNonNullableFields;
680
+ choicesSettings?: ChoicesSettingsNonNullableFields;
681
+ name: string;
682
+ customizationType: CustomizationType;
683
+ customizationRenderType: CustomizationRenderType;
684
+ }
685
+ export interface CreateCustomizationResponseNonNullableFields {
686
+ customization?: CustomizationNonNullableFields;
687
+ }
688
+ export interface GetCustomizationResponseNonNullableFields {
689
+ customization?: CustomizationNonNullableFields;
690
+ }
691
+ export interface UpdateCustomizationResponseNonNullableFields {
692
+ customization?: CustomizationNonNullableFields;
693
+ }
694
+ export interface QueryCustomizationsResponseNonNullableFields {
695
+ customizations: CustomizationNonNullableFields[];
696
+ }
697
+ interface ApplicationErrorNonNullableFields {
698
+ code: string;
699
+ description: string;
700
+ }
701
+ interface ItemMetadataNonNullableFields {
702
+ originalIndex: number;
703
+ success: boolean;
704
+ error?: ApplicationErrorNonNullableFields;
705
+ }
706
+ interface BulkCustomizationResultNonNullableFields {
707
+ itemMetadata?: ItemMetadataNonNullableFields;
708
+ customization?: CustomizationNonNullableFields;
709
+ }
710
+ interface BulkActionMetadataNonNullableFields {
711
+ totalSuccesses: number;
712
+ totalFailures: number;
713
+ undetailedFailures: number;
714
+ }
715
+ export interface BulkCreateCustomizationsResponseNonNullableFields {
716
+ results: BulkCustomizationResultNonNullableFields[];
717
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
718
+ }
719
+ export interface AddCustomizationChoicesResponseNonNullableFields {
720
+ customization?: CustomizationNonNullableFields;
721
+ }
722
+ export interface SetCustomizationChoicesResponseNonNullableFields {
723
+ customization?: CustomizationNonNullableFields;
724
+ }
725
+ export interface RemoveCustomizationChoicesResponseNonNullableFields {
726
+ customization?: CustomizationNonNullableFields;
727
+ }
728
+ export interface BulkAddCustomizationChoicesResponseNonNullableFields {
729
+ results: BulkCustomizationResultNonNullableFields[];
730
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
731
+ }
732
+ export interface BulkUpdateCustomizationsResponseNonNullableFields {
733
+ results: BulkCustomizationResultNonNullableFields[];
734
+ bulkActionMetadata?: BulkActionMetadataNonNullableFields;
735
+ }
736
+ export {};