@wix/stores 1.0.66 → 1.0.68
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/src/stores-catalog-v1-collection.universal.d.ts +8 -8
- package/build/cjs/src/stores-catalog-v1-collection.universal.js.map +1 -1
- package/build/cjs/src/stores-catalog-v1-product.http.d.ts +8 -7
- package/build/cjs/src/stores-catalog-v1-product.http.js +8 -7
- package/build/cjs/src/stores-catalog-v1-product.http.js.map +1 -1
- package/build/cjs/src/stores-catalog-v1-product.public.d.ts +14 -14
- package/build/cjs/src/stores-catalog-v1-product.public.js +18 -18
- package/build/cjs/src/stores-catalog-v1-product.public.js.map +1 -1
- package/build/cjs/src/stores-catalog-v1-product.types.d.ts +37 -23
- package/build/cjs/src/stores-catalog-v1-product.types.js.map +1 -1
- package/build/cjs/src/stores-catalog-v1-product.universal.d.ts +150 -121
- package/build/cjs/src/stores-catalog-v1-product.universal.js +125 -78
- package/build/cjs/src/stores-catalog-v1-product.universal.js.map +1 -1
- package/build/es/src/stores-catalog-v1-collection.universal.d.ts +8 -8
- package/build/es/src/stores-catalog-v1-collection.universal.js.map +1 -1
- package/build/es/src/stores-catalog-v1-product.http.d.ts +8 -7
- package/build/es/src/stores-catalog-v1-product.http.js +8 -7
- package/build/es/src/stores-catalog-v1-product.http.js.map +1 -1
- package/build/es/src/stores-catalog-v1-product.public.d.ts +14 -14
- package/build/es/src/stores-catalog-v1-product.public.js +15 -15
- package/build/es/src/stores-catalog-v1-product.public.js.map +1 -1
- package/build/es/src/stores-catalog-v1-product.types.d.ts +37 -23
- package/build/es/src/stores-catalog-v1-product.types.js.map +1 -1
- package/build/es/src/stores-catalog-v1-product.universal.d.ts +150 -121
- package/build/es/src/stores-catalog-v1-product.universal.js +121 -74
- package/build/es/src/stores-catalog-v1-product.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,7 +4,12 @@ export interface Product {
|
|
|
4
4
|
* @readonly
|
|
5
5
|
*/
|
|
6
6
|
id?: string;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Product name.
|
|
9
|
+
*
|
|
10
|
+
* Min: 1 character
|
|
11
|
+
* Max: 80 characters
|
|
12
|
+
*/
|
|
8
13
|
name?: string | null;
|
|
9
14
|
/** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
|
|
10
15
|
slug?: string;
|
|
@@ -14,9 +19,9 @@ export interface Product {
|
|
|
14
19
|
productType?: ProductType;
|
|
15
20
|
/** Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). */
|
|
16
21
|
description?: string | null;
|
|
17
|
-
/** Stock keeping unit
|
|
22
|
+
/** Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty. */
|
|
18
23
|
sku?: string | null;
|
|
19
|
-
/** Product weight
|
|
24
|
+
/** Product weight. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight will be set per variant, and this field will be empty. */
|
|
20
25
|
weight?: number | null;
|
|
21
26
|
/**
|
|
22
27
|
* Product weight range. The minimum and maximum weights of all the variants.
|
|
@@ -73,7 +78,7 @@ export interface Product {
|
|
|
73
78
|
customTextFields?: CustomTextField[];
|
|
74
79
|
/** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. */
|
|
75
80
|
manageVariants?: boolean | null;
|
|
76
|
-
/** Options
|
|
81
|
+
/** Options for this product. */
|
|
77
82
|
productOptions?: ProductOption[];
|
|
78
83
|
/**
|
|
79
84
|
* Product page URL for this product (generated automatically by the server).
|
|
@@ -325,9 +330,9 @@ export interface ProductOption {
|
|
|
325
330
|
* @readonly
|
|
326
331
|
*/
|
|
327
332
|
optionType?: OptionType;
|
|
328
|
-
/** Option name
|
|
333
|
+
/** Option name. */
|
|
329
334
|
name?: string;
|
|
330
|
-
/** Choices available for this option */
|
|
335
|
+
/** Choices available for this option. */
|
|
331
336
|
choices?: Choice[];
|
|
332
337
|
}
|
|
333
338
|
export declare enum OptionType {
|
|
@@ -336,9 +341,9 @@ export declare enum OptionType {
|
|
|
336
341
|
color = "color"
|
|
337
342
|
}
|
|
338
343
|
export interface Choice {
|
|
339
|
-
/**
|
|
344
|
+
/** Choice value. */
|
|
340
345
|
value?: string;
|
|
341
|
-
/** Choice
|
|
346
|
+
/** Choice description. */
|
|
342
347
|
description?: string;
|
|
343
348
|
/**
|
|
344
349
|
* Media items (images, videos) associated with this choice
|
|
@@ -363,7 +368,11 @@ export interface PageUrl {
|
|
|
363
368
|
path?: string;
|
|
364
369
|
}
|
|
365
370
|
export interface Discount {
|
|
366
|
-
/**
|
|
371
|
+
/**
|
|
372
|
+
* Discount type:
|
|
373
|
+
* + `"AMOUNT"`
|
|
374
|
+
* + `"PERCENT"`
|
|
375
|
+
*/
|
|
367
376
|
type?: DiscountType;
|
|
368
377
|
/** Discount value */
|
|
369
378
|
value?: number;
|
|
@@ -476,7 +485,7 @@ export interface UpdateProductResponse {
|
|
|
476
485
|
product?: Product;
|
|
477
486
|
}
|
|
478
487
|
export interface DeleteProductRequest {
|
|
479
|
-
/** ID of the product to
|
|
488
|
+
/** ID of the product to delete. */
|
|
480
489
|
id: string;
|
|
481
490
|
}
|
|
482
491
|
export interface DeleteProductResponse {
|
|
@@ -490,6 +499,7 @@ export interface BulkDeleteProductsResponse {
|
|
|
490
499
|
export interface UpdateVariantsRequest {
|
|
491
500
|
/** ID of the product with managed variants. */
|
|
492
501
|
id: string;
|
|
502
|
+
/** Variant info to update. */
|
|
493
503
|
variants?: VariantOverride[];
|
|
494
504
|
}
|
|
495
505
|
export interface VariantOverride {
|
|
@@ -524,7 +534,7 @@ export interface ResetAllVariantDataResponse {
|
|
|
524
534
|
export interface AddProductsToCollectionRequest {
|
|
525
535
|
/** Collection ID. Cannot be used to add products to All Products */
|
|
526
536
|
id: string;
|
|
527
|
-
/** IDs of the products to add to the collection. */
|
|
537
|
+
/** IDs of the products to add to the collection, separated by commas. */
|
|
528
538
|
productIds?: string[];
|
|
529
539
|
}
|
|
530
540
|
export interface AddProductsToCollectionResponse {
|
|
@@ -532,7 +542,7 @@ export interface AddProductsToCollectionResponse {
|
|
|
532
542
|
export interface RemoveProductsFromCollectionRequest {
|
|
533
543
|
/** Collection ID. Cannot be used to remove products from All Products */
|
|
534
544
|
id: string;
|
|
535
|
-
/** IDs of the products
|
|
545
|
+
/** IDs of the products to remove from the collection. */
|
|
536
546
|
productIds: string[];
|
|
537
547
|
}
|
|
538
548
|
export interface RemoveProductsFromCollectionResponse {
|
|
@@ -540,6 +550,7 @@ export interface RemoveProductsFromCollectionResponse {
|
|
|
540
550
|
export interface AddProductMediaRequest {
|
|
541
551
|
/** Product ID. */
|
|
542
552
|
id: string;
|
|
553
|
+
/** Sources of media items already uploaded to the Wix site. */
|
|
543
554
|
media?: MediaDataForWrite[];
|
|
544
555
|
}
|
|
545
556
|
export interface MediaDataForWrite extends MediaDataForWriteMediaSourceOneOf {
|
|
@@ -548,9 +559,9 @@ export interface MediaDataForWrite extends MediaDataForWriteMediaSourceOneOf {
|
|
|
548
559
|
/** Media external URL (for new media items). */
|
|
549
560
|
url?: string;
|
|
550
561
|
/**
|
|
551
|
-
*
|
|
562
|
+
* Assign this media item to a specific product choice.
|
|
552
563
|
* 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).
|
|
553
|
-
* You may clear existing media from choices
|
|
564
|
+
* You may clear existing media from choices with the [Remove Product Media From Choices](/catalog/products/remove-product-media-from-choices).
|
|
554
565
|
*/
|
|
555
566
|
choice?: OptionAndChoice;
|
|
556
567
|
}
|
|
@@ -562,7 +573,9 @@ export interface MediaDataForWriteMediaSourceOneOf {
|
|
|
562
573
|
url?: string;
|
|
563
574
|
}
|
|
564
575
|
export interface OptionAndChoice {
|
|
576
|
+
/** Option to add the media to. */
|
|
565
577
|
option?: string;
|
|
578
|
+
/** Choice to add the media to. */
|
|
566
579
|
choice?: string;
|
|
567
580
|
}
|
|
568
581
|
export interface AddProductMediaResponse {
|
|
@@ -578,12 +591,13 @@ export interface RemoveProductMediaResponse {
|
|
|
578
591
|
export interface AddProductMediaToChoicesRequest {
|
|
579
592
|
/** Product ID. */
|
|
580
593
|
id: string;
|
|
594
|
+
/** Product media items and the choices to add the media to. */
|
|
581
595
|
media?: MediaAssignmentToChoice[];
|
|
582
596
|
}
|
|
583
597
|
export interface MediaAssignmentToChoice {
|
|
584
|
-
/**
|
|
598
|
+
/** Option name. */
|
|
585
599
|
option?: string;
|
|
586
|
-
/** Choice
|
|
600
|
+
/** Choice name. */
|
|
587
601
|
choice?: string;
|
|
588
602
|
/** Media IDs (available via the Query Product endpoint). */
|
|
589
603
|
mediaIds?: string[];
|
|
@@ -591,15 +605,15 @@ export interface MediaAssignmentToChoice {
|
|
|
591
605
|
export interface AddProductMediaToChoicesResponse {
|
|
592
606
|
}
|
|
593
607
|
export interface RemoveProductMediaFromChoicesRequest {
|
|
594
|
-
/** Product ID. */
|
|
608
|
+
/** Product ID from whose choices to remove media items. */
|
|
595
609
|
id: string;
|
|
596
|
-
/**
|
|
610
|
+
/** Media to remove from choices. If an empty array is passed, all media will be removed from all choices for the given product. */
|
|
597
611
|
media?: MediaAssignmentToChoice[];
|
|
598
612
|
}
|
|
599
613
|
export interface RemoveProductMediaFromChoicesResponse {
|
|
600
614
|
}
|
|
601
615
|
export interface DeleteProductOptionsRequest {
|
|
602
|
-
/**
|
|
616
|
+
/** ID of the product with options to delete. */
|
|
603
617
|
id: string;
|
|
604
618
|
}
|
|
605
619
|
export interface DeleteProductOptionsResponse {
|
|
@@ -873,8 +887,8 @@ export interface PercentageData {
|
|
|
873
887
|
*/
|
|
874
888
|
roundToInt?: boolean;
|
|
875
889
|
/**
|
|
876
|
-
* Percentage value, as a whole number (integer) between
|
|
877
|
-
* For example, pass 100 to increase value by 100% (multiply original value by 2).
|
|
890
|
+
* Percentage value, as a whole number (integer) between `-100`` and `1000``.
|
|
891
|
+
* For example, pass `100`` to increase value by 100% (multiply original value by 2).
|
|
878
892
|
*/
|
|
879
893
|
rate?: number;
|
|
880
894
|
}
|
|
@@ -1129,7 +1143,7 @@ export interface GetCollectionRequest {
|
|
|
1129
1143
|
id: string;
|
|
1130
1144
|
/**
|
|
1131
1145
|
* Whether to return the `collection.numberOfProducts` field in the response.
|
|
1132
|
-
* Defaults to false
|
|
1146
|
+
* Defaults to `false`, in which case the value of `collection.numberOfProducts` will be `0`.
|
|
1133
1147
|
*/
|
|
1134
1148
|
includeNumberOfProducts?: boolean;
|
|
1135
1149
|
}
|
|
@@ -1148,7 +1162,7 @@ export interface GetCollectionBySlugResponse {
|
|
|
1148
1162
|
export interface ProductOptionsAvailabilityRequest {
|
|
1149
1163
|
/** Requested product ID. */
|
|
1150
1164
|
id: string;
|
|
1151
|
-
/** Array containing the selected options (e.g, color: Blue, size: Large). */
|
|
1165
|
+
/** Set of key-value pairs. Array containing the selected options (e.g, color: Blue, size: Large). */
|
|
1152
1166
|
options?: Record<string, string>;
|
|
1153
1167
|
}
|
|
1154
1168
|
export interface ProductOptionsAvailabilityResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores-catalog-v1-product.types.js","sourceRoot":"","sources":["../../../src/stores-catalog-v1-product.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"stores-catalog-v1-product.types.js","sourceRoot":"","sources":["../../../src/stores-catalog-v1-product.types.ts"],"names":[],"mappings":";;;AAgIA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,oEAAqD,CAAA;IACrD,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AA4BD,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,gDAA6B,CAAA;IAC7B,oEAAiD,CAAA;AACnD,CA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