@wix/stores 1.0.4 → 1.0.6

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 (89) hide show
  1. package/build/cjs/index.d.ts +2 -2
  2. package/build/cjs/index.js +2 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
  5. package/build/cjs/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +47 -44
  6. package/build/cjs/src/stores-catalog-v1-collection.http.js.map +1 -0
  7. package/build/cjs/src/stores-catalog-v1-collection.public.d.ts +5 -0
  8. package/build/cjs/src/stores-catalog-v1-collection.public.js +20 -0
  9. package/build/cjs/src/stores-catalog-v1-collection.public.js.map +1 -0
  10. package/build/cjs/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
  11. package/build/cjs/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
  12. package/build/cjs/src/stores-catalog-v1-collection.types.js.map +1 -0
  13. package/build/cjs/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
  14. package/build/cjs/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +55 -55
  15. package/build/cjs/src/stores-catalog-v1-collection.universal.js.map +1 -0
  16. package/build/cjs/src/stores-catalog-v1-product.http.d.ts +62 -0
  17. package/build/cjs/src/stores-catalog-v1-product.http.js +775 -0
  18. package/build/cjs/src/stores-catalog-v1-product.http.js.map +1 -0
  19. package/build/cjs/src/stores-catalog-v1-product.public.d.ts +25 -0
  20. package/build/cjs/src/stores-catalog-v1-product.public.js +139 -0
  21. package/build/cjs/src/stores-catalog-v1-product.public.js.map +1 -0
  22. package/build/cjs/src/stores-catalog-v1-product.types.d.ts +1371 -0
  23. package/build/cjs/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
  24. package/build/cjs/src/stores-catalog-v1-product.types.js.map +1 -0
  25. package/build/cjs/src/stores-catalog-v1-product.universal.d.ts +1744 -0
  26. package/build/cjs/src/stores-catalog-v1-product.universal.js +1155 -0
  27. package/build/cjs/src/stores-catalog-v1-product.universal.js.map +1 -0
  28. package/build/es/index.d.ts +2 -2
  29. package/build/es/index.js +2 -2
  30. package/build/es/index.js.map +1 -1
  31. package/build/es/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
  32. package/build/es/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +44 -41
  33. package/build/es/src/stores-catalog-v1-collection.http.js.map +1 -0
  34. package/build/es/src/stores-catalog-v1-collection.public.d.ts +5 -0
  35. package/build/es/src/stores-catalog-v1-collection.public.js +13 -0
  36. package/build/es/src/stores-catalog-v1-collection.public.js.map +1 -0
  37. package/build/es/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
  38. package/build/es/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
  39. package/build/es/src/stores-catalog-v1-collection.types.js.map +1 -0
  40. package/build/es/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
  41. package/build/es/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +53 -53
  42. package/build/es/src/stores-catalog-v1-collection.universal.js.map +1 -0
  43. package/build/es/src/stores-catalog-v1-product.http.d.ts +62 -0
  44. package/build/es/src/stores-catalog-v1-product.http.js +751 -0
  45. package/build/es/src/stores-catalog-v1-product.http.js.map +1 -0
  46. package/build/es/src/stores-catalog-v1-product.public.d.ts +25 -0
  47. package/build/es/src/stores-catalog-v1-product.public.js +108 -0
  48. package/build/es/src/stores-catalog-v1-product.public.js.map +1 -0
  49. package/build/es/src/stores-catalog-v1-product.types.d.ts +1371 -0
  50. package/build/es/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
  51. package/build/es/src/stores-catalog-v1-product.types.js.map +1 -0
  52. package/build/es/src/stores-catalog-v1-product.universal.d.ts +1744 -0
  53. package/build/es/src/stores-catalog-v1-product.universal.js +1112 -0
  54. package/build/es/src/stores-catalog-v1-product.universal.js.map +1 -0
  55. package/package.json +2 -2
  56. package/build/cjs/src/stores-poc-v1-collection.http.js.map +0 -1
  57. package/build/cjs/src/stores-poc-v1-collection.public.d.ts +0 -6
  58. package/build/cjs/src/stores-poc-v1-collection.public.js +0 -20
  59. package/build/cjs/src/stores-poc-v1-collection.public.js.map +0 -1
  60. package/build/cjs/src/stores-poc-v1-collection.types.js.map +0 -1
  61. package/build/cjs/src/stores-poc-v1-collection.universal.js.map +0 -1
  62. package/build/cjs/src/stores-poc-v1-product.http.d.ts +0 -4
  63. package/build/cjs/src/stores-poc-v1-product.http.js +0 -143
  64. package/build/cjs/src/stores-poc-v1-product.http.js.map +0 -1
  65. package/build/cjs/src/stores-poc-v1-product.public.d.ts +0 -6
  66. package/build/cjs/src/stores-poc-v1-product.public.js +0 -25
  67. package/build/cjs/src/stores-poc-v1-product.public.js.map +0 -1
  68. package/build/cjs/src/stores-poc-v1-product.types.d.ts +0 -470
  69. package/build/cjs/src/stores-poc-v1-product.types.js.map +0 -1
  70. package/build/cjs/src/stores-poc-v1-product.universal.d.ts +0 -549
  71. package/build/cjs/src/stores-poc-v1-product.universal.js +0 -212
  72. package/build/cjs/src/stores-poc-v1-product.universal.js.map +0 -1
  73. package/build/es/src/stores-poc-v1-collection.http.js.map +0 -1
  74. package/build/es/src/stores-poc-v1-collection.public.d.ts +0 -6
  75. package/build/es/src/stores-poc-v1-collection.public.js +0 -13
  76. package/build/es/src/stores-poc-v1-collection.public.js.map +0 -1
  77. package/build/es/src/stores-poc-v1-collection.types.js.map +0 -1
  78. package/build/es/src/stores-poc-v1-collection.universal.js.map +0 -1
  79. package/build/es/src/stores-poc-v1-product.http.d.ts +0 -4
  80. package/build/es/src/stores-poc-v1-product.http.js +0 -138
  81. package/build/es/src/stores-poc-v1-product.http.js.map +0 -1
  82. package/build/es/src/stores-poc-v1-product.public.d.ts +0 -6
  83. package/build/es/src/stores-poc-v1-product.public.js +0 -13
  84. package/build/es/src/stores-poc-v1-product.public.js.map +0 -1
  85. package/build/es/src/stores-poc-v1-product.types.d.ts +0 -470
  86. package/build/es/src/stores-poc-v1-product.types.js.map +0 -1
  87. package/build/es/src/stores-poc-v1-product.universal.d.ts +0 -549
  88. package/build/es/src/stores-poc-v1-product.universal.js +0 -188
  89. package/build/es/src/stores-poc-v1-product.universal.js.map +0 -1
