@wix/auto_sdk_stores_read-only-variants-v-3 1.0.16 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +35 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +22 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +187 -81
- package/build/cjs/meta.js.map +1 -1
- package/build/{internal/cjs/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-DmrKxIKF.d.ts → cjs/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-BvjIOy5Y.d.ts} +207 -103
- package/build/es/index.d.mts +35 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +22 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +187 -81
- package/build/es/meta.mjs.map +1 -1
- package/build/{internal/es/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-DmrKxIKF.d.mts → es/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-BvjIOy5Y.d.mts} +207 -103
- package/build/internal/cjs/index.d.ts +16 -16
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +11 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +187 -81
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/{cjs/index-CFBlj8M-.d.ts → internal/cjs/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-DwK-NZst.d.ts} +338 -92
- package/build/internal/es/index.d.mts +16 -16
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +11 -8
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +187 -81
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/{es/index-CFBlj8M-.d.mts → internal/es/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal-DwK-NZst.d.mts} +338 -92
- package/package.json +2 -2
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { SearchSpec, Search } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* A read-only representation of a product variant with enhanced query capabilities.
|
|
5
|
+
*
|
|
6
|
+
* Product variants represent different options of a product, such as size, color, or material combinations.
|
|
7
|
+
* This read-only variant provides direct access to variant data without requiring nested product queries,
|
|
8
|
+
* making it ideal for inventory management, variant comparison, and e-commerce catalog displays.
|
|
9
|
+
*
|
|
10
|
+
* The variant includes both variant-specific information (like SKU, price, and option choices), as well as
|
|
11
|
+
* contextual product information (like product name, visibility, categories) for convenience.
|
|
12
|
+
*/
|
|
3
13
|
interface ReadOnlyVariant extends ReadOnlyVariantTypedPropertiesOneOf {
|
|
4
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Physical properties such as weight and dimensions.
|
|
16
|
+
*
|
|
17
|
+
* Required when the product type is `PHYSICAL`.
|
|
18
|
+
*/
|
|
5
19
|
physicalProperties?: V3VariantPhysicalProperties;
|
|
6
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Digital properties such as downloadable files.
|
|
22
|
+
*
|
|
23
|
+
* Required when the product type is `DIGITAL`.
|
|
24
|
+
*/
|
|
7
25
|
digitalProperties?: V3VariantDigitalProperties;
|
|
8
26
|
/**
|
|
9
27
|
* Variant ID.
|
|
@@ -19,91 +37,113 @@ interface ReadOnlyVariant extends ReadOnlyVariantTypedPropertiesOneOf {
|
|
|
19
37
|
*/
|
|
20
38
|
visible?: boolean | null;
|
|
21
39
|
/**
|
|
22
|
-
*
|
|
40
|
+
* Stock keeping unit (SKU) for inventory tracking and identification.
|
|
41
|
+
*
|
|
42
|
+
* The SKU is typically used for inventory management, order fulfillment, and product identification
|
|
43
|
+
* across different systems.
|
|
23
44
|
* @minLength 1
|
|
24
45
|
* @maxLength 40
|
|
25
46
|
* @readonly
|
|
26
47
|
*/
|
|
27
48
|
sku?: string | null;
|
|
28
49
|
/**
|
|
29
|
-
*
|
|
50
|
+
* Barcode for the variant, typically used for point-of-sale systems and inventory management.
|
|
51
|
+
*
|
|
52
|
+
* Common barcode formats include UPC, EAN, and Code 128. The barcode helps with
|
|
53
|
+
* quick product identification and checkout processes.
|
|
30
54
|
* @minLength 1
|
|
31
55
|
* @maxLength 40
|
|
32
56
|
* @readonly
|
|
33
57
|
*/
|
|
34
58
|
barcode?: string | null;
|
|
35
59
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
60
|
+
* Product option choices that define this variant.
|
|
61
|
+
*
|
|
62
|
+
* Each option choice represents a specific selection for a product option (like "Size: Large" or "Color: Red").
|
|
63
|
+
* An empty list indicates this is the default variant of a product with no managed options.
|
|
38
64
|
* @maxSize 6
|
|
39
65
|
* @readonly
|
|
40
66
|
*/
|
|
41
67
|
optionChoices?: V3OptionChoice[];
|
|
42
68
|
/**
|
|
43
|
-
*
|
|
69
|
+
* Pricing information for the variant.
|
|
44
70
|
* @readonly
|
|
45
71
|
*/
|
|
46
72
|
price?: V3PriceInfo;
|
|
47
73
|
/**
|
|
48
|
-
*
|
|
74
|
+
* Revenue and cost details for business analytics.
|
|
49
75
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* > + Your app has the required `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
|
|
76
|
+
* Includes cost, profit, and profit margin calculations.
|
|
77
|
+
* Returned only when you pass `"MERCHANT_DATA"` to the `fields` parameter.
|
|
53
78
|
* @readonly
|
|
54
79
|
*/
|
|
55
80
|
revenueDetails?: V3RevenueDetails;
|
|
56
81
|
/**
|
|
57
|
-
*
|
|
82
|
+
* Media associated with the variant.
|
|
83
|
+
*
|
|
84
|
+
* Typically includes images, videos, or other media files specific to this variant.
|
|
58
85
|
* @readonly
|
|
59
86
|
*/
|
|
60
87
|
media?: V3ProductMedia;
|
|
61
88
|
/**
|
|
62
|
-
* Subscription
|
|
63
|
-
*
|
|
89
|
+
* Subscription pricing information when the variant is part of subscription plans.
|
|
90
|
+
*
|
|
91
|
+
* Shows calculated prices after applying subscription discounts to the variant's price.
|
|
92
|
+
* Returned only when you pass `"SUBSCRIPTION_PRICES_INFO"` to the `fields` parameter.
|
|
64
93
|
* @readonly
|
|
65
94
|
*/
|
|
66
95
|
subscriptionPricesInfo?: V3SubscriptionPricesInfo;
|
|
67
96
|
/**
|
|
68
|
-
*
|
|
97
|
+
* Current inventory and availability status.
|
|
69
98
|
* @readonly
|
|
70
99
|
*/
|
|
71
100
|
inventoryStatus?: V3InventoryStatus;
|
|
72
101
|
/**
|
|
73
|
-
* Product
|
|
102
|
+
* Product information for context and convenience.
|
|
103
|
+
*
|
|
104
|
+
* Includes essential product details like name, visibility, and categories to avoid
|
|
105
|
+
* requiring separate product API calls when working with variants.
|
|
74
106
|
* @readonly
|
|
75
107
|
*/
|
|
76
108
|
productData?: ProductFields;
|
|
77
109
|
}
|
|
78
110
|
/** @oneof */
|
|
79
111
|
interface ReadOnlyVariantTypedPropertiesOneOf {
|
|
80
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Physical properties such as weight and dimensions.
|
|
114
|
+
*
|
|
115
|
+
* Required when the product type is `PHYSICAL`.
|
|
116
|
+
*/
|
|
81
117
|
physicalProperties?: V3VariantPhysicalProperties;
|
|
82
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* Digital properties such as downloadable files.
|
|
120
|
+
*
|
|
121
|
+
* Required when the product type is `DIGITAL`.
|
|
122
|
+
*/
|
|
83
123
|
digitalProperties?: V3VariantDigitalProperties;
|
|
84
124
|
}
|
|
85
125
|
interface V3OptionChoice {
|
|
86
126
|
/**
|
|
87
|
-
* Option and choice
|
|
127
|
+
* Option and choice identifiers.
|
|
88
128
|
* @readonly
|
|
89
129
|
*/
|
|
90
130
|
optionChoiceIds?: V3OptionChoiceIds;
|
|
91
131
|
/**
|
|
92
|
-
*
|
|
132
|
+
* Human-readable option and choice names.
|
|
93
133
|
* @readonly
|
|
94
134
|
*/
|
|
95
135
|
optionChoiceNames?: V3OptionChoiceNames;
|
|
96
136
|
}
|
|
97
137
|
interface V3OptionChoiceIds {
|
|
98
138
|
/**
|
|
99
|
-
*
|
|
139
|
+
* Product option ID.
|
|
100
140
|
* @minLength 1
|
|
101
141
|
* @maxLength 36
|
|
102
142
|
* @readonly
|
|
103
143
|
*/
|
|
104
144
|
optionId?: string;
|
|
105
145
|
/**
|
|
106
|
-
*
|
|
146
|
+
* Specific choice ID within the option.
|
|
107
147
|
* @format GUID
|
|
108
148
|
* @readonly
|
|
109
149
|
*/
|
|
@@ -111,21 +151,28 @@ interface V3OptionChoiceIds {
|
|
|
111
151
|
}
|
|
112
152
|
interface V3OptionChoiceNames {
|
|
113
153
|
/**
|
|
114
|
-
*
|
|
154
|
+
* Display name of the product option.
|
|
155
|
+
*
|
|
156
|
+
* For example, "Size", "Color", or "Material".
|
|
115
157
|
* @minLength 1
|
|
116
158
|
* @maxLength 50
|
|
117
159
|
* @readonly
|
|
118
160
|
*/
|
|
119
161
|
optionName?: string;
|
|
120
162
|
/**
|
|
121
|
-
*
|
|
163
|
+
* Display name of the chosen option value.
|
|
164
|
+
*
|
|
165
|
+
* For example, "Large", "Red", or "Cotton".
|
|
122
166
|
* @minLength 1
|
|
123
167
|
* @maxLength 50
|
|
124
168
|
* @readonly
|
|
125
169
|
*/
|
|
126
170
|
choiceName?: string;
|
|
127
171
|
/**
|
|
128
|
-
*
|
|
172
|
+
* Visual representation style for the option choice.
|
|
173
|
+
*
|
|
174
|
+
* Determines how the option is displayed in the product selector UI.
|
|
175
|
+
* Common values include "TEXT_CHOICES", "COLOR_CHOICES", or "IMAGE_CHOICES".
|
|
129
176
|
* @readonly
|
|
130
177
|
* @maxLength 50
|
|
131
178
|
*/
|
|
@@ -133,12 +180,15 @@ interface V3OptionChoiceNames {
|
|
|
133
180
|
}
|
|
134
181
|
interface V3PriceInfo {
|
|
135
182
|
/**
|
|
136
|
-
*
|
|
183
|
+
* Current selling price of the variant.
|
|
137
184
|
* @readonly
|
|
138
185
|
*/
|
|
139
186
|
actualPrice?: V3FixedMonetaryAmount;
|
|
140
187
|
/**
|
|
141
|
-
*
|
|
188
|
+
* Original price before any discounts.
|
|
189
|
+
*
|
|
190
|
+
* Used to show customers the savings when the variant is on sale.
|
|
191
|
+
* If not set, no original price is displayed.
|
|
142
192
|
* @readonly
|
|
143
193
|
*/
|
|
144
194
|
compareAtPrice?: V3FixedMonetaryAmount;
|
|
@@ -159,18 +209,22 @@ interface V3FixedMonetaryAmount {
|
|
|
159
209
|
}
|
|
160
210
|
interface V3RevenueDetails {
|
|
161
211
|
/**
|
|
162
|
-
*
|
|
212
|
+
* Cost of the variant for profit calculations.
|
|
213
|
+
*
|
|
214
|
+
* The amount you pay to produce or acquire this variant.
|
|
163
215
|
* @readonly
|
|
164
216
|
*/
|
|
165
217
|
cost?: V3FixedMonetaryAmount;
|
|
166
218
|
/**
|
|
167
|
-
* Profit
|
|
219
|
+
* Profit amount calculated by subtracting cost from the discounted price.
|
|
168
220
|
* @readonly
|
|
169
221
|
*/
|
|
170
222
|
profit?: V3FixedMonetaryAmount;
|
|
171
223
|
/**
|
|
172
|
-
* Profit
|
|
173
|
-
*
|
|
224
|
+
* Profit margin as a percentage of the selling price.
|
|
225
|
+
*
|
|
226
|
+
* Calculated by dividing profit by the discounted price. The result is rounded to 4 decimal places.
|
|
227
|
+
* A value of 0.25 represents a 25% profit margin.
|
|
174
228
|
* @readonly
|
|
175
229
|
* @max 1
|
|
176
230
|
*/
|
|
@@ -287,7 +341,7 @@ declare enum ProductMediaMediaType {
|
|
|
287
341
|
type ProductMediaMediaTypeWithLiterals = ProductMediaMediaType | 'UNKNOWN_MEDIA_TYPE' | 'IMAGE' | 'VIDEO';
|
|
288
342
|
interface V3Thumbnail {
|
|
289
343
|
/**
|
|
290
|
-
* Thumbnail
|
|
344
|
+
* Thumbnail URL.
|
|
291
345
|
* @format WEB_URL
|
|
292
346
|
* @readonly
|
|
293
347
|
*/
|
|
@@ -312,35 +366,45 @@ interface V3Thumbnail {
|
|
|
312
366
|
}
|
|
313
367
|
interface V3VariantPhysicalProperties {
|
|
314
368
|
/**
|
|
315
|
-
*
|
|
369
|
+
* Weight of the variant for shipping calculations.
|
|
370
|
+
*
|
|
371
|
+
* Used for shipping cost calculations and fulfillment planning.
|
|
372
|
+
* Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` parameter.
|
|
316
373
|
* @max 999999999.99
|
|
317
374
|
* @readonly
|
|
318
375
|
*/
|
|
319
376
|
weight?: number | null;
|
|
320
377
|
/**
|
|
321
|
-
* Price per unit
|
|
322
|
-
*
|
|
323
|
-
*
|
|
378
|
+
* Price per unit measurement information.
|
|
379
|
+
*
|
|
380
|
+
* Allows customers to compare prices based on a standard unit (like price per kilogram or per liter).
|
|
381
|
+
* Useful for bulk products or items sold by weight or volume.
|
|
324
382
|
* @readonly
|
|
325
383
|
*/
|
|
326
384
|
pricePerUnit?: V3PricePerUnit;
|
|
327
385
|
}
|
|
328
386
|
interface V3PricePerUnit {
|
|
329
387
|
/**
|
|
330
|
-
* Price per unit
|
|
331
|
-
*
|
|
388
|
+
* Price per unit measurement settings.
|
|
389
|
+
*
|
|
390
|
+
* Defines the unit of measurement for price comparison (e.g., per kilogram, per liter).
|
|
391
|
+
* The measurement unit must correspond to the unit set on the parent product.
|
|
332
392
|
* @readonly
|
|
333
393
|
*/
|
|
334
394
|
settings?: V3PricePerUnitSettings;
|
|
335
395
|
/**
|
|
336
|
-
* Calculated
|
|
337
|
-
*
|
|
396
|
+
* Calculated price per unit value.
|
|
397
|
+
*
|
|
398
|
+
* Shows the variant's price normalized to the standard unit of measurement.
|
|
399
|
+
* For example, if a 500g variant costs $2 and the standard unit is 1kg, this value would be $4.
|
|
338
400
|
* @readonly
|
|
339
401
|
* @decimalValue options { gte:0, lte:999999999, maxScale:3 }
|
|
340
402
|
*/
|
|
341
403
|
value?: string;
|
|
342
404
|
/**
|
|
343
|
-
*
|
|
405
|
+
* Human-readable description of the price per unit.
|
|
406
|
+
*
|
|
407
|
+
* For example, "per kg" or "per liter".
|
|
344
408
|
* @readonly
|
|
345
409
|
* @maxLength 100
|
|
346
410
|
*/
|
|
@@ -390,7 +454,9 @@ declare enum MeasurementUnit {
|
|
|
390
454
|
type MeasurementUnitWithLiterals = MeasurementUnit | 'UNSPECIFIED' | 'ML' | 'CL' | 'L' | 'CBM' | 'MG' | 'G' | 'KG' | 'MM' | 'CM' | 'M' | 'SQM' | 'OZ' | 'LB' | 'FLOZ' | 'PT' | 'QT' | 'GAL' | 'IN' | 'FT' | 'YD' | 'SQFT';
|
|
391
455
|
interface V3VariantDigitalProperties {
|
|
392
456
|
/**
|
|
393
|
-
* Digital file
|
|
457
|
+
* Digital file available for download after purchase.
|
|
458
|
+
*
|
|
459
|
+
* The file that customers receive when they purchase this digital variant.
|
|
394
460
|
* @readonly
|
|
395
461
|
*/
|
|
396
462
|
digitalFile?: V3SecuredMedia;
|
|
@@ -443,7 +509,9 @@ declare enum SecuredMediaFileType {
|
|
|
443
509
|
type SecuredMediaFileTypeWithLiterals = SecuredMediaFileType | 'UNSPECIFIED' | 'SECURE_PICTURE' | 'SECURE_VIDEO' | 'SECURE_DOCUMENT' | 'SECURE_MUSIC' | 'SECURE_ARCHIVE';
|
|
444
510
|
interface V3SubscriptionPricesInfo {
|
|
445
511
|
/**
|
|
446
|
-
*
|
|
512
|
+
* Pricing for different subscription plans.
|
|
513
|
+
*
|
|
514
|
+
* Shows how the variant's price changes with different subscription intervals or discounts.
|
|
447
515
|
* @maxSize 6
|
|
448
516
|
* @readonly
|
|
449
517
|
*/
|
|
@@ -451,31 +519,33 @@ interface V3SubscriptionPricesInfo {
|
|
|
451
519
|
}
|
|
452
520
|
interface V3SubscriptionPrice {
|
|
453
521
|
/**
|
|
454
|
-
* Subscription ID.
|
|
522
|
+
* Subscription plan ID.
|
|
455
523
|
* @format GUID
|
|
456
524
|
* @readonly
|
|
457
525
|
*/
|
|
458
526
|
subscriptionId?: string;
|
|
459
527
|
/**
|
|
460
|
-
*
|
|
528
|
+
* Variant price with subscription discount applied.
|
|
461
529
|
* @readonly
|
|
462
530
|
*/
|
|
463
531
|
price?: V3FixedMonetaryAmount;
|
|
464
532
|
/**
|
|
465
|
-
* Price per unit
|
|
533
|
+
* Price per unit for subscription pricing.
|
|
466
534
|
* @readonly
|
|
467
535
|
*/
|
|
468
536
|
pricePerUnit?: V3SubscriptionPricePerUnit;
|
|
469
537
|
}
|
|
470
538
|
interface V3SubscriptionPricePerUnit {
|
|
471
539
|
/**
|
|
472
|
-
* Calculated
|
|
540
|
+
* Calculated price per unit for the subscription.
|
|
541
|
+
*
|
|
542
|
+
* Takes into account the subscription discount and the variant's price per unit settings.
|
|
473
543
|
* @readonly
|
|
474
544
|
* @decimalValue options { gte:0, lte:999999999, maxScale:3 }
|
|
475
545
|
*/
|
|
476
546
|
value?: string;
|
|
477
547
|
/**
|
|
478
|
-
*
|
|
548
|
+
* Description of the subscription price per unit.
|
|
479
549
|
* @readonly
|
|
480
550
|
* @maxLength 20
|
|
481
551
|
*/
|
|
@@ -483,80 +553,87 @@ interface V3SubscriptionPricePerUnit {
|
|
|
483
553
|
}
|
|
484
554
|
interface V3InventoryStatus {
|
|
485
555
|
/**
|
|
486
|
-
* Whether the variant is in stock.
|
|
556
|
+
* Whether the variant is currently in stock and available for purchase.
|
|
487
557
|
* @readonly
|
|
488
558
|
*/
|
|
489
559
|
inStock?: boolean;
|
|
490
560
|
/**
|
|
491
|
-
* Whether
|
|
561
|
+
* Whether customers can place preorders for this variant when it's out of stock.
|
|
492
562
|
* @readonly
|
|
493
563
|
*/
|
|
494
564
|
preorderEnabled?: boolean;
|
|
495
565
|
}
|
|
496
566
|
interface ProductFields extends ProductFieldsTypedPropertiesOneOf {
|
|
497
567
|
/**
|
|
498
|
-
* Physical properties.
|
|
568
|
+
* Physical product properties such as weight and dimensions.
|
|
499
569
|
*
|
|
500
|
-
* Required when `productType
|
|
570
|
+
* Required when `productType` is `PHYSICAL`.
|
|
501
571
|
*/
|
|
502
572
|
physicalProperties?: V3PhysicalProperties;
|
|
503
573
|
/**
|
|
504
|
-
*
|
|
574
|
+
* Product ID.
|
|
505
575
|
* @minLength 1
|
|
506
576
|
* @maxLength 36
|
|
507
577
|
* @readonly
|
|
508
578
|
*/
|
|
509
579
|
productId?: string;
|
|
510
580
|
/**
|
|
511
|
-
* Product name.
|
|
581
|
+
* Product name displayed to customers.
|
|
512
582
|
* @minLength 1
|
|
513
583
|
* @maxLength 80
|
|
514
584
|
* @readonly
|
|
515
585
|
*/
|
|
516
586
|
name?: string | null;
|
|
517
587
|
/**
|
|
518
|
-
* product
|
|
588
|
+
* Type of product determining available properties and behavior.
|
|
519
589
|
* @readonly
|
|
520
590
|
*/
|
|
521
591
|
productType?: V3ProductTypeWithLiterals;
|
|
522
592
|
/**
|
|
523
|
-
*
|
|
593
|
+
* URL-friendly identifier for the product.
|
|
594
|
+
*
|
|
595
|
+
* Used in product page URLs and for SEO optimization.
|
|
524
596
|
* @format URL_SLUG
|
|
525
597
|
* @readonly
|
|
526
598
|
*/
|
|
527
599
|
slug?: string | null;
|
|
528
600
|
/**
|
|
529
|
-
* Whether the product is visible to site visitors
|
|
601
|
+
* Whether the product is visible to site visitors.
|
|
530
602
|
*
|
|
531
603
|
* Default: `true`
|
|
532
604
|
* @readonly
|
|
533
605
|
*/
|
|
534
606
|
visible?: boolean | null;
|
|
535
607
|
/**
|
|
536
|
-
* Whether the product
|
|
608
|
+
* Whether the product appears in point-of-sale systems.
|
|
537
609
|
*
|
|
538
610
|
* Default: `true`
|
|
539
|
-
*
|
|
611
|
+
* Always `false` for digital products.
|
|
540
612
|
* @readonly
|
|
541
613
|
*/
|
|
542
614
|
visibleInPos?: boolean | null;
|
|
543
615
|
/**
|
|
544
|
-
*
|
|
616
|
+
* Primary category assignment for the product.
|
|
617
|
+
*
|
|
618
|
+
* Determines the main category used for navigation and organization.
|
|
545
619
|
* @format GUID
|
|
546
620
|
* @readonly
|
|
547
621
|
*/
|
|
548
622
|
mainCategoryId?: string | null;
|
|
549
623
|
/**
|
|
550
|
-
* Currency used for
|
|
624
|
+
* Currency used for pricing this product.
|
|
551
625
|
*
|
|
552
|
-
*
|
|
553
|
-
*
|
|
626
|
+
* Three-letter currency code in ISO-4217 alphabetic format.
|
|
627
|
+
* Defaults to the site's currency setting unless specified in request headers.
|
|
628
|
+
* Returned only when you pass `"CURRENCY"` to the `fields` parameter.
|
|
554
629
|
* @format CURRENCY
|
|
555
630
|
* @readonly
|
|
556
631
|
*/
|
|
557
632
|
currency?: string | null;
|
|
558
633
|
/**
|
|
559
|
-
*
|
|
634
|
+
* Revision number, which increments by 1 each time the product is updated.
|
|
635
|
+
* To prevent conflicting changes,
|
|
636
|
+
* the current revision must be passed when updating the product.
|
|
560
637
|
* @readonly
|
|
561
638
|
*/
|
|
562
639
|
revision?: string | null;
|
|
@@ -564,9 +641,9 @@ interface ProductFields extends ProductFieldsTypedPropertiesOneOf {
|
|
|
564
641
|
/** @oneof */
|
|
565
642
|
interface ProductFieldsTypedPropertiesOneOf {
|
|
566
643
|
/**
|
|
567
|
-
* Physical properties.
|
|
644
|
+
* Physical product properties such as weight and dimensions.
|
|
568
645
|
*
|
|
569
|
-
* Required when `productType
|
|
646
|
+
* Required when `productType` is `PHYSICAL`.
|
|
570
647
|
*/
|
|
571
648
|
physicalProperties?: V3PhysicalProperties;
|
|
572
649
|
}
|
|
@@ -582,15 +659,19 @@ declare enum V3ProductType {
|
|
|
582
659
|
type V3ProductTypeWithLiterals = V3ProductType | 'UNKNOWN_PRODUCT_TYPE' | 'PHYSICAL' | 'DIGITAL';
|
|
583
660
|
interface V3PhysicalProperties {
|
|
584
661
|
/**
|
|
585
|
-
* Weight measurement unit.
|
|
586
|
-
*
|
|
662
|
+
* Weight measurement unit information for the product.
|
|
663
|
+
*
|
|
664
|
+
* Defines the unit of measurement (kg, lb, etc.) used for product weight calculations.
|
|
665
|
+
* Returned only when you pass `"WEIGHT_MEASUREMENT_UNIT_INFO"` to the `fields` parameter.
|
|
587
666
|
* @readonly
|
|
588
667
|
*/
|
|
589
668
|
weightMeasurementUnitInfo?: V3WeightMeasurementUnitInfo;
|
|
590
669
|
}
|
|
591
670
|
interface V3WeightMeasurementUnitInfo {
|
|
592
671
|
/**
|
|
593
|
-
*
|
|
672
|
+
* Unit of measurement for weight.
|
|
673
|
+
*
|
|
674
|
+
* Standard units include kilograms (KG), pounds (LB), ounces (OZ), and grams (G).
|
|
594
675
|
* @readonly
|
|
595
676
|
*/
|
|
596
677
|
weightMeasurementUnit?: WeightUnitWithLiterals;
|
|
@@ -622,10 +703,11 @@ declare enum InternalRowState {
|
|
|
622
703
|
/** @enumType */
|
|
623
704
|
type InternalRowStateWithLiterals = InternalRowState | 'UNKNOWN_ROW_STATE' | 'READY' | 'IN_PROCESS' | 'SOFT_DELETED' | 'PERMANENTLY_DELETED';
|
|
624
705
|
interface QueryVariantsRequest {
|
|
625
|
-
/** WQL expression. */
|
|
706
|
+
/** WQL expression for filtering variants. */
|
|
626
707
|
query?: CursorQuery;
|
|
627
708
|
/**
|
|
628
|
-
*
|
|
709
|
+
* List of additional fields to include in the response.
|
|
710
|
+
* See VariantOps.RequestedFields for available options.
|
|
629
711
|
* @maxSize 100
|
|
630
712
|
*/
|
|
631
713
|
fields?: RequestedFieldsWithLiterals[];
|
|
@@ -685,20 +767,43 @@ interface CursorPaging {
|
|
|
685
767
|
cursor?: string | null;
|
|
686
768
|
}
|
|
687
769
|
declare enum RequestedFields {
|
|
688
|
-
/**
|
|
770
|
+
/** Unknown requested field. */
|
|
689
771
|
UNKNOWN_REQUESTED_FIELD = "UNKNOWN_REQUESTED_FIELD",
|
|
772
|
+
/**
|
|
773
|
+
* Include currency information in product data.
|
|
774
|
+
*
|
|
775
|
+
* Returns the currency code (ISO-4217 format) used for pricing this variant.
|
|
776
|
+
* Defaults to the site's currency unless specified in request headers.
|
|
777
|
+
*/
|
|
690
778
|
CURRENCY = "CURRENCY",
|
|
691
|
-
/**
|
|
779
|
+
/**
|
|
780
|
+
* Include merchant-specific data such as cost and profit information.
|
|
781
|
+
*
|
|
782
|
+
* Returns revenue details including cost, profit, and profit margin.
|
|
783
|
+
* Requires `SCOPE.STORES.PRODUCT_READ_ADMIN` permission scope.
|
|
784
|
+
*/
|
|
692
785
|
MERCHANT_DATA = "MERCHANT_DATA",
|
|
786
|
+
/**
|
|
787
|
+
* Include subscription pricing information.
|
|
788
|
+
*
|
|
789
|
+
* Returns calculated prices for different subscription plans with applied discounts.
|
|
790
|
+
* Only relevant for variants that are part of subscription offerings.
|
|
791
|
+
*/
|
|
693
792
|
SUBSCRIPTION_PRICES_INFO = "SUBSCRIPTION_PRICES_INFO",
|
|
793
|
+
/**
|
|
794
|
+
* Include weight measurement unit information.
|
|
795
|
+
*
|
|
796
|
+
* Returns the weight measurement unit (kg, lb, etc.) used for the variant.
|
|
797
|
+
* Useful for shipping calculations and product comparisons.
|
|
798
|
+
*/
|
|
694
799
|
WEIGHT_MEASUREMENT_UNIT_INFO = "WEIGHT_MEASUREMENT_UNIT_INFO"
|
|
695
800
|
}
|
|
696
801
|
/** @enumType */
|
|
697
802
|
type RequestedFieldsWithLiterals = RequestedFields | 'UNKNOWN_REQUESTED_FIELD' | 'CURRENCY' | 'MERCHANT_DATA' | 'SUBSCRIPTION_PRICES_INFO' | 'WEIGHT_MEASUREMENT_UNIT_INFO';
|
|
698
803
|
interface QueryVariantsResponse {
|
|
699
|
-
/**
|
|
804
|
+
/** Variants matching the query criteria. */
|
|
700
805
|
variants?: ReadOnlyVariant[];
|
|
701
|
-
/**
|
|
806
|
+
/** Pagination information with cursors for next pages. */
|
|
702
807
|
pagingMetadata?: CursorPagingMetadata;
|
|
703
808
|
}
|
|
704
809
|
interface CursorPagingMetadata {
|
|
@@ -727,10 +832,11 @@ interface Cursors {
|
|
|
727
832
|
prev?: string | null;
|
|
728
833
|
}
|
|
729
834
|
interface SearchVariantsRequest {
|
|
730
|
-
/** WQL expression */
|
|
835
|
+
/** WQL expression for searching variants. */
|
|
731
836
|
search?: CursorSearch;
|
|
732
837
|
/**
|
|
733
|
-
*
|
|
838
|
+
* List of additional fields to include in the response.
|
|
839
|
+
* See VariantOps.RequestedFields for available options.
|
|
734
840
|
* @maxSize 100
|
|
735
841
|
*/
|
|
736
842
|
fields?: RequestedFieldsWithLiterals[];
|
|
@@ -1007,11 +1113,11 @@ declare enum Mode {
|
|
|
1007
1113
|
/** @enumType */
|
|
1008
1114
|
type ModeWithLiterals = Mode | 'OR' | 'AND';
|
|
1009
1115
|
interface SearchVariantsResponse {
|
|
1010
|
-
/** Variants
|
|
1116
|
+
/** Variants matching the search criteria. */
|
|
1011
1117
|
variants?: ReadOnlyVariant[];
|
|
1012
|
-
/**
|
|
1118
|
+
/** Pagination information with cursors for next pages. */
|
|
1013
1119
|
pagingMetadata?: CursorPagingMetadata;
|
|
1014
|
-
/** Aggregation
|
|
1120
|
+
/** Aggregation results for faceted search. */
|
|
1015
1121
|
aggregationData?: AggregationData;
|
|
1016
1122
|
}
|
|
1017
1123
|
interface AggregationData {
|
|
@@ -1218,10 +1324,11 @@ interface AggregationResultsResultOneOf {
|
|
|
1218
1324
|
nested?: NestedResults;
|
|
1219
1325
|
}
|
|
1220
1326
|
interface DeprecatedSearchVariantsWithOffsetRequest {
|
|
1221
|
-
/**
|
|
1327
|
+
/** Search parameters with offset-based pagination. */
|
|
1222
1328
|
search?: PlatformOffsetSearch;
|
|
1223
1329
|
/**
|
|
1224
|
-
*
|
|
1330
|
+
* List of additional fields to include in the response.
|
|
1331
|
+
* See VariantOps.RequestedFields for available options.
|
|
1225
1332
|
* @maxSize 100
|
|
1226
1333
|
*/
|
|
1227
1334
|
fields?: RequestedFieldsWithLiterals[];
|
|
@@ -1526,11 +1633,11 @@ interface PlatformPaging {
|
|
|
1526
1633
|
offset?: number | null;
|
|
1527
1634
|
}
|
|
1528
1635
|
interface DeprecatedSearchVariantsWithOffsetResponse {
|
|
1529
|
-
/**
|
|
1636
|
+
/** Variants matching the search criteria. */
|
|
1530
1637
|
variants?: ReadOnlyVariant[];
|
|
1531
|
-
/**
|
|
1638
|
+
/** Pagination information for offset-based results. */
|
|
1532
1639
|
pagingMetadata?: PagingMetadata;
|
|
1533
|
-
/** Aggregation
|
|
1640
|
+
/** Aggregation results for faceted search. */
|
|
1534
1641
|
aggregationData?: Aggregation;
|
|
1535
1642
|
}
|
|
1536
1643
|
interface PagingMetadata {
|
|
@@ -1544,9 +1651,9 @@ interface PagingMetadata {
|
|
|
1544
1651
|
tooManyToCount?: boolean | null;
|
|
1545
1652
|
}
|
|
1546
1653
|
interface MigrateProductVariantsRequest {
|
|
1547
|
-
/**
|
|
1654
|
+
/** Product containing variants to migrate. */
|
|
1548
1655
|
product?: Product;
|
|
1549
|
-
/**
|
|
1656
|
+
/** Event sequence number for the migration. */
|
|
1550
1657
|
eventSequence?: string | null;
|
|
1551
1658
|
}
|
|
1552
1659
|
interface Product extends ProductTypedPropertiesOneOf {
|
|
@@ -1729,12 +1836,6 @@ interface Product extends ProductTypedPropertiesOneOf {
|
|
|
1729
1836
|
* @readonly
|
|
1730
1837
|
*/
|
|
1731
1838
|
handle?: string | null;
|
|
1732
|
-
/**
|
|
1733
|
-
* ID of the last import job that affected the product.
|
|
1734
|
-
* @internal
|
|
1735
|
-
* @format GUID
|
|
1736
|
-
*/
|
|
1737
|
-
importId?: string | null;
|
|
1738
1839
|
/**
|
|
1739
1840
|
* Currency used for the pricing of this product, in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format.
|
|
1740
1841
|
*
|
|
@@ -4602,12 +4703,13 @@ declare enum WebhookIdentityType {
|
|
|
4602
4703
|
/** @enumType */
|
|
4603
4704
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
4604
4705
|
/**
|
|
4605
|
-
*
|
|
4606
|
-
*
|
|
4607
|
-
*
|
|
4608
|
-
*
|
|
4609
|
-
*
|
|
4610
|
-
*
|
|
4706
|
+
* Retrieve product variants using structured queries with cursor-based pagination.
|
|
4707
|
+
*
|
|
4708
|
+
* Use this endpoint for simple filtering operations on `id` and `productId`.
|
|
4709
|
+
* For complex queries with free-text search and aggregations, use Search Variants instead.
|
|
4710
|
+
*
|
|
4711
|
+
* Up to 1,000 variants can be returned per request.
|
|
4712
|
+
* @public
|
|
4611
4713
|
* @documentationMaturity preview
|
|
4612
4714
|
* @permissionId WIX_STORES.READ_ONLY_VARIANT_READ
|
|
4613
4715
|
* @permissionId WIX_STORES.READ_ONLY_VARIANT_READ_HIDDEN
|
|
@@ -4618,7 +4720,8 @@ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYM
|
|
|
4618
4720
|
declare function queryVariants(options?: QueryVariantsOptions): VariantsQueryBuilder;
|
|
4619
4721
|
interface QueryVariantsOptions {
|
|
4620
4722
|
/**
|
|
4621
|
-
*
|
|
4723
|
+
* List of additional fields to include in the response.
|
|
4724
|
+
* See VariantOps.RequestedFields for available options.
|
|
4622
4725
|
* @maxSize 100
|
|
4623
4726
|
*/
|
|
4624
4727
|
fields?: RequestedFieldsWithLiterals[] | undefined;
|
|
@@ -4702,7 +4805,8 @@ interface VariantsQueryBuilder {
|
|
|
4702
4805
|
}
|
|
4703
4806
|
interface SearchVariantsOptions {
|
|
4704
4807
|
/**
|
|
4705
|
-
*
|
|
4808
|
+
* List of additional fields to include in the response.
|
|
4809
|
+
* See VariantOps.RequestedFields for available options.
|
|
4706
4810
|
* @maxSize 100
|
|
4707
4811
|
*/
|
|
4708
4812
|
fields?: RequestedFieldsWithLiterals[];
|
|
@@ -4735,7 +4839,7 @@ interface ReadOnlyVariantSearchSpec extends SearchSpec {
|
|
|
4735
4839
|
'optionChoices.optionChoiceIds.choiceId',
|
|
4736
4840
|
'optionChoices.optionChoiceIds.optionId'
|
|
4737
4841
|
];
|
|
4738
|
-
sort: '
|
|
4842
|
+
sort: 'BOTH';
|
|
4739
4843
|
},
|
|
4740
4844
|
{
|
|
4741
4845
|
operators: '*';
|
|
@@ -4756,7 +4860,7 @@ interface ReadOnlyVariantSearchSpec extends SearchSpec {
|
|
|
4756
4860
|
'sku',
|
|
4757
4861
|
'visible'
|
|
4758
4862
|
];
|
|
4759
|
-
sort: '
|
|
4863
|
+
sort: 'BOTH';
|
|
4760
4864
|
}
|
|
4761
4865
|
];
|
|
4762
4866
|
}
|