@@ -0,0 +1,1744 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ export interface Product {
8
+ /**
9
+ * Product ID (generated automatically by the catalog).
10
+ * @readonly
11
+ */
12
+ _id?: string;
13
+ /** Product name. */
14
+ name?: string | null;
15
+ /** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
16
+ slug?: string;
17
+ /** Whether the product is visible to site visitors. */
18
+ visible?: boolean | null;
19
+ /** Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. */
20
+ productType?: ProductType;
21
+ /** Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). */
22
+ description?: string | null;
23
+ /** Stock keeping unit (if variant management is enabled, SKUs will be set per variant, and this field will be empty). */
24
+ sku?: string | null;
25
+ /** Product weight (if variant management is enabled, weight will be set per variant, and this field will be empty). */
26
+ weight?: number | null;
27
+ /**
28
+ * Product weight range. The minimum and maximum weights of all the variants.
29
+ * @readonly
30
+ */
31
+ weightRange?: NumericPropertyRange;
32
+ /**
33
+ * Product inventory status (in future this will be writable via Inventory API).
34
+ * @readonly
35
+ */
36
+ stock?: Stock;
37
+ /**
38
+ * Deprecated (use `priceData` instead).
39
+ * @readonly
40
+ */
41
+ price?: PriceData;
42
+ /** Price data. */
43
+ priceData?: PriceData;
44
+ /**
45
+ * Price data, converted to the currency specified in request header.
46
+ * @readonly
47
+ */
48
+ convertedPriceData?: PriceData;
49
+ /**
50
+ * Product price range. The minimum and maximum prices of all the variants.
51
+ * @readonly
52
+ */
53
+ priceRange?: NumericPropertyRange;
54
+ /** Cost and profit data. */
55
+ costAndProfitData?: CostAndProfitData;
56
+ /**
57
+ * Product cost range. The minimum and maximum costs of all the variants.
58
+ * @readonly
59
+ */
60
+ costRange?: NumericPropertyRange;
61
+ /** Price per unit data. */
62
+ pricePerUnitData?: PricePerUnitData;
63
+ /**
64
+ * Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). Currently writable only from the UI.
65
+ * @readonly
66
+ */
67
+ additionalInfoSections?: AdditionalInfoSection[];
68
+ /**
69
+ * Deprecated (use `ribbon` instead).
70
+ * @readonly
71
+ */
72
+ ribbons?: Ribbon[];
73
+ /**
74
+ * Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint).
75
+ * @readonly
76
+ */
77
+ media?: Media;
78
+ /**
79
+ * Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
80
+ * @readonly
81
+ */
82
+ customTextFields?: CustomTextField[];
83
+ /** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. */
84
+ manageVariants?: boolean | null;
85
+ /** Options (color, size, etc) for this product. */
86
+ productOptions?: ProductOption[];
87
+ /**
88
+ * Product page URL for this product (generated automatically by the server).
89
+ * @readonly
90
+ */
91
+ productPageUrl?: PageUrl;
92
+ /**
93
+ * Product’s unique numeric ID (assigned in ascending order).
94
+ * Primarily used for sorting and filtering when crawling all products.
95
+ * @readonly
96
+ */
97
+ numericId?: string;
98
+ /**
99
+ * Inventory item ID - ID referencing the inventory system.
100
+ * @readonly
101
+ */
102
+ inventoryItemId?: string;
103
+ /** Discount deducted from the product's original price. */
104
+ discount?: Discount;
105
+ /**
106
+ * A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
107
+ * @readonly
108
+ */
109
+ collectionIds?: string[];
110
+ /**
111
+ * Product variants, will be provided if the the request was sent with the includeVariants flag.
112
+ * @readonly
113
+ */
114
+ variants?: Variant[];
115
+ /**
116
+ * Date and time the product was last updated.
117
+ * @readonly
118
+ */
119
+ lastUpdated?: Date;
120
+ /**
121
+ * Date and time the product was created.
122
+ * @readonly
123
+ */
124
+ _createdDate?: Date;
125
+ /** Custom SEO data for the product. */
126
+ seoData?: SeoSchema;
127
+ /** Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". */
128
+ ribbon?: string | null;
129
+ /** Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). */
130
+ brand?: string | null;
131
+ }
132
+ export declare enum ProductType {
133
+ unspecified_product_type = "unspecified_product_type",
134
+ physical = "physical",
135
+ digital = "digital"
136
+ }
137
+ export interface NumericPropertyRange {
138
+ /** Minimum value. */
139
+ minValue?: number;
140
+ /** Maximum value. */
141
+ maxValue?: number;
142
+ }
143
+ export interface Stock {
144
+ /** Whether inventory is being tracked */
145
+ trackInventory?: boolean;
146
+ /** Quantity currently left in inventory */
147
+ quantity?: number | null;
148
+ /**
149
+ * Whether the product is currently in stock (relevant only when tracking manually)
150
+ * Deprecated (use `inventoryStatus` instead)
151
+ */
152
+ inStock?: boolean;
153
+ /**
154
+ * The current status of the inventory
155
+ * + `IN_STOCK` - In stock
156
+ * + `OUT_OF_STOCK` - Not in stock
157
+ * + `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock
158
+ */
159
+ inventoryStatus?: InventoryStatus;
160
+ }
161
+ export declare enum InventoryStatus {
162
+ IN_STOCK = "IN_STOCK",
163
+ OUT_OF_STOCK = "OUT_OF_STOCK",
164
+ PARTIALLY_OUT_OF_STOCK = "PARTIALLY_OUT_OF_STOCK"
165
+ }
166
+ export interface PriceData {
167
+ /**
168
+ * Product price currency
169
+ * @readonly
170
+ */
171
+ currency?: string;
172
+ /** Product price */
173
+ price?: number | null;
174
+ /**
175
+ * Discounted product price (if no discounted price is set, the product price is returned)
176
+ * @readonly
177
+ */
178
+ discountedPrice?: number;
179
+ /**
180
+ * The product price and discounted price, formatted with the currency
181
+ * @readonly
182
+ */
183
+ formatted?: FormattedPrice;
184
+ /**
185
+ * Price per unit
186
+ * @readonly
187
+ */
188
+ pricePerUnit?: number | null;
189
+ }
190
+ export interface FormattedPrice {
191
+ /** Product price formatted with the currency */
192
+ price?: string;
193
+ /** Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned) */
194
+ discountedPrice?: string;
195
+ /**
196
+ * Price per unit
197
+ * @readonly
198
+ */
199
+ pricePerUnit?: string | null;
200
+ }
201
+ export interface CostAndProfitData {
202
+ /** Item cost. */
203
+ itemCost?: number | null;
204
+ /**
205
+ * Item cost formatted with currency symbol.
206
+ * @readonly
207
+ */
208
+ formattedItemCost?: string;
209
+ /**
210
+ * Profit. Calculated by reducing `cost` from `discounted_price`.
211
+ * @readonly
212
+ */
213
+ profit?: number;
214
+ /**
215
+ * Profit formatted with currency symbol.
216
+ * @readonly
217
+ */
218
+ formattedProfit?: string;
219
+ /**
220
+ * Profit Margin. Calculated by dividing `profit` by `discounted_price`.
221
+ * The result is rounded to 4 decimal places.
222
+ * @readonly
223
+ */
224
+ profitMargin?: number;
225
+ }
226
+ export interface PricePerUnitData {
227
+ /** Total quantity */
228
+ totalQuantity?: number;
229
+ /** Total measurement unit */
230
+ totalMeasurementUnit?: MeasurementUnit;
231
+ /** Base quantity */
232
+ baseQuantity?: number;
233
+ /** Base measurement unit */
234
+ baseMeasurementUnit?: MeasurementUnit;
235
+ }
236
+ export declare enum MeasurementUnit {
237
+ UNSPECIFIED = "UNSPECIFIED",
238
+ ML = "ML",
239
+ CL = "CL",
240
+ L = "L",
241
+ CBM = "CBM",
242
+ MG = "MG",
243
+ G = "G",
244
+ KG = "KG",
245
+ MM = "MM",
246
+ CM = "CM",
247
+ M = "M",
248
+ SQM = "SQM",
249
+ OZ = "OZ",
250
+ LB = "LB",
251
+ FLOZ = "FLOZ",
252
+ PT = "PT",
253
+ QT = "QT",
254
+ GAL = "GAL",
255
+ IN = "IN",
256
+ FT = "FT",
257
+ YD = "YD",
258
+ SQFT = "SQFT"
259
+ }
260
+ export interface AdditionalInfoSection {
261
+ /** Product info section title */
262
+ title?: string;
263
+ /** Product info section description */
264
+ description?: string;
265
+ }
266
+ export interface Ribbon {
267
+ /** Ribbon text */
268
+ text?: string;
269
+ }
270
+ export interface Media {
271
+ /** Primary media (image, video etc) associated with this product. */
272
+ mainMedia?: MediaItem;
273
+ /** Media (images, videos etc) associated with this product. */
274
+ items?: MediaItem[];
275
+ }
276
+ export interface MediaItem extends MediaItemItemOneOf {
277
+ /** Media item thumbnail details. */
278
+ thumbnail?: MediaItemUrlAndSize;
279
+ /** Media item type (image, video, etc.). */
280
+ mediaType?: MediaItemType;
281
+ /** Media item title. */
282
+ title?: string;
283
+ /** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
284
+ _id?: string;
285
+ /** Image data (URL, size). */
286
+ image?: MediaItemUrlAndSize;
287
+ /** Video data (URL, size). */
288
+ video?: MediaItemVideo;
289
+ }
290
+ /** @oneof */
291
+ export interface MediaItemItemOneOf {
292
+ /** Image data (URL, size). */
293
+ image?: MediaItemUrlAndSize;
294
+ /** Video data (URL, size). */
295
+ video?: MediaItemVideo;
296
+ }
297
+ export interface MediaItemUrlAndSize {
298
+ /** Media item URL. */
299
+ url?: string;
300
+ /** Media item width. */
301
+ width?: number;
302
+ /** Media item height. */
303
+ height?: number;
304
+ /** Media format (mp4, png, etc.). */
305
+ format?: string | null;
306
+ /** Alt text. This text will be shown in case the image is not available. */
307
+ altText?: string | null;
308
+ }
309
+ export declare enum MediaItemType {
310
+ unspecified_media_item_type = "unspecified_media_item_type",
311
+ image = "image",
312
+ video = "video",
313
+ audio = "audio",
314
+ document = "document",
315
+ zip = "zip"
316
+ }
317
+ export interface MediaItemVideo {
318
+ /** Data (URL, size) about each resolution for which this video is available. */
319
+ files?: MediaItemUrlAndSize[];
320
+ /** ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. */
321
+ stillFrameMediaId?: string;
322
+ }
323
+ export interface CustomTextField {
324
+ /** Text box title */
325
+ title?: string;
326
+ /** Text box input max length */
327
+ maxLength?: number;
328
+ /** Whether this text box is mandatory */
329
+ mandatory?: boolean;
330
+ }
331
+ export interface ProductOption {
332
+ /**
333
+ * Option type - color or other(drop down)
334
+ * @readonly
335
+ */
336
+ optionType?: OptionType;
337
+ /** Option name (e.g., color, size) */
338
+ name?: string;
339
+ /** Choices available for this option */
340
+ choices?: Choice[];
341
+ }
342
+ export declare enum OptionType {
343
+ unspecified_option_type = "unspecified_option_type",
344
+ drop_down = "drop_down",
345
+ color = "color"
346
+ }
347
+ export interface Choice {
348
+ /** Color hex value or choice name */
349
+ value?: string;
350
+ /** Choice name */
351
+ description?: string;
352
+ /**
353
+ * Media items (images, videos) associated with this choice
354
+ * @readonly
355
+ */
356
+ media?: Media;
357
+ /**
358
+ * Based on the customer’s choices, which (if any) variants that include the selected choices are in stock
359
+ * @readonly
360
+ */
361
+ inStock?: boolean;
362
+ /**
363
+ * Based on the customer’s choices, which (if any) variants that include the selected choices are visible
364
+ * @readonly
365
+ */
366
+ visible?: boolean;
367
+ }
368
+ export interface PageUrl {
369
+ /** Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite). */
370
+ base?: string;
371
+ /** Path to the product page - e.g /product-page/a-product. */
372
+ path?: string;
373
+ }
374
+ export interface Discount {
375
+ /** Discount type: amount / percent */
376
+ type?: DiscountType;
377
+ /** Discount value */
378
+ value?: number;
379
+ }
380
+ export declare enum DiscountType {
381
+ UNDEFINED = "UNDEFINED",
382
+ /** No discount */
383
+ NONE = "NONE",
384
+ AMOUNT = "AMOUNT",
385
+ PERCENT = "PERCENT"
386
+ }
387
+ export interface Variant {
388
+ /** Requested Variant ID */
389
+ _id?: string;
390
+ /** Specific choices within a selection, as option-choice key-value pairs */
391
+ choices?: Record<string, string>;
392
+ variant?: VariantDataWithNoStock;
393
+ /**
394
+ * Variant inventory status.
395
+ * @readonly
396
+ */
397
+ stock?: VariantStock;
398
+ }
399
+ export interface VariantDataWithNoStock {
400
+ /** Variant price. */
401
+ priceData?: PriceData;
402
+ /**
403
+ * Variant price data, converted to currency requested in header.
404
+ * @readonly
405
+ */
406
+ convertedPriceData?: PriceData;
407
+ /** Cost and profit data. */
408
+ costAndProfitData?: CostAndProfitData;
409
+ /** Variant weight. */
410
+ weight?: number;
411
+ /** Variant SKU (stock keeping unit). */
412
+ sku?: string;
413
+ /** Whether the variant is visible to customers. */
414
+ visible?: boolean;
415
+ }
416
+ export interface VariantStock {
417
+ /** Whether inventory is being tracked. */
418
+ trackQuantity?: boolean;
419
+ /** Quantity currently left in inventory. */
420
+ quantity?: number | null;
421
+ /** Whether the product is currently in stock (relevant only when tracking manually). */
422
+ inStock?: boolean;
423
+ }
424
+ /**
425
+ * The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
426
+ * The search engines use this information for ranking purposes, or to display snippets in the search results.
427
+ * This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
428
+ */
429
+ export interface SeoSchema {
430
+ /** SEO tags information. */
431
+ tags?: Tag[];
432
+ /** SEO general settings. */
433
+ settings?: Settings;
434
+ }
435
+ export interface Tag {
436
+ /** SEO tag type. Supported values: `title`, `meta`, `script`, `link`. */
437
+ type?: string;
438
+ /** SEO tag attributes/properties (name, content, rel, href). */
439
+ props?: Record<string, any> | null;
440
+ /** Tag meta data, e.g. {height: 300, width: 240}. */
441
+ meta?: Record<string, any> | null;
442
+ /** Tag inner content e.g. `<title> inner content </title>`. */
443
+ children?: string;
444
+ /** Whether the tag is a custom tag. */
445
+ custom?: boolean;
446
+ /** Whether the tag is disabled. */
447
+ disabled?: boolean;
448
+ }
449
+ export interface Settings {
450
+ /** disable auto creation of 301 redirects on slug changes (enabled by default). */
451
+ preventAutoRedirect?: boolean;
452
+ }
453
+ export interface CreateProductRequest {
454
+ /** Product information. */
455
+ product?: Product;
456
+ }
457
+ export interface CreateProductResponse {
458
+ product?: Product;
459
+ }
460
+ export interface UpdateProductRequest {
461
+ product: Product;
462
+ }
463
+ export interface UpdateProductResponse {
464
+ product?: Product;
465
+ }
466
+ export interface DeleteProductRequest {
467
+ /** ID of the product to be deleted. */
468
+ _id: string;
469
+ }
470
+ export interface DeleteProductResponse {
471
+ }
472
+ export interface BulkDeleteProductsRequest {
473
+ /** IDs of the products to be deleted. */
474
+ ids?: string[];
475
+ }
476
+ export interface BulkDeleteProductsResponse {
477
+ }
478
+ export interface UpdateVariantsRequest {
479
+ /** ID of the product with managed variants. */
480
+ _id: string;
481
+ variants?: VariantOverride[];
482
+ }
483
+ export interface VariantOverride {
484
+ /** The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice). You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (Not relevant when passing variant IDs) */
485
+ choices?: Record<string, string>;
486
+ /**
487
+ * List of variant IDs
488
+ * (Not relevant when passing choices)
489
+ */
490
+ variantIds?: string[];
491
+ /** Variant price */
492
+ price?: number | null;
493
+ /** Variant cost of goods */
494
+ cost?: number | null;
495
+ /** Variant weight */
496
+ weight?: number | null;
497
+ /** Variant SKU (stock keeping unit) */
498
+ sku?: string | null;
499
+ /** Whether the variant is visible to customers */
500
+ visible?: boolean | null;
501
+ }
502
+ export interface UpdateVariantsResponse {
503
+ /** List of the product's variants. */
504
+ variants?: Variant[];
505
+ }
506
+ export interface ResetAllVariantDataRequest {
507
+ /** Product ID. */
508
+ _id: string;
509
+ }
510
+ export interface ResetAllVariantDataResponse {
511
+ }
512
+ export interface AddProductsToCollectionRequest {
513
+ /** Collection ID. */
514
+ _id: string;
515
+ /** IDs of the products to add to the collection. */
516
+ productIds?: string[];
517
+ }
518
+ export interface AddProductsToCollectionResponse {
519
+ }
520
+ export interface RemoveProductsFromCollectionRequest {
521
+ /** Collection ID. */
522
+ _id: string;
523
+ /** IDs of the products that will be deleted from the collection. */
524
+ productIds: string[];
525
+ }
526
+ export interface RemoveProductsFromCollectionResponse {
527
+ }
528
+ export interface AddProductMediaRequest {
529
+ /** Product ID. */
530
+ _id: string;
531
+ media?: MediaDataForWrite[];
532
+ }
533
+ export interface MediaDataForWrite extends MediaDataForWriteMediaSourceOneOf {
534
+ /**
535
+ * Optional - assign this media item to a specific product choice.
536
+ * Note that you may set media items for choices under only one option (e.g., if Colors blue, green, and red have media items, Sizes S, M, and L can't have media items assigned to them).
537
+ * You may clear existing media from choices via the Remove Product Media From Choices endpoint
538
+ */
539
+ choice?: OptionAndChoice;
540
+ /** Media ID. For media items previously saved in Wix Media, the media ID is returned in the Query Product response. */
541
+ mediaId?: string;
542
+ /** Media external URL (for new media items). */
543
+ url?: string;
544
+ }
545
+ /** @oneof */
546
+ export interface MediaDataForWriteMediaSourceOneOf {
547
+ /** Media ID. For media items previously saved in Wix Media, the media ID is returned in the Query Product response. */
548
+ mediaId?: string;
549
+ /** Media external URL (for new media items). */
550
+ url?: string;
551
+ }
552
+ export interface OptionAndChoice {
553
+ option?: string;
554
+ choice?: string;
555
+ }
556
+ export interface AddProductMediaResponse {
557
+ }
558
+ export interface RemoveProductMediaRequest {
559
+ /** Product ID. */
560
+ _id: string;
561
+ /** List of media IDs to remove. Pass an empty array to delete all media items for the product. */
562
+ mediaIds?: string[];
563
+ }
564
+ export interface RemoveProductMediaResponse {
565
+ }
566
+ export interface AddProductMediaToChoicesRequest {
567
+ /** Product ID. */
568
+ _id: string;
569
+ media?: MediaAssignmentToChoice[];
570
+ }
571
+ export interface MediaAssignmentToChoice {
572
+ /** Product option. For example, color or size. */
573
+ option?: string;
574
+ /** Choice within the option. For example, red or L. */
575
+ choice?: string;
576
+ /** Media IDs (available via the Query Product endpoint). */
577
+ mediaIds?: string[];
578
+ }
579
+ export interface AddProductMediaToChoicesResponse {
580
+ }
581
+ export interface RemoveProductMediaFromChoicesRequest {
582
+ /** Product ID. */
583
+ _id: string;
584
+ /** Optional - if an empty array is passed, all media will be removed from all choices. */
585
+ media?: MediaAssignmentToChoice[];
586
+ }
587
+ export interface RemoveProductMediaFromChoicesResponse {
588
+ }
589
+ export interface DeleteProductOptionsRequest {
590
+ /** Product ID. */
591
+ _id: string;
592
+ }
593
+ export interface DeleteProductOptionsResponse {
594
+ }
595
+ export interface SetCustomFieldsRequest {
596
+ /** Product ID. */
597
+ _id?: string;
598
+ /** Custom field that will be added, if a custom field with the same name already exists, the value of the custom field will be overridden. */
599
+ customFields?: Record<string, any>;
600
+ }
601
+ export interface SetCustomFieldsResponse {
602
+ }
603
+ export interface RemoveCustomFieldsRequest {
604
+ /** Product ID. */
605
+ _id?: string;
606
+ /** Custom fields to be removed (by name). */
607
+ names?: string[];
608
+ }
609
+ export interface RemoveCustomFieldsResponse {
610
+ }
611
+ export interface RemoveProductBrandRequest {
612
+ /** Product ID. */
613
+ _id: string;
614
+ }
615
+ export interface RemoveProductBrandResponse {
616
+ }
617
+ export interface BulkSetCustomFieldsRequest {
618
+ /** Filter string. */
619
+ filter?: string | null;
620
+ /** Custom field that will be added, if a custom field with same name already exists, the value of the custom field will be overridden. */
621
+ customFields?: Record<string, any>;
622
+ }
623
+ export interface BulkSetCustomFieldsResponse {
624
+ }
625
+ export interface BulkRemoveCustomFieldsRequest {
626
+ /** Filter string. */
627
+ filter?: string | null;
628
+ /** Custom fields names. */
629
+ names?: string[];
630
+ }
631
+ export interface BulkRemoveCustomFieldsResponse {
632
+ }
633
+ export interface CreateCollectionRequest {
634
+ /** Collection information. */
635
+ collection: Collection;
636
+ }
637
+ export interface Collection {
638
+ /**
639
+ * Collection ID (generated automatically by the catalog)
640
+ * @readonly
641
+ */
642
+ _id?: string | null;
643
+ /** Collection name */
644
+ name?: string | null;
645
+ /**
646
+ * Media items (images, videos etc) associated with this collection. Read only.
647
+ * @readonly
648
+ */
649
+ media?: Media;
650
+ /**
651
+ * Number of products in the collection. Read only.
652
+ * @readonly
653
+ */
654
+ numberOfProducts?: number;
655
+ /** Collection description. The description length without HTML must not exceed 2000 characters (10K includes HTML) */
656
+ description?: string | null;
657
+ /** Collection slug */
658
+ slug?: string | null;
659
+ /** Collection visibility. Only impacts dynamic pages, no impact on static pages */
660
+ visible?: boolean | null;
661
+ }
662
+ export interface CreateCollectionResponse {
663
+ collection?: Collection;
664
+ }
665
+ export interface UpdateCollectionRequest {
666
+ /** Collection information. */
667
+ collection: Collection;
668
+ }
669
+ export interface UpdateCollectionResponse {
670
+ collection?: Collection;
671
+ }
672
+ export interface DeleteCollectionRequest {
673
+ /** Collection ID. */
674
+ _id: string;
675
+ }
676
+ export interface DeleteCollectionResponse {
677
+ }
678
+ export interface RemoveProductRibbonRequest {
679
+ /** Product ID. */
680
+ _id: string;
681
+ }
682
+ export interface RemoveProductRibbonResponse {
683
+ }
684
+ export interface BulkUpdateProductsRequest {
685
+ /** Product IDs. */
686
+ ids: string[];
687
+ /** Field to update. */
688
+ set?: SetValue;
689
+ }
690
+ export interface SetValue extends SetValueValueOneOf {
691
+ /**
692
+ * Set product price.
693
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
694
+ * variant prices will be calculated according to the set product price.
695
+ * If variant price is negative after setting new price, the update will fail.
696
+ */
697
+ price?: number;
698
+ /**
699
+ * Set product cost of goods.
700
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
701
+ * cost of goods will be set per variant.
702
+ */
703
+ cost?: number;
704
+ /**
705
+ * Set product weight.
706
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
707
+ * weight will be set per variant.
708
+ */
709
+ weight?: number;
710
+ /** Set product ribbon. Pass empty string to remove existing ribbon. */
711
+ ribbon?: string;
712
+ /** Set product brand. Pass empty string to remove existing brand. */
713
+ brand?: string;
714
+ }
715
+ /** @oneof */
716
+ export interface SetValueValueOneOf {
717
+ /**
718
+ * Set product price.
719
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
720
+ * variant prices will be calculated according to the set product price.
721
+ * If variant price is negative after setting new price, the update will fail.
722
+ */
723
+ price?: number;
724
+ /**
725
+ * Set product cost of goods.
726
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
727
+ * cost of goods will be set per variant.
728
+ */
729
+ cost?: number;
730
+ /**
731
+ * Set product weight.
732
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
733
+ * weight will be set per variant.
734
+ */
735
+ weight?: number;
736
+ /** Set product ribbon. Pass empty string to remove existing ribbon. */
737
+ ribbon?: string;
738
+ /** Set product brand. Pass empty string to remove existing brand. */
739
+ brand?: string;
740
+ }
741
+ export interface BulkUpdateProductsResponse {
742
+ /** Bulk action results. */
743
+ results?: BulkProductResult[];
744
+ /** Bulk action metadata. */
745
+ bulkActionMetadata?: BulkActionMetadata;
746
+ }
747
+ export interface BulkProductResult {
748
+ /** Item metadata. */
749
+ itemMetadata?: ItemMetadata;
750
+ }
751
+ export interface ItemMetadata {
752
+ /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
753
+ _id?: string | null;
754
+ /** Index of the item within the request array. Allows for correlation between request and response items. */
755
+ originalIndex?: number;
756
+ /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
757
+ success?: boolean;
758
+ /** Details about the error in case of failure. */
759
+ error?: ApplicationError;
760
+ }
761
+ export interface ApplicationError {
762
+ code?: string;
763
+ description?: string;
764
+ data?: Record<string, any> | null;
765
+ }
766
+ export interface BulkActionMetadata {
767
+ /** Number of items that were successfully processed. */
768
+ totalSuccesses?: number;
769
+ /** Number of items that couldn't be processed. */
770
+ totalFailures?: number;
771
+ /** Number of failures without details because detailed failure threshold was exceeded. */
772
+ undetailedFailures?: number;
773
+ }
774
+ export interface BulkUpdateProductsByFilterSyncRequest {
775
+ /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort). */
776
+ filter?: Record<string, any> | null;
777
+ /** The field to update. */
778
+ set?: SetValue;
779
+ }
780
+ export interface BulkUpdateProductsByFilterSyncResponse {
781
+ /** Items updated by bulk action. */
782
+ results?: BulkProductResult[];
783
+ /** Bulk action metadata. */
784
+ bulkActionMetadata?: BulkActionMetadata;
785
+ }
786
+ export interface AllowedProductsCountLimitExceededErrorData {
787
+ /** Total number of products */
788
+ totalCount?: number;
789
+ }
790
+ export interface BulkAdjustProductPropertiesRequest {
791
+ /** Product IDs. */
792
+ ids: string[];
793
+ /** Numerical property to adjust. */
794
+ adjust?: AdjustValue;
795
+ }
796
+ export interface AdjustValue extends AdjustValueValueOneOf {
797
+ /**
798
+ * Adjust product price.
799
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
800
+ * variants prices will be calculated according to the adjusted price.
801
+ * If variant price is negative after the adjustment, the update will fail.
802
+ */
803
+ price?: PropertyAdjustmentData;
804
+ /**
805
+ * Adjust product cost of goods.
806
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
807
+ * cost of goods will be adjusted per variant.
808
+ */
809
+ cost?: PropertyAdjustmentData;
810
+ /**
811
+ * Adjust product weight.
812
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
813
+ * weight will be adjusted per variant.
814
+ */
815
+ weight?: PropertyAdjustmentData;
816
+ }
817
+ /** @oneof */
818
+ export interface AdjustValueValueOneOf {
819
+ /**
820
+ * Adjust product price.
821
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
822
+ * variants prices will be calculated according to the adjusted price.
823
+ * If variant price is negative after the adjustment, the update will fail.
824
+ */
825
+ price?: PropertyAdjustmentData;
826
+ /**
827
+ * Adjust product cost of goods.
828
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
829
+ * cost of goods will be adjusted per variant.
830
+ */
831
+ cost?: PropertyAdjustmentData;
832
+ /**
833
+ * Adjust product weight.
834
+ * If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
835
+ * weight will be adjusted per variant.
836
+ */
837
+ weight?: PropertyAdjustmentData;
838
+ }
839
+ export interface PropertyAdjustmentData extends PropertyAdjustmentDataByOneOf {
840
+ /** Adjust by percentage. */
841
+ percentage?: PercentageData;
842
+ /** Adjust by amount. */
843
+ amount?: number;
844
+ }
845
+ /** @oneof */
846
+ export interface PropertyAdjustmentDataByOneOf {
847
+ /** Adjust by percentage. */
848
+ percentage?: PercentageData;
849
+ /** Adjust by amount. */
850
+ amount?: number;
851
+ }
852
+ export interface PercentageData {
853
+ /**
854
+ * If `true`, result will be rounded to the nearest whole number.
855
+ * If `false`, result will be rounded to 2 places after the decimal point.
856
+ */
857
+ roundToInt?: boolean;
858
+ /**
859
+ * Percentage value, as a whole number (integer) between -100 and 1000.
860
+ * For example, pass 100 to increase value by 100% (multiply original value by 2).
861
+ */
862
+ rate?: number;
863
+ }
864
+ export interface BulkAdjustProductPropertiesResponse {
865
+ /** Bulk action results. */
866
+ results?: BulkProductResult[];
867
+ /** Bulk action metadata. */
868
+ bulkActionMetadata?: BulkActionMetadata;
869
+ }
870
+ export interface BulkAdjustProductPropertiesByFilterSyncRequest {
871
+ /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/stores/stores-catalog/filter-and-sort). */
872
+ filter?: Record<string, any> | null;
873
+ /** Numerical property to adjust. */
874
+ adjust?: AdjustValue;
875
+ }
876
+ export interface BulkAdjustProductPropertiesByFilterSyncResponse {
877
+ /** Items updated by bulk action. */
878
+ results?: BulkProductResult[];
879
+ /** Bulk action metadata. */
880
+ bulkActionMetadata?: BulkActionMetadata;
881
+ }
882
+ export interface ProductCreated {
883
+ /** Product ID (generated automatically by the catalog). */
884
+ productId?: string;
885
+ /** Product name. */
886
+ name?: string;
887
+ /** Product price. */
888
+ price?: PriceData;
889
+ /** Whether the product is visible to customers. */
890
+ visible?: boolean;
891
+ /** Media items (images, videos, etc.) associated with this product. */
892
+ media?: Media;
893
+ /** Product stock keeping unit (SKU). If variants are being managed, this will be empty. */
894
+ sku?: string;
895
+ /** Product page URL for this product (generated automatically by the server). */
896
+ productPageUrl?: PageUrl;
897
+ /** Product brand. */
898
+ brand?: string | null;
899
+ /** Cost and profit data */
900
+ costAndProfitData?: CostAndProfitData;
901
+ }
902
+ export interface ProductChanged {
903
+ /** Product ID. */
904
+ productId?: string;
905
+ /** List of product fields that were changed. */
906
+ changedFields?: string[];
907
+ }
908
+ export interface ProductDeleted {
909
+ /** ID of the product that was deleted. */
910
+ productId?: string;
911
+ }
912
+ export interface CollectionCreated {
913
+ /** Collection ID (generated automatically by the catalog). */
914
+ collectionId?: string;
915
+ /** Collection name. */
916
+ name?: string;
917
+ /** Media items (images, videos, etc.) associated with this collection. */
918
+ media?: Media;
919
+ /** Collection slug */
920
+ slug?: string;
921
+ /** Collection visible status */
922
+ visible?: boolean;
923
+ }
924
+ export interface CollectionChanged {
925
+ /** Collection ID (generated automatically by the catalog). */
926
+ collectionId?: string;
927
+ /** List of collection fields that were changed. */
928
+ changedFields?: string[];
929
+ }
930
+ export interface CollectionDeleted {
931
+ /** ID of the collection that was deleted. */
932
+ collectionId?: string;
933
+ }
934
+ export interface VariantsChanged {
935
+ /** Product ID. */
936
+ productId?: string;
937
+ /** List of variants that were changed. */
938
+ variants?: VariantChanged[];
939
+ }
940
+ export interface VariantChanged {
941
+ /** Variant ID. */
942
+ variantId?: string;
943
+ choices?: Record<string, string>;
944
+ /** List of variant fields that were changed. */
945
+ changedFields?: string[];
946
+ }
947
+ export interface QueryProductsRequest {
948
+ query?: Query;
949
+ /** Whether variants should be included in the response. */
950
+ includeVariants?: boolean;
951
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
952
+ includeHiddenProducts?: boolean;
953
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
954
+ includeMerchantSpecificData?: boolean;
955
+ }
956
+ export interface Query {
957
+ paging?: Paging;
958
+ /** Filter string */
959
+ filter?: string | null;
960
+ /** Sort string */
961
+ sort?: string | null;
962
+ }
963
+ export interface Paging {
964
+ /** Amount of items to load per page */
965
+ limit?: number | null;
966
+ /** Number of items to skip in the display (relevant for all pages after the first) */
967
+ offset?: number | null;
968
+ }
969
+ export interface QueryProductsResponse {
970
+ products?: Product[];
971
+ metadata?: PagingMetadata;
972
+ totalResults?: number;
973
+ }
974
+ export interface PagingMetadata {
975
+ /** Amount of items to load per page */
976
+ items?: number;
977
+ /** Number of items to skip in the display (relevant for all pages after the first) */
978
+ offset?: number;
979
+ }
980
+ export interface QueryProductsPlatformizedRequest {
981
+ query?: PlatformQuery;
982
+ }
983
+ export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
984
+ /** Filter object. */
985
+ filter?: Record<string, any> | null;
986
+ /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
987
+ sort?: Sorting[];
988
+ /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
989
+ paging?: PlatformPaging;
990
+ /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
991
+ cursorPaging?: CursorPaging;
992
+ }
993
+ /** @oneof */
994
+ export interface PlatformQueryPagingMethodOneOf {
995
+ /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
996
+ paging?: PlatformPaging;
997
+ /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
998
+ cursorPaging?: CursorPaging;
999
+ }
1000
+ export interface Sorting {
1001
+ /** Name of the field to sort by. */
1002
+ fieldName?: string;
1003
+ /** Sort order. */
1004
+ order?: SortOrder;
1005
+ }
1006
+ export declare enum SortOrder {
1007
+ ASC = "ASC",
1008
+ DESC = "DESC"
1009
+ }
1010
+ export interface PlatformPaging {
1011
+ /** Number of items to load. */
1012
+ limit?: number | null;
1013
+ /** Number of items to skip in the current sort order. */
1014
+ offset?: number | null;
1015
+ }
1016
+ export interface CursorPaging {
1017
+ /** Number of items to load. */
1018
+ limit?: number | null;
1019
+ /**
1020
+ * Pointer to the next or previous page in the list of results.
1021
+ *
1022
+ * You can get the relevant cursor token
1023
+ * from the `pagingMetadata` object in the previous call's response.
1024
+ * Not relevant for the first request.
1025
+ */
1026
+ cursor?: string | null;
1027
+ }
1028
+ export interface QueryProductsPlatformizedResponse {
1029
+ products?: Product[];
1030
+ metadata?: PlatformPagingMetadata;
1031
+ }
1032
+ export interface PlatformPagingMetadata {
1033
+ /** The number of items returned in this response. */
1034
+ count?: number | null;
1035
+ /** The offset which was requested. Returned if offset paging was used. */
1036
+ offset?: number | null;
1037
+ /** The total number of items that match the query. Returned if offset paging was used. */
1038
+ total?: number | null;
1039
+ /** Cursors to navigate through result pages. Returned if cursor paging was used. */
1040
+ cursors?: Cursors;
1041
+ }
1042
+ export interface Cursors {
1043
+ /** Cursor pointing to next page in the list of results. */
1044
+ next?: string | null;
1045
+ /** Cursor pointing to previous page in the list of results. */
1046
+ prev?: string | null;
1047
+ }
1048
+ export interface QueryProductsWithBigPageLimitRequest {
1049
+ query?: QueryWithBigPageLimit;
1050
+ /** Whether variants should be included in the response. */
1051
+ includeVariants?: boolean;
1052
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
1053
+ includeHiddenProducts?: boolean;
1054
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
1055
+ includeMerchantSpecificData?: boolean;
1056
+ }
1057
+ export interface QueryWithBigPageLimit {
1058
+ paging?: PagingWithBigLimit;
1059
+ /** Filter string */
1060
+ filter?: string | null;
1061
+ /** Sort string */
1062
+ sort?: string | null;
1063
+ }
1064
+ export interface PagingWithBigLimit {
1065
+ /** Amount of items to load per page */
1066
+ limit?: number | null;
1067
+ /** Number of items to skip in the display (relevant for all pages after the first) */
1068
+ offset?: number | null;
1069
+ }
1070
+ export interface GetProductsRequest {
1071
+ /** Requested product IDs. */
1072
+ ids?: string[];
1073
+ }
1074
+ export interface GetProductsResponse {
1075
+ products?: Product[];
1076
+ }
1077
+ export interface GetProductRequest {
1078
+ /** Requested product ID. */
1079
+ _id: string;
1080
+ /** Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products. */
1081
+ includeMerchantSpecificData?: boolean;
1082
+ }
1083
+ export interface GetProductResponse {
1084
+ /** Requested product data. */
1085
+ product?: Product;
1086
+ }
1087
+ export interface QueryCollectionsRequest {
1088
+ query?: Query;
1089
+ /** Whether number of products should be included in the response. */
1090
+ includeNumberOfProducts?: boolean;
1091
+ /** Include description in response. When False, description will be null */
1092
+ includeDescription?: boolean;
1093
+ }
1094
+ export interface QueryCollectionsResponse {
1095
+ collections?: Collection[];
1096
+ metadata?: PagingMetadata;
1097
+ totalResults?: number;
1098
+ }
1099
+ export interface QueryCollectionsPlatformizedRequest {
1100
+ query?: PlatformQuery;
1101
+ }
1102
+ export interface QueryCollectionsPlatformizedResponse {
1103
+ collections?: Collection[];
1104
+ metadata?: PlatformPagingMetadata;
1105
+ }
1106
+ export interface GetCollectionRequest {
1107
+ /** Requested collection ID. */
1108
+ _id?: string;
1109
+ /**
1110
+ * Whether to return the `collection.numberOfProducts` field in the response.
1111
+ * Defaults to false, in which case the value of `collection.numberOfProducts` will be 0.
1112
+ */
1113
+ includeNumberOfProducts?: boolean;
1114
+ /** Include description in response. When False, description will be null */
1115
+ includeDescription?: boolean;
1116
+ }
1117
+ export interface GetCollectionResponse {
1118
+ collection?: Collection;
1119
+ }
1120
+ export interface GetCollectionBySlugRequest {
1121
+ /** Slug with which to retrieve collection */
1122
+ slug?: string;
1123
+ }
1124
+ export interface GetCollectionBySlugResponse {
1125
+ collection?: Collection;
1126
+ }
1127
+ export interface ProductOptionsAvailabilityRequest {
1128
+ /** Requested product ID. */
1129
+ _id?: string;
1130
+ /** Array containing the selected options (e.g, color: Blue, size: Large). */
1131
+ options?: Record<string, string>;
1132
+ }
1133
+ export interface ProductOptionsAvailabilityResponse {
1134
+ /** Variant information, given that all the choices were provided. */
1135
+ selectedVariant?: VariantData;
1136
+ /** Information about media items (images, videos, etc.) associated with this choice. */
1137
+ media?: Media;
1138
+ /** Options information (color, size, etc.) for this product, with the inventory and visibility fields updated based on the provided choices. */
1139
+ productOptions?: ProductOption[];
1140
+ /** Whether all the selected choices result in a visible, in-stock variant. */
1141
+ availableForPurchase?: boolean;
1142
+ }
1143
+ export interface VariantData {
1144
+ /** Variant price. */
1145
+ price?: PriceData;
1146
+ /**
1147
+ * Variant price data converted to currency provided in header.
1148
+ * @readonly
1149
+ */
1150
+ convertedPriceData?: PriceData;
1151
+ /** Variant weight. */
1152
+ weight?: number | null;
1153
+ /** Variant SKU (stock keeping unit). */
1154
+ sku?: string;
1155
+ /** Quantity currently in inventory (relevant only when tracking by inventory). */
1156
+ quantity?: number | null;
1157
+ /** Whether the product is currently in stock (relevant only when tracking manually). */
1158
+ inStock?: boolean;
1159
+ /** Whether the variant is visible to customers. */
1160
+ visible?: boolean;
1161
+ }
1162
+ export interface QueryProductVariantsRequest {
1163
+ /** Requested product ID. */
1164
+ _id?: string;
1165
+ /**
1166
+ * The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).
1167
+ * You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs).
1168
+ */
1169
+ choices?: Record<string, string>;
1170
+ /** List of variant IDs (not relevant when passing choices). */
1171
+ variantIds?: string[];
1172
+ paging?: Paging;
1173
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
1174
+ includeMerchantSpecificData?: boolean;
1175
+ }
1176
+ export interface QueryProductVariantsResponse {
1177
+ /** List of variants based on the specified filters and sorting. */
1178
+ variants?: Variant[];
1179
+ metadata?: PagingMetadata;
1180
+ totalResults?: number;
1181
+ }
1182
+ export interface QueryStoreVariantsRequest {
1183
+ /** Query options. */
1184
+ query?: PlatformQuery;
1185
+ }
1186
+ export interface QueryStoreVariantsResponse {
1187
+ /** List of variants based on the specified filters and sorting. */
1188
+ variants?: StoreVariant[];
1189
+ /** Details on the paged set of results returned. */
1190
+ metadata?: PlatformPagingMetadata;
1191
+ }
1192
+ export interface StoreVariant {
1193
+ /** Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen: {productId}.{variantId}. */
1194
+ _id?: string;
1195
+ /** Variant ID. */
1196
+ variantId?: string;
1197
+ /** Product ID. */
1198
+ productId?: string;
1199
+ /** Variant name. */
1200
+ variantName?: string;
1201
+ /** Product name. */
1202
+ productName?: string;
1203
+ /** Whether the variant is managed or represents a product. */
1204
+ managedVariant?: boolean;
1205
+ /** Variant SKU (stock keeping unit). */
1206
+ sku?: string;
1207
+ /** Variant inventory status. */
1208
+ stock?: VariantStock;
1209
+ /** The selected options of this variant. For example, `{"Color": "Blue", "Size": "Large"}`. */
1210
+ choices?: Record<string, string>;
1211
+ /** Collections that include this variant. */
1212
+ collectionIds?: string[];
1213
+ /**
1214
+ * Media items (images, videos) associated with this variant.
1215
+ * @readonly
1216
+ */
1217
+ media?: PlatformMedia;
1218
+ /** preorder information. */
1219
+ preorderInfo?: PreorderInfo;
1220
+ }
1221
+ export interface PlatformMedia extends PlatformMediaMediaOneOf {
1222
+ image?: string;
1223
+ video?: string;
1224
+ }
1225
+ /** @oneof */
1226
+ export interface PlatformMediaMediaOneOf {
1227
+ image?: string;
1228
+ video?: string;
1229
+ }
1230
+ export interface VideoResolution {
1231
+ /** Video URL. */
1232
+ url?: string;
1233
+ /** Video height. */
1234
+ height?: number;
1235
+ /** Video width. */
1236
+ width?: number;
1237
+ /** Video format for example, mp4, hls. */
1238
+ format?: string;
1239
+ }
1240
+ export interface PreorderInfo {
1241
+ /** Whether the item is set to allow preordering. */
1242
+ enabled?: boolean;
1243
+ /** A message that buyer will see when the item is out of stock and preorder enabled */
1244
+ message?: string | null;
1245
+ /** Number of products that can be preordered after stock reaches zero. */
1246
+ limit?: number | null;
1247
+ }
1248
+ export interface QueryStoreVariantsWithBigLimitRequest {
1249
+ /** Query options. */
1250
+ query?: UnlimitedPlatformQuery;
1251
+ }
1252
+ /**
1253
+ * Don't use it unless you have to and know what you do. Prefer PlatformQuery other than this.
1254
+ * It doesn't have max validation for limit but we still MUST have it so implement required validation in your code.
1255
+ */
1256
+ export interface UnlimitedPlatformQuery extends UnlimitedPlatformQueryPagingMethodOneOf {
1257
+ /** Filter object. */
1258
+ filter?: Record<string, any> | null;
1259
+ /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
1260
+ sort?: Sorting[];
1261
+ /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
1262
+ paging?: UnlimitedPlatformPaging;
1263
+ /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
1264
+ cursorPaging?: UnlimitedPlatformCursorPaging;
1265
+ }
1266
+ /** @oneof */
1267
+ export interface UnlimitedPlatformQueryPagingMethodOneOf {
1268
+ /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
1269
+ paging?: UnlimitedPlatformPaging;
1270
+ /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
1271
+ cursorPaging?: UnlimitedPlatformCursorPaging;
1272
+ }
1273
+ /**
1274
+ * Don't use it unless you have to and know what you do. Prefer PlatformPaging or wix.common.Paging other than this.
1275
+ * It doesn't have max validation for limit but we still MUST have it so implement required validation in your code.
1276
+ */
1277
+ export interface UnlimitedPlatformPaging {
1278
+ /** Number of items to load. */
1279
+ limit?: number | null;
1280
+ /** Number of items to skip in the current sort order. */
1281
+ offset?: number | null;
1282
+ }
1283
+ /**
1284
+ * Don't use it unless you have to and know what you do. Prefer PlatformCursorPaging or wix.common.CursorPaging other than this.
1285
+ * It doesn't have max validation for limit but we still MUST have it so implement required validation in your code.
1286
+ */
1287
+ export interface UnlimitedPlatformCursorPaging {
1288
+ /**
1289
+ * The number of items to load.
1290
+ * Cursor token returned in the query response. To be used on the next query request, but not the first query request.
1291
+ */
1292
+ limit?: number | null;
1293
+ /** Cursor returned in last query response. Should not be provided on first page request */
1294
+ cursor?: string | null;
1295
+ }
1296
+ export interface GetStoreVariantRequest {
1297
+ /** Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`. */
1298
+ _id?: string;
1299
+ }
1300
+ export interface GetStoreVariantResponse {
1301
+ /** The requested store variant. */
1302
+ variant?: StoreVariant;
1303
+ }
1304
+ export interface QueryCustomFieldsRequest {
1305
+ /** Requested product ID. */
1306
+ _id?: string;
1307
+ /** Requested field names. */
1308
+ names?: string[];
1309
+ }
1310
+ export interface QueryCustomFieldsResponse {
1311
+ customFields?: Record<string, any>;
1312
+ }
1313
+ export interface BulkQueryCustomFieldsRequest {
1314
+ /** Filter string. */
1315
+ query?: Query;
1316
+ /** Requested field names. */
1317
+ names?: string[];
1318
+ }
1319
+ export interface BulkQueryCustomFieldsResponse {
1320
+ /** ProductId to Custom Fields Map packed in container. */
1321
+ productIdToCustomFields?: Record<string, CustomFieldsContainer>;
1322
+ metadata?: PagingMetadata;
1323
+ totalResults?: number;
1324
+ }
1325
+ export interface CustomFieldsContainer {
1326
+ customFields?: Record<string, any>;
1327
+ }
1328
+ export interface AggregateProductsRequest {
1329
+ /** Filter applied to original data */
1330
+ filter?: Record<string, any> | null;
1331
+ /** This is an object defining aggregation itself */
1332
+ aggregation?: Record<string, any> | null;
1333
+ /** Whether hidden products should be considered. Requires permissions to manage products. */
1334
+ includeHiddenProducts?: boolean;
1335
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
1336
+ includeMerchantSpecificData?: boolean;
1337
+ }
1338
+ export interface AggregateProductsResponse {
1339
+ aggregates?: Record<string, any> | null;
1340
+ }
1341
+ /**
1342
+ * Creates a new product.
1343
+ * @public
1344
+ * @requiredField options.product.costAndProfitData.itemCost
1345
+ * @requiredField options.product.name
1346
+ * @requiredField options.product.priceData
1347
+ * @requiredField options.product.priceData.price
1348
+ */
1349
+ export declare function createProduct(options?: CreateProductOptions): Promise<CreateProductResponse>;
1350
+ export interface CreateProductOptions {
1351
+ /** Product information. */
1352
+ product?: Product;
1353
+ }
1354
+ /**
1355
+ * Updates specified fields in a product.
1356
+ * @param _id - Product ID (generated automatically by the catalog).
1357
+ * @public
1358
+ * @requiredField _id
1359
+ * @requiredField product
1360
+ */
1361
+ export declare function updateProduct(_id: string, product: UpdateProduct): Promise<UpdateProductResponse>;
1362
+ export interface UpdateProduct {
1363
+ /**
1364
+ * Product ID (generated automatically by the catalog).
1365
+ * @readonly
1366
+ */
1367
+ _id?: string;
1368
+ /** Product name. */
1369
+ name?: string | null;
1370
+ /** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
1371
+ slug?: string;
1372
+ /** Whether the product is visible to site visitors. */
1373
+ visible?: boolean | null;
1374
+ /** Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. */
1375
+ productType?: ProductType;
1376
+ /** Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). */
1377
+ description?: string | null;
1378
+ /** Stock keeping unit (if variant management is enabled, SKUs will be set per variant, and this field will be empty). */
1379
+ sku?: string | null;
1380
+ /** Product weight (if variant management is enabled, weight will be set per variant, and this field will be empty). */
1381
+ weight?: number | null;
1382
+ /**
1383
+ * Product weight range. The minimum and maximum weights of all the variants.
1384
+ * @readonly
1385
+ */
1386
+ weightRange?: NumericPropertyRange;
1387
+ /**
1388
+ * Product inventory status (in future this will be writable via Inventory API).
1389
+ * @readonly
1390
+ */
1391
+ stock?: Stock;
1392
+ /**
1393
+ * Deprecated (use `priceData` instead).
1394
+ * @readonly
1395
+ */
1396
+ price?: PriceData;
1397
+ /** Price data. */
1398
+ priceData?: PriceData;
1399
+ /**
1400
+ * Price data, converted to the currency specified in request header.
1401
+ * @readonly
1402
+ */
1403
+ convertedPriceData?: PriceData;
1404
+ /**
1405
+ * Product price range. The minimum and maximum prices of all the variants.
1406
+ * @readonly
1407
+ */
1408
+ priceRange?: NumericPropertyRange;
1409
+ /** Cost and profit data. */
1410
+ costAndProfitData?: CostAndProfitData;
1411
+ /**
1412
+ * Product cost range. The minimum and maximum costs of all the variants.
1413
+ * @readonly
1414
+ */
1415
+ costRange?: NumericPropertyRange;
1416
+ /** Price per unit data. */
1417
+ pricePerUnitData?: PricePerUnitData;
1418
+ /**
1419
+ * Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). Currently writable only from the UI.
1420
+ * @readonly
1421
+ */
1422
+ additionalInfoSections?: AdditionalInfoSection[];
1423
+ /**
1424
+ * Deprecated (use `ribbon` instead).
1425
+ * @readonly
1426
+ */
1427
+ ribbons?: Ribbon[];
1428
+ /**
1429
+ * Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint).
1430
+ * @readonly
1431
+ */
1432
+ media?: Media;
1433
+ /**
1434
+ * Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
1435
+ * @readonly
1436
+ */
1437
+ customTextFields?: CustomTextField[];
1438
+ /** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. */
1439
+ manageVariants?: boolean | null;
1440
+ /** Options (color, size, etc) for this product. */
1441
+ productOptions?: ProductOption[];
1442
+ /**
1443
+ * Product page URL for this product (generated automatically by the server).
1444
+ * @readonly
1445
+ */
1446
+ productPageUrl?: PageUrl;
1447
+ /**
1448
+ * Product’s unique numeric ID (assigned in ascending order).
1449
+ * Primarily used for sorting and filtering when crawling all products.
1450
+ * @readonly
1451
+ */
1452
+ numericId?: string;
1453
+ /**
1454
+ * Inventory item ID - ID referencing the inventory system.
1455
+ * @readonly
1456
+ */
1457
+ inventoryItemId?: string;
1458
+ /** Discount deducted from the product's original price. */
1459
+ discount?: Discount;
1460
+ /**
1461
+ * A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
1462
+ * @readonly
1463
+ */
1464
+ collectionIds?: string[];
1465
+ /**
1466
+ * Product variants, will be provided if the the request was sent with the includeVariants flag.
1467
+ * @readonly
1468
+ */
1469
+ variants?: Variant[];
1470
+ /**
1471
+ * Date and time the product was last updated.
1472
+ * @readonly
1473
+ */
1474
+ lastUpdated?: Date;
1475
+ /**
1476
+ * Date and time the product was created.
1477
+ * @readonly
1478
+ */
1479
+ _createdDate?: Date;
1480
+ /** Custom SEO data for the product. */
1481
+ seoData?: SeoSchema;
1482
+ /** Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". */
1483
+ ribbon?: string | null;
1484
+ /** Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). */
1485
+ brand?: string | null;
1486
+ }
1487
+ /**
1488
+ * Deletes a product.
1489
+ * @param _id - ID of the product to be deleted.
1490
+ * @public
1491
+ * @requiredField _id
1492
+ */
1493
+ export declare function deleteProduct(_id: string): Promise<void>;
1494
+ /**
1495
+ * Updates variants of a specified product.
1496
+ * @param _id - ID of the product with managed variants.
1497
+ * @public
1498
+ * @requiredField _id
1499
+ */
1500
+ export declare function updateVariants(_id: string, options?: UpdateVariantsOptions): Promise<UpdateVariantsResponse>;
1501
+ export interface UpdateVariantsOptions {
1502
+ variants?: VariantOverride[];
1503
+ }
1504
+ /**
1505
+ * Resets all variant information to default values (price = current product price; weight = current product weight; SKU = current product SKU; visibility = true).
1506
+ * @param _id - Product ID.
1507
+ * @public
1508
+ * @requiredField _id
1509
+ */
1510
+ export declare function resetAllVariantData(_id: string): Promise<void>;
1511
+ /**
1512
+ * Adds products to a specified collection.
1513
+ * @param _id - Collection ID.
1514
+ * @public
1515
+ * @requiredField _id
1516
+ */
1517
+ export declare function addProductsToCollection(_id: string, options?: AddProductsToCollectionOptions): Promise<void>;
1518
+ export interface AddProductsToCollectionOptions {
1519
+ /** IDs of the products to add to the collection. */
1520
+ productIds?: string[];
1521
+ }
1522
+ /**
1523
+ * Deletes products from a specified collection.
1524
+ * @param _id - Collection ID.
1525
+ * @param productIds - IDs of the products that will be deleted from the collection.
1526
+ * @public
1527
+ * @requiredField _id
1528
+ * @requiredField productIds
1529
+ */
1530
+ export declare function removeProductsFromCollection(_id: string, productIds: string[]): Promise<void>;
1531
+ /**
1532
+ * Adds media items to a specified product, either via URL or existing media ID.
1533
+ * @param _id - Product ID.
1534
+ * @public
1535
+ * @requiredField _id
1536
+ */
1537
+ export declare function addProductMedia(_id: string, options?: AddProductMediaOptions): Promise<void>;
1538
+ export interface AddProductMediaOptions {
1539
+ media?: MediaDataForWrite[];
1540
+ }
1541
+ /**
1542
+ * Removes specified media items from a product.
1543
+ * Pass an empty array to remove all media items.
1544
+ * @param _id - Product ID.
1545
+ * @public
1546
+ * @requiredField _id
1547
+ */
1548
+ export declare function removeProductMedia(_id: string, options?: RemoveProductMediaOptions): Promise<void>;
1549
+ export interface RemoveProductMediaOptions {
1550
+ /** List of media IDs to remove. Pass an empty array to delete all media items for the product. */
1551
+ mediaIds?: string[];
1552
+ }
1553
+ /**
1554
+ * Links media items that are already associated with a specific product to a choice within the same product.
1555
+ *
1556
+ * Media items can only be set for choices within one option at a time - e.g., if you set media items for some or all of the choices within the Colors option (blue, green, and red), you won't be able to also assign media items to choices within the Size option (S, M, and L).
1557
+ *
1558
+ * To remove all existing media items, call the [Remove Product Media From Choices](https://dev.wix.com/api/rest/wix-stores/catalog/products/remove-product-media-from-choices) endpoint.
1559
+ * @param _id - Product ID.
1560
+ * @public
1561
+ * @requiredField _id
1562
+ * @requiredField options.media.choice
1563
+ * @requiredField options.media.option
1564
+ */
1565
+ export declare function addProductMediaToChoices(_id: string, options?: AddProductMediaToChoicesOptions): Promise<void>;
1566
+ export interface AddProductMediaToChoicesOptions {
1567
+ media?: MediaAssignmentToChoice[];
1568
+ }
1569
+ /**
1570
+ * Removes media items from all or some of a product's choices.
1571
+ * (Media items can only be set for choices within one option at a time - e.g., if you set media items for some or all of the choices within the Colors option (blue, green, and red), you won't be able to also assign media items to choices within the Size option (S, M, and L).)
1572
+ * @param _id - Product ID.
1573
+ * @public
1574
+ * @requiredField _id
1575
+ */
1576
+ export declare function removeProductMediaFromChoices(_id: string, options?: RemoveProductMediaFromChoicesOptions): Promise<void>;
1577
+ export interface RemoveProductMediaFromChoicesOptions {
1578
+ /** Optional - if an empty array is passed, all media will be removed from all choices. */
1579
+ media?: MediaAssignmentToChoice[];
1580
+ }
1581
+ /**
1582
+ * Delete all options from a specific product (only available when variant management is disabled).
1583
+ * @param _id - Product ID.
1584
+ * @public
1585
+ * @requiredField _id
1586
+ */
1587
+ export declare function deleteProductOptions(_id: string): Promise<void>;
1588
+ /**
1589
+ * Deletes a product's brand.
1590
+ * @param _id - Product ID.
1591
+ * @public
1592
+ * @requiredField _id
1593
+ */
1594
+ export declare function removeBrand(_id: string): Promise<void>;
1595
+ /**
1596
+ * Creates a new collection.
1597
+ * @param collection - Collection information.
1598
+ * @public
1599
+ * @requiredField collection
1600
+ * @requiredField collection.name
1601
+ */
1602
+ export declare function createCollection(collection: Collection): Promise<CreateCollectionResponse>;
1603
+ /**
1604
+ * Updates specified properties of a collection.
1605
+ * To add products to a collection, call the [Add Products to Collection](https://dev.wix.com/api/rest/wix-stores/catalog/collection/add-products-to-collection) endpoint.
1606
+ * @param _id - Collection ID (generated automatically by the catalog)
1607
+ * @public
1608
+ * @requiredField _id
1609
+ * @requiredField collection
1610
+ */
1611
+ export declare function updateCollection(_id: string | null, collection: UpdateCollection): Promise<UpdateCollectionResponse>;
1612
+ export interface UpdateCollection {
1613
+ /**
1614
+ * Collection ID (generated automatically by the catalog)
1615
+ * @readonly
1616
+ */
1617
+ _id?: string | null;
1618
+ /** Collection name */
1619
+ name?: string | null;
1620
+ /**
1621
+ * Media items (images, videos etc) associated with this collection. Read only.
1622
+ * @readonly
1623
+ */
1624
+ media?: Media;
1625
+ /**
1626
+ * Number of products in the collection. Read only.
1627
+ * @readonly
1628
+ */
1629
+ numberOfProducts?: number;
1630
+ /** Collection description. The description length without HTML must not exceed 2000 characters (10K includes HTML) */
1631
+ description?: string | null;
1632
+ /** Collection slug */
1633
+ slug?: string | null;
1634
+ /** Collection visibility. Only impacts dynamic pages, no impact on static pages */
1635
+ visible?: boolean | null;
1636
+ }
1637
+ /**
1638
+ * Deletes a collection.
1639
+ * @param _id - Collection ID.
1640
+ * @public
1641
+ * @requiredField _id
1642
+ */
1643
+ export declare function deleteCollection(_id: string): Promise<void>;
1644
+ /**
1645
+ * Deletes a product's ribbon.
1646
+ * @param _id - Product ID.
1647
+ * @public
1648
+ * @requiredField _id
1649
+ */
1650
+ export declare function removeRibbon(_id: string): Promise<void>;
1651
+ /**
1652
+ * Updates a specified property for up to 100 products at a time.
1653
+ * @param ids - Product IDs.
1654
+ * @public
1655
+ * @requiredField ids
1656
+ */
1657
+ export declare function bulkUpdateProducts(ids: string[], options?: BulkUpdateProductsOptions): Promise<BulkUpdateProductsResponse>;
1658
+ export interface BulkUpdateProductsOptions {
1659
+ /** Field to update. */
1660
+ set?: SetValue;
1661
+ }
1662
+ /**
1663
+ * Adjusts a specified numerical property for up to 100 products at a time.
1664
+ * The property can be increased or decreased either by percentage or amount.
1665
+ * @param ids - Product IDs.
1666
+ * @public
1667
+ * @requiredField ids
1668
+ */
1669
+ export declare function bulkAdjustProductProperties(ids: string[], options?: BulkAdjustProductPropertiesOptions): Promise<BulkAdjustProductPropertiesResponse>;
1670
+ export interface BulkAdjustProductPropertiesOptions {
1671
+ /** Numerical property to adjust. */
1672
+ adjust?: AdjustValue;
1673
+ }
1674
+ /**
1675
+ * Returns a list of up to 100 products, given the provided paging, sorting and filtering.
1676
+ * @public */
1677
+ export declare function queryProducts(): ProductsQueryBuilder;
1678
+ interface QueryCursorResult {
1679
+ hasNext: () => boolean;
1680
+ hasPrev: () => boolean;
1681
+ length: number;
1682
+ pageSize: number;
1683
+ }
1684
+ export interface ProductsQueryResult extends QueryCursorResult {
1685
+ items: Product[];
1686
+ query: ProductsQueryBuilder;
1687
+ next: () => Promise<ProductsQueryResult>;
1688
+ prev: () => Promise<ProductsQueryResult>;
1689
+ }
1690
+ export interface ProductsQueryBuilder {
1691
+ /** @param propertyName - Property whose value is compared with `value`.
1692
+ * @param value - Value to compare against.
1693
+ */
1694
+ eq: (propertyName: string, value: any) => ProductsQueryBuilder;
1695
+ /** @param propertyName - Property whose value is compared with `value`.
1696
+ * @param value - Value to compare against.
1697
+ */
1698
+ ne: (propertyName: string, value: any) => ProductsQueryBuilder;
1699
+ /** @param propertyName - Property whose value is compared with `value`.
1700
+ * @param value - Value to compare against.
1701
+ */
1702
+ ge: (propertyName: string, value: any) => ProductsQueryBuilder;
1703
+ /** @param propertyName - Property whose value is compared with `value`.
1704
+ * @param value - Value to compare against.
1705
+ */
1706
+ gt: (propertyName: string, value: any) => ProductsQueryBuilder;
1707
+ /** @param propertyName - Property whose value is compared with `value`.
1708
+ * @param value - Value to compare against.
1709
+ */
1710
+ le: (propertyName: string, value: any) => ProductsQueryBuilder;
1711
+ /** @param propertyName - Property whose value is compared with `value`.
1712
+ * @param value - Value to compare against.
1713
+ */
1714
+ lt: (propertyName: string, value: any) => ProductsQueryBuilder;
1715
+ /** @param propertyName - Property whose value is compared with `string`.
1716
+ * @param string - String to compare against. Case-insensitive.
1717
+ */
1718
+ startsWith: (propertyName: string, value: string) => ProductsQueryBuilder;
1719
+ /** @param propertyName - Property whose value is compared with `values`.
1720
+ * @param values - List of values to compare against.
1721
+ */
1722
+ hasSome: (propertyName: string, value: any[]) => ProductsQueryBuilder;
1723
+ in: (propertyName: string, value: any) => ProductsQueryBuilder;
1724
+ exists: (propertyName: string, value: boolean) => ProductsQueryBuilder;
1725
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
1726
+ ascending: (...propertyNames: string[]) => ProductsQueryBuilder;
1727
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
1728
+ descending: (...propertyNames: string[]) => ProductsQueryBuilder;
1729
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
1730
+ limit: (limit: number) => ProductsQueryBuilder;
1731
+ find: () => Promise<ProductsQueryResult>;
1732
+ }
1733
+ /**
1734
+ * Retrieves a product with the provided ID.
1735
+ * @param _id - Requested product ID.
1736
+ * @public
1737
+ * @requiredField _id
1738
+ */
1739
+ export declare function getProduct(_id: string, options?: GetProductOptions): Promise<GetProductResponse>;
1740
+ export interface GetProductOptions {
1741
+ /** Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products. */
1742
+ includeMerchantSpecificData?: boolean;
1743
+ }
1744
+ export {};