@wix/stores 1.0.59 → 1.0.61
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 +2 -1
- package/build/cjs/index.js +3 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/stores-catalog-v1-product.http.d.ts +21 -1
- package/build/cjs/src/stores-catalog-v1-product.http.js +283 -1
- package/build/cjs/src/stores-catalog-v1-product.http.js.map +1 -1
- package/build/cjs/src/stores-catalog-v1-product.public.d.ts +35 -0
- package/build/cjs/src/stores-catalog-v1-product.public.js +182 -0
- package/build/cjs/src/stores-catalog-v1-product.public.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.types.d.ts +37 -32
- package/build/cjs/src/stores-catalog-v1-product.types.js.map +1 -1
- package/build/cjs/src/{stores-catalog-v1-product-products.universal.d.ts → stores-catalog-v1-product.universal.d.ts} +446 -8
- package/build/cjs/src/stores-catalog-v1-product.universal.js +1657 -0
- package/build/cjs/src/stores-catalog-v1-product.universal.js.map +1 -0
- package/build/cjs/src/stores-v1-abandoned-cart.http.d.ts +6 -0
- package/build/cjs/src/stores-v1-abandoned-cart.http.js +103 -0
- package/build/cjs/src/stores-v1-abandoned-cart.http.js.map +1 -0
- package/build/cjs/src/stores-v1-abandoned-cart.public.d.ts +9 -0
- package/build/cjs/src/stores-v1-abandoned-cart.public.js +22 -0
- package/build/cjs/src/stores-v1-abandoned-cart.public.js.map +1 -0
- package/build/cjs/src/stores-v1-abandoned-cart.types.d.ts +189 -0
- package/build/cjs/src/stores-v1-abandoned-cart.types.js +30 -0
- package/build/cjs/src/stores-v1-abandoned-cart.types.js.map +1 -0
- package/build/cjs/src/stores-v1-abandoned-cart.universal.d.ts +214 -0
- package/build/cjs/src/stores-v1-abandoned-cart.universal.js +180 -0
- package/build/cjs/src/stores-v1-abandoned-cart.universal.js.map +1 -0
- package/build/cjs/src/stores-v1-subscription-option.http.js +6 -0
- package/build/cjs/src/stores-v1-subscription-option.http.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory.http.d.ts +29 -3
- package/build/cjs/src/stores-v2-inventory.http.js +177 -3
- package/build/cjs/src/stores-v2-inventory.http.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory.public.d.ts +7 -4
- package/build/cjs/src/stores-v2-inventory.public.js +21 -3
- package/build/cjs/src/stores-v2-inventory.public.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory.types.d.ts +2 -2
- package/build/cjs/src/stores-v2-inventory.universal.d.ts +107 -17
- package/build/cjs/src/stores-v2-inventory.universal.js +193 -11
- package/build/cjs/src/stores-v2-inventory.universal.js.map +1 -1
- package/build/es/index.d.ts +2 -1
- package/build/es/index.js +2 -1
- package/build/es/index.js.map +1 -1
- package/build/es/src/stores-catalog-v1-product.http.d.ts +21 -1
- package/build/es/src/stores-catalog-v1-product.http.js +275 -0
- package/build/es/src/stores-catalog-v1-product.http.js.map +1 -1
- package/build/es/src/stores-catalog-v1-product.public.d.ts +35 -0
- package/build/es/src/stores-catalog-v1-product.public.js +144 -0
- package/build/es/src/stores-catalog-v1-product.public.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.types.d.ts +37 -32
- package/build/es/src/stores-catalog-v1-product.types.js.map +1 -1
- package/build/es/src/{stores-catalog-v1-product-products.universal.d.ts → stores-catalog-v1-product.universal.d.ts} +446 -8
- package/build/es/src/stores-catalog-v1-product.universal.js +1607 -0
- package/build/es/src/stores-catalog-v1-product.universal.js.map +1 -0
- package/build/es/src/stores-v1-abandoned-cart.http.d.ts +6 -0
- package/build/es/src/stores-v1-abandoned-cart.http.js +98 -0
- package/build/es/src/stores-v1-abandoned-cart.http.js.map +1 -0
- package/build/es/src/stores-v1-abandoned-cart.public.d.ts +9 -0
- package/build/es/src/stores-v1-abandoned-cart.public.js +14 -0
- package/build/es/src/stores-v1-abandoned-cart.public.js.map +1 -0
- package/build/es/src/stores-v1-abandoned-cart.types.d.ts +189 -0
- package/build/es/src/stores-v1-abandoned-cart.types.js +27 -0
- package/build/es/src/stores-v1-abandoned-cart.types.js.map +1 -0
- package/build/es/src/stores-v1-abandoned-cart.universal.d.ts +214 -0
- package/build/es/src/stores-v1-abandoned-cart.universal.js +156 -0
- package/build/es/src/stores-v1-abandoned-cart.universal.js.map +1 -0
- package/build/es/src/stores-v1-subscription-option.http.js +6 -0
- package/build/es/src/stores-v1-subscription-option.http.js.map +1 -1
- package/build/es/src/stores-v2-inventory.http.d.ts +29 -3
- package/build/es/src/stores-v2-inventory.http.js +173 -2
- package/build/es/src/stores-v2-inventory.http.js.map +1 -1
- package/build/es/src/stores-v2-inventory.public.d.ts +7 -4
- package/build/es/src/stores-v2-inventory.public.js +18 -3
- package/build/es/src/stores-v2-inventory.public.js.map +1 -1
- package/build/es/src/stores-v2-inventory.types.d.ts +2 -2
- package/build/es/src/stores-v2-inventory.universal.d.ts +107 -17
- package/build/es/src/stores-v2-inventory.universal.js +189 -10
- package/build/es/src/stores-v2-inventory.universal.js.map +1 -1
- package/package.json +2 -2
- package/build/cjs/src/stores-catalog-v1-product-products.http.d.ts +0 -62
- package/build/cjs/src/stores-catalog-v1-product-products.http.js +0 -845
- package/build/cjs/src/stores-catalog-v1-product-products.http.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product-products.public.d.ts +0 -9
- package/build/cjs/src/stores-catalog-v1-product-products.public.js +0 -26
- package/build/cjs/src/stores-catalog-v1-product-products.public.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product-products.types.d.ts +0 -1398
- package/build/cjs/src/stores-catalog-v1-product-products.types.js +0 -69
- package/build/cjs/src/stores-catalog-v1-product-products.types.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product-products.universal.js +0 -232
- package/build/cjs/src/stores-catalog-v1-product-products.universal.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product-products.http.d.ts +0 -62
- package/build/es/src/stores-catalog-v1-product-products.http.js +0 -821
- package/build/es/src/stores-catalog-v1-product-products.http.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product-products.public.d.ts +0 -9
- package/build/es/src/stores-catalog-v1-product-products.public.js +0 -14
- package/build/es/src/stores-catalog-v1-product-products.public.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product-products.types.d.ts +0 -1398
- package/build/es/src/stores-catalog-v1-product-products.types.js +0 -66
- package/build/es/src/stores-catalog-v1-product-products.types.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product-products.universal.js +0 -208
- package/build/es/src/stores-catalog-v1-product-products.universal.js.map +0 -1
|
@@ -528,7 +528,7 @@ export interface ResetAllVariantDataRequest {
|
|
|
528
528
|
export interface ResetAllVariantDataResponse {
|
|
529
529
|
}
|
|
530
530
|
export interface AddProductsToCollectionRequest {
|
|
531
|
-
/** Collection ID. */
|
|
531
|
+
/** Collection ID. Cannot be used to add products to All Products */
|
|
532
532
|
_id: string;
|
|
533
533
|
/** IDs of the products to add to the collection. */
|
|
534
534
|
productIds?: string[];
|
|
@@ -536,7 +536,7 @@ export interface AddProductsToCollectionRequest {
|
|
|
536
536
|
export interface AddProductsToCollectionResponse {
|
|
537
537
|
}
|
|
538
538
|
export interface RemoveProductsFromCollectionRequest {
|
|
539
|
-
/** Collection ID. */
|
|
539
|
+
/** Collection ID. Cannot be used to remove products from All Products */
|
|
540
540
|
_id: string;
|
|
541
541
|
/** IDs of the products that will be deleted from the collection. */
|
|
542
542
|
productIds: string[];
|
|
@@ -690,7 +690,7 @@ export interface UpdateCollectionResponse {
|
|
|
690
690
|
collection?: Collection;
|
|
691
691
|
}
|
|
692
692
|
export interface DeleteCollectionRequest {
|
|
693
|
-
/** ID of the collection to delete. */
|
|
693
|
+
/** ID of the collection to delete. Cannot be used to delete All Products */
|
|
694
694
|
_id: string;
|
|
695
695
|
}
|
|
696
696
|
export interface DeleteCollectionResponse {
|
|
@@ -1132,7 +1132,7 @@ export interface QueryCollectionsPlatformizedResponse {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
export interface GetCollectionRequest {
|
|
1134
1134
|
/** Requested collection ID. */
|
|
1135
|
-
_id
|
|
1135
|
+
_id: string;
|
|
1136
1136
|
/**
|
|
1137
1137
|
* Whether to return the `collection.numberOfProducts` field in the response.
|
|
1138
1138
|
* Defaults to false, in which case the value of `collection.numberOfProducts` will be 0.
|
|
@@ -1145,7 +1145,7 @@ export interface GetCollectionResponse {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
export interface GetCollectionBySlugRequest {
|
|
1147
1147
|
/** Slug of the collection to retrieve. */
|
|
1148
|
-
slug
|
|
1148
|
+
slug: string;
|
|
1149
1149
|
}
|
|
1150
1150
|
export interface GetCollectionBySlugResponse {
|
|
1151
1151
|
/** The requested collection. */
|
|
@@ -1153,7 +1153,7 @@ export interface GetCollectionBySlugResponse {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
export interface ProductOptionsAvailabilityRequest {
|
|
1155
1155
|
/** Requested product ID. */
|
|
1156
|
-
_id
|
|
1156
|
+
_id: string;
|
|
1157
1157
|
/** Array containing the selected options (e.g, color: Blue, size: Large). */
|
|
1158
1158
|
options?: Record<string, string>;
|
|
1159
1159
|
}
|
|
@@ -1188,7 +1188,7 @@ export interface VariantData {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
export interface QueryProductVariantsRequest {
|
|
1190
1190
|
/** Requested product ID. */
|
|
1191
|
-
_id
|
|
1191
|
+
_id: string;
|
|
1192
1192
|
/**
|
|
1193
1193
|
* The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).
|
|
1194
1194
|
* 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).
|
|
@@ -1322,7 +1322,7 @@ export interface UnlimitedPlatformCursorPaging {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
export interface GetStoreVariantRequest {
|
|
1324
1324
|
/** Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`. */
|
|
1325
|
-
_id
|
|
1325
|
+
_id: string;
|
|
1326
1326
|
}
|
|
1327
1327
|
export interface GetStoreVariantResponse {
|
|
1328
1328
|
/** The requested store variant. */
|
|
@@ -1365,6 +1365,355 @@ export interface AggregateProductsRequest {
|
|
|
1365
1365
|
export interface AggregateProductsResponse {
|
|
1366
1366
|
aggregates?: Record<string, any> | null;
|
|
1367
1367
|
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Creates a new product.
|
|
1370
|
+
* @public
|
|
1371
|
+
* @documentationMaturity preview
|
|
1372
|
+
* @requiredField options.product.costAndProfitData.itemCost
|
|
1373
|
+
* @requiredField options.product.name
|
|
1374
|
+
* @requiredField options.product.priceData
|
|
1375
|
+
* @requiredField options.product.priceData.price
|
|
1376
|
+
*/
|
|
1377
|
+
export declare function createProduct(options?: CreateProductOptions): Promise<CreateProductResponse>;
|
|
1378
|
+
export interface CreateProductOptions {
|
|
1379
|
+
/** Product information. */
|
|
1380
|
+
product?: Product;
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Updates specified fields in a product.
|
|
1384
|
+
* @param _id - Product ID (generated automatically by the catalog).
|
|
1385
|
+
* @public
|
|
1386
|
+
* @documentationMaturity preview
|
|
1387
|
+
* @requiredField _id
|
|
1388
|
+
* @requiredField product
|
|
1389
|
+
*/
|
|
1390
|
+
export declare function updateProduct(_id: string, product: UpdateProduct): Promise<UpdateProductResponse>;
|
|
1391
|
+
export interface UpdateProduct {
|
|
1392
|
+
/**
|
|
1393
|
+
* Product ID (generated automatically by the catalog).
|
|
1394
|
+
* @readonly
|
|
1395
|
+
*/
|
|
1396
|
+
_id?: string;
|
|
1397
|
+
/** Product name. */
|
|
1398
|
+
name?: string | null;
|
|
1399
|
+
/** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
|
|
1400
|
+
slug?: string;
|
|
1401
|
+
/** Whether the product is visible to site visitors. */
|
|
1402
|
+
visible?: boolean | null;
|
|
1403
|
+
/** Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. */
|
|
1404
|
+
productType?: ProductType;
|
|
1405
|
+
/** Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). */
|
|
1406
|
+
description?: string | null;
|
|
1407
|
+
/** Stock keeping unit (if variant management is enabled, SKUs will be set per variant, and this field will be empty). */
|
|
1408
|
+
sku?: string | null;
|
|
1409
|
+
/** Product weight (if variant management is enabled, weight will be set per variant, and this field will be empty). */
|
|
1410
|
+
weight?: number | null;
|
|
1411
|
+
/**
|
|
1412
|
+
* Product weight range. The minimum and maximum weights of all the variants.
|
|
1413
|
+
* @readonly
|
|
1414
|
+
*/
|
|
1415
|
+
weightRange?: NumericPropertyRange;
|
|
1416
|
+
/**
|
|
1417
|
+
* Product inventory status (in future this will be writable via Inventory API).
|
|
1418
|
+
* @readonly
|
|
1419
|
+
*/
|
|
1420
|
+
stock?: Stock;
|
|
1421
|
+
/**
|
|
1422
|
+
* Deprecated (use `priceData` instead).
|
|
1423
|
+
* @readonly
|
|
1424
|
+
*/
|
|
1425
|
+
price?: PriceData;
|
|
1426
|
+
/** Price data. */
|
|
1427
|
+
priceData?: PriceData;
|
|
1428
|
+
/**
|
|
1429
|
+
* Price data, converted to the currency specified in request header.
|
|
1430
|
+
* @readonly
|
|
1431
|
+
*/
|
|
1432
|
+
convertedPriceData?: PriceData;
|
|
1433
|
+
/**
|
|
1434
|
+
* Product price range. The minimum and maximum prices of all the variants.
|
|
1435
|
+
* @readonly
|
|
1436
|
+
*/
|
|
1437
|
+
priceRange?: NumericPropertyRange;
|
|
1438
|
+
/** Cost and profit data. */
|
|
1439
|
+
costAndProfitData?: CostAndProfitData;
|
|
1440
|
+
/**
|
|
1441
|
+
* Product cost range. The minimum and maximum costs of all the variants.
|
|
1442
|
+
* @readonly
|
|
1443
|
+
*/
|
|
1444
|
+
costRange?: NumericPropertyRange;
|
|
1445
|
+
/** Price per unit data. */
|
|
1446
|
+
pricePerUnitData?: PricePerUnitData;
|
|
1447
|
+
/** Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). */
|
|
1448
|
+
additionalInfoSections?: AdditionalInfoSection[];
|
|
1449
|
+
/**
|
|
1450
|
+
* Deprecated (use `ribbon` instead).
|
|
1451
|
+
* @readonly
|
|
1452
|
+
*/
|
|
1453
|
+
ribbons?: Ribbon[];
|
|
1454
|
+
/**
|
|
1455
|
+
* 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).
|
|
1456
|
+
* @readonly
|
|
1457
|
+
*/
|
|
1458
|
+
media?: Media;
|
|
1459
|
+
/**
|
|
1460
|
+
* Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
|
|
1461
|
+
* @readonly
|
|
1462
|
+
*/
|
|
1463
|
+
customTextFields?: CustomTextField[];
|
|
1464
|
+
/** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. */
|
|
1465
|
+
manageVariants?: boolean | null;
|
|
1466
|
+
/** Options (color, size, etc) for this product. */
|
|
1467
|
+
productOptions?: ProductOption[];
|
|
1468
|
+
/**
|
|
1469
|
+
* Product page URL for this product (generated automatically by the server).
|
|
1470
|
+
* @readonly
|
|
1471
|
+
*/
|
|
1472
|
+
productPageUrl?: PageUrl;
|
|
1473
|
+
/**
|
|
1474
|
+
* Product’s unique numeric ID (assigned in ascending order).
|
|
1475
|
+
* Primarily used for sorting and filtering when crawling all products.
|
|
1476
|
+
* @readonly
|
|
1477
|
+
*/
|
|
1478
|
+
numericId?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* Inventory item ID - ID referencing the inventory system.
|
|
1481
|
+
* @readonly
|
|
1482
|
+
*/
|
|
1483
|
+
inventoryItemId?: string;
|
|
1484
|
+
/** Discount deducted from the product's original price. */
|
|
1485
|
+
discount?: Discount;
|
|
1486
|
+
/**
|
|
1487
|
+
* A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
|
|
1488
|
+
* @readonly
|
|
1489
|
+
*/
|
|
1490
|
+
collectionIds?: string[];
|
|
1491
|
+
/**
|
|
1492
|
+
* Product variants, will be provided if the the request was sent with the includeVariants flag.
|
|
1493
|
+
* @readonly
|
|
1494
|
+
*/
|
|
1495
|
+
variants?: Variant[];
|
|
1496
|
+
/**
|
|
1497
|
+
* Date and time the product was last updated.
|
|
1498
|
+
* @readonly
|
|
1499
|
+
*/
|
|
1500
|
+
lastUpdated?: Date;
|
|
1501
|
+
/**
|
|
1502
|
+
* Date and time the product was created.
|
|
1503
|
+
* @readonly
|
|
1504
|
+
*/
|
|
1505
|
+
_createdDate?: Date;
|
|
1506
|
+
/** Custom SEO data for the product. */
|
|
1507
|
+
seoData?: SeoSchema;
|
|
1508
|
+
/** Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". */
|
|
1509
|
+
ribbon?: string | null;
|
|
1510
|
+
/** 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). */
|
|
1511
|
+
brand?: string | null;
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* Deletes a product.
|
|
1515
|
+
* @param _id - ID of the product to be deleted.
|
|
1516
|
+
* @public
|
|
1517
|
+
* @documentationMaturity preview
|
|
1518
|
+
* @requiredField _id
|
|
1519
|
+
*/
|
|
1520
|
+
export declare function deleteProduct(_id: string): Promise<void>;
|
|
1521
|
+
/**
|
|
1522
|
+
* Updates variants of a specified product.
|
|
1523
|
+
* @param _id - ID of the product with managed variants.
|
|
1524
|
+
* @public
|
|
1525
|
+
* @documentationMaturity preview
|
|
1526
|
+
* @requiredField _id
|
|
1527
|
+
*/
|
|
1528
|
+
export declare function updateVariants(_id: string, options?: UpdateVariantsOptions): Promise<UpdateVariantsResponse>;
|
|
1529
|
+
export interface UpdateVariantsOptions {
|
|
1530
|
+
variants?: VariantOverride[];
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* Resets all variant information to default values (price = current product price; weight = current product weight; SKU = current product SKU; visibility = true).
|
|
1534
|
+
* @param _id - Product ID.
|
|
1535
|
+
* @public
|
|
1536
|
+
* @documentationMaturity preview
|
|
1537
|
+
* @requiredField _id
|
|
1538
|
+
*/
|
|
1539
|
+
export declare function resetAllVariantData(_id: string): Promise<void>;
|
|
1540
|
+
/**
|
|
1541
|
+
* Adds products to a specified collection.
|
|
1542
|
+
* @param _id - Collection ID. Cannot be used to add products to All Products
|
|
1543
|
+
* @public
|
|
1544
|
+
* @documentationMaturity preview
|
|
1545
|
+
* @requiredField _id
|
|
1546
|
+
*/
|
|
1547
|
+
export declare function addProductsToCollection(_id: string, options?: AddProductsToCollectionOptions): Promise<void>;
|
|
1548
|
+
export interface AddProductsToCollectionOptions {
|
|
1549
|
+
/** IDs of the products to add to the collection. */
|
|
1550
|
+
productIds?: string[];
|
|
1551
|
+
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Deletes products from a specified collection.
|
|
1554
|
+
* @param _id - Collection ID. Cannot be used to remove products from All Products
|
|
1555
|
+
* @param productIds - IDs of the products that will be deleted from the collection.
|
|
1556
|
+
* @public
|
|
1557
|
+
* @documentationMaturity preview
|
|
1558
|
+
* @requiredField _id
|
|
1559
|
+
* @requiredField productIds
|
|
1560
|
+
*/
|
|
1561
|
+
export declare function removeProductsFromCollection(_id: string, productIds: string[]): Promise<void>;
|
|
1562
|
+
/**
|
|
1563
|
+
* Adds media items to a specified product, either via URL or existing media ID.
|
|
1564
|
+
* @param _id - Product ID.
|
|
1565
|
+
* @public
|
|
1566
|
+
* @documentationMaturity preview
|
|
1567
|
+
* @requiredField _id
|
|
1568
|
+
*/
|
|
1569
|
+
export declare function addProductMedia(_id: string, options?: AddProductMediaOptions): Promise<void>;
|
|
1570
|
+
export interface AddProductMediaOptions {
|
|
1571
|
+
media?: MediaDataForWrite[];
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Removes specified media items from a product.
|
|
1575
|
+
* Pass an empty array to remove all media items.
|
|
1576
|
+
* @param _id - Product ID.
|
|
1577
|
+
* @public
|
|
1578
|
+
* @documentationMaturity preview
|
|
1579
|
+
* @requiredField _id
|
|
1580
|
+
*/
|
|
1581
|
+
export declare function removeProductMedia(_id: string, options?: RemoveProductMediaOptions): Promise<void>;
|
|
1582
|
+
export interface RemoveProductMediaOptions {
|
|
1583
|
+
/** List of media IDs to remove. Pass an empty array to delete all media items for the product. */
|
|
1584
|
+
mediaIds?: string[];
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Links media items that are already associated with a specific product to a choice within the same product.
|
|
1588
|
+
*
|
|
1589
|
+
* 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).
|
|
1590
|
+
*
|
|
1591
|
+
* 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.
|
|
1592
|
+
* @param _id - Product ID.
|
|
1593
|
+
* @public
|
|
1594
|
+
* @documentationMaturity preview
|
|
1595
|
+
* @requiredField _id
|
|
1596
|
+
* @requiredField options.media.choice
|
|
1597
|
+
* @requiredField options.media.option
|
|
1598
|
+
*/
|
|
1599
|
+
export declare function addProductMediaToChoices(_id: string, options?: AddProductMediaToChoicesOptions): Promise<void>;
|
|
1600
|
+
export interface AddProductMediaToChoicesOptions {
|
|
1601
|
+
media?: MediaAssignmentToChoice[];
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Removes media items from all or some of a product's choices.
|
|
1605
|
+
* (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).)
|
|
1606
|
+
* @param _id - Product ID.
|
|
1607
|
+
* @public
|
|
1608
|
+
* @documentationMaturity preview
|
|
1609
|
+
* @requiredField _id
|
|
1610
|
+
*/
|
|
1611
|
+
export declare function removeProductMediaFromChoices(_id: string, options?: RemoveProductMediaFromChoicesOptions): Promise<void>;
|
|
1612
|
+
export interface RemoveProductMediaFromChoicesOptions {
|
|
1613
|
+
/** Optional - if an empty array is passed, all media will be removed from all choices. */
|
|
1614
|
+
media?: MediaAssignmentToChoice[];
|
|
1615
|
+
}
|
|
1616
|
+
/**
|
|
1617
|
+
* Delete all options from a specific product (only available when variant management is disabled).
|
|
1618
|
+
* @param _id - Product ID.
|
|
1619
|
+
* @public
|
|
1620
|
+
* @documentationMaturity preview
|
|
1621
|
+
* @requiredField _id
|
|
1622
|
+
*/
|
|
1623
|
+
export declare function deleteProductOptions(_id: string): Promise<void>;
|
|
1624
|
+
/**
|
|
1625
|
+
* Deletes a product's brand.
|
|
1626
|
+
* @param _id - Product ID.
|
|
1627
|
+
* @public
|
|
1628
|
+
* @documentationMaturity preview
|
|
1629
|
+
* @requiredField _id
|
|
1630
|
+
*/
|
|
1631
|
+
export declare function removeBrand(_id: string): Promise<void>;
|
|
1632
|
+
/**
|
|
1633
|
+
* Creates a new collection.
|
|
1634
|
+
* @param collection - Collection info.
|
|
1635
|
+
* @public
|
|
1636
|
+
* @documentationMaturity preview
|
|
1637
|
+
* @requiredField collection
|
|
1638
|
+
* @requiredField collection.name
|
|
1639
|
+
*/
|
|
1640
|
+
export declare function createCollection(collection: Collection): Promise<CreateCollectionResponse>;
|
|
1641
|
+
/**
|
|
1642
|
+
* Updates specified properties of a collection.
|
|
1643
|
+
* 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.
|
|
1644
|
+
* @param _id - Collection ID (generated automatically by the catalog).
|
|
1645
|
+
* @public
|
|
1646
|
+
* @documentationMaturity preview
|
|
1647
|
+
* @requiredField _id
|
|
1648
|
+
* @requiredField collection
|
|
1649
|
+
*/
|
|
1650
|
+
export declare function updateCollection(_id: string | null, collection: UpdateCollection): Promise<UpdateCollectionResponse>;
|
|
1651
|
+
export interface UpdateCollection {
|
|
1652
|
+
/**
|
|
1653
|
+
* Collection ID (generated automatically by the catalog).
|
|
1654
|
+
* @readonly
|
|
1655
|
+
*/
|
|
1656
|
+
_id?: string | null;
|
|
1657
|
+
/** Collection name. */
|
|
1658
|
+
name?: string | null;
|
|
1659
|
+
/**
|
|
1660
|
+
* Media items (images, videos etc) associated with this collection. Read only.
|
|
1661
|
+
* @readonly
|
|
1662
|
+
*/
|
|
1663
|
+
media?: Media;
|
|
1664
|
+
/**
|
|
1665
|
+
* Number of products in the collection. Read only.
|
|
1666
|
+
* @readonly
|
|
1667
|
+
*/
|
|
1668
|
+
numberOfProducts?: number;
|
|
1669
|
+
/** Collection description. */
|
|
1670
|
+
description?: string | null;
|
|
1671
|
+
/** Collection slug. */
|
|
1672
|
+
slug?: string | null;
|
|
1673
|
+
/** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
|
|
1674
|
+
visible?: boolean | null;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Deletes a collection.
|
|
1678
|
+
* @param _id - ID of the collection to delete. Cannot be used to delete All Products
|
|
1679
|
+
* @public
|
|
1680
|
+
* @documentationMaturity preview
|
|
1681
|
+
* @requiredField _id
|
|
1682
|
+
*/
|
|
1683
|
+
export declare function deleteCollection(_id: string): Promise<void>;
|
|
1684
|
+
/**
|
|
1685
|
+
* Deletes a product's ribbon.
|
|
1686
|
+
* @param _id - Product ID.
|
|
1687
|
+
* @public
|
|
1688
|
+
* @documentationMaturity preview
|
|
1689
|
+
* @requiredField _id
|
|
1690
|
+
*/
|
|
1691
|
+
export declare function removeRibbon(_id: string): Promise<void>;
|
|
1692
|
+
/**
|
|
1693
|
+
* Updates a specified property for up to 100 products at a time.
|
|
1694
|
+
* @param ids - Product IDs.
|
|
1695
|
+
* @public
|
|
1696
|
+
* @documentationMaturity preview
|
|
1697
|
+
* @requiredField ids
|
|
1698
|
+
*/
|
|
1699
|
+
export declare function bulkUpdateProducts(ids: string[], options?: BulkUpdateProductsOptions): Promise<BulkUpdateProductsResponse>;
|
|
1700
|
+
export interface BulkUpdateProductsOptions {
|
|
1701
|
+
/** Field to update. */
|
|
1702
|
+
set?: SetValue;
|
|
1703
|
+
}
|
|
1704
|
+
/**
|
|
1705
|
+
* Adjusts a specified numerical property for up to 100 products at a time.
|
|
1706
|
+
* The property can be increased or decreased either by percentage or amount.
|
|
1707
|
+
* @param ids - Product IDs.
|
|
1708
|
+
* @public
|
|
1709
|
+
* @documentationMaturity preview
|
|
1710
|
+
* @requiredField ids
|
|
1711
|
+
*/
|
|
1712
|
+
export declare function bulkAdjustProductProperties(ids: string[], options?: BulkAdjustProductPropertiesOptions): Promise<BulkAdjustProductPropertiesResponse>;
|
|
1713
|
+
export interface BulkAdjustProductPropertiesOptions {
|
|
1714
|
+
/** Numerical property to adjust. */
|
|
1715
|
+
adjust?: AdjustValue;
|
|
1716
|
+
}
|
|
1368
1717
|
/**
|
|
1369
1718
|
* Returns a list of up to 100 products, given the provided paging, sorting and filtering.
|
|
1370
1719
|
* @public
|
|
@@ -1462,4 +1811,93 @@ export interface GetProductOptions {
|
|
|
1462
1811
|
/** Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products. */
|
|
1463
1812
|
includeMerchantSpecificData?: boolean;
|
|
1464
1813
|
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
|
|
1816
|
+
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
1817
|
+
* @public
|
|
1818
|
+
* @documentationMaturity preview
|
|
1819
|
+
*/
|
|
1820
|
+
export declare function queryCollections(options?: QueryCollectionsOptions): Promise<QueryCollectionsResponse>;
|
|
1821
|
+
export interface QueryCollectionsOptions {
|
|
1822
|
+
/** Query options. */
|
|
1823
|
+
query?: Query;
|
|
1824
|
+
/** Whether number of products should be included in the response. */
|
|
1825
|
+
includeNumberOfProducts?: boolean;
|
|
1826
|
+
/** Wether to include collection description in the response. When `false` is passed, `collection.description` will return null. */
|
|
1827
|
+
includeDescription?: boolean;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Retrieves a collection with the provided ID.
|
|
1831
|
+
* @param _id - Requested collection ID.
|
|
1832
|
+
* @public
|
|
1833
|
+
* @documentationMaturity preview
|
|
1834
|
+
* @requiredField _id
|
|
1835
|
+
*/
|
|
1836
|
+
export declare function getCollection(_id: string, options?: GetCollectionOptions): Promise<GetCollectionResponse>;
|
|
1837
|
+
export interface GetCollectionOptions {
|
|
1838
|
+
/**
|
|
1839
|
+
* Whether to return the `collection.numberOfProducts` field in the response.
|
|
1840
|
+
* Defaults to false, in which case the value of `collection.numberOfProducts` will be 0.
|
|
1841
|
+
*/
|
|
1842
|
+
includeNumberOfProducts?: boolean;
|
|
1843
|
+
}
|
|
1844
|
+
/**
|
|
1845
|
+
* Retrieves a collection with the provided slug.
|
|
1846
|
+
* @param slug - Slug of the collection to retrieve.
|
|
1847
|
+
* @public
|
|
1848
|
+
* @documentationMaturity preview
|
|
1849
|
+
* @requiredField slug
|
|
1850
|
+
*/
|
|
1851
|
+
export declare function getCollectionBySlug(slug: string): Promise<GetCollectionBySlugResponse>;
|
|
1852
|
+
/**
|
|
1853
|
+
* Gets the availability of relevant product variants based on the product ID and selections provided. See [Use Cases](https://dev.wix.com/api/rest/wix-stores/catalog/use-cases) for an example.
|
|
1854
|
+
* @param _id - Requested product ID.
|
|
1855
|
+
* @public
|
|
1856
|
+
* @documentationMaturity preview
|
|
1857
|
+
* @requiredField _id
|
|
1858
|
+
*/
|
|
1859
|
+
export declare function getProductOptionsAvailability(_id: string, options?: GetProductOptionsAvailabilityOptions): Promise<ProductOptionsAvailabilityResponse>;
|
|
1860
|
+
export interface GetProductOptionsAvailabilityOptions {
|
|
1861
|
+
/** Array containing the selected options (e.g, color: Blue, size: Large). */
|
|
1862
|
+
options?: Record<string, string>;
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
* Retrieves product variants, based on either choices (option-choice key-value pairs) or variant IDs.
|
|
1866
|
+
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
1867
|
+
* @param _id - Requested product ID.
|
|
1868
|
+
* @public
|
|
1869
|
+
* @documentationMaturity preview
|
|
1870
|
+
* @requiredField _id
|
|
1871
|
+
*/
|
|
1872
|
+
export declare function queryProductVariants(_id: string, options?: QueryProductVariantsOptions): Promise<QueryProductVariantsResponse>;
|
|
1873
|
+
export interface QueryProductVariantsOptions {
|
|
1874
|
+
/**
|
|
1875
|
+
* The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).
|
|
1876
|
+
* 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).
|
|
1877
|
+
*/
|
|
1878
|
+
choices?: Record<string, string>;
|
|
1879
|
+
/** List of variant IDs (not relevant when passing choices). */
|
|
1880
|
+
variantIds?: string[];
|
|
1881
|
+
paging?: Paging;
|
|
1882
|
+
/** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
|
|
1883
|
+
includeMerchantSpecificData?: boolean;
|
|
1884
|
+
}
|
|
1885
|
+
/**
|
|
1886
|
+
* Retrieves up to 100 store variants, given the provided paging, filtering, and sorting.
|
|
1887
|
+
* @public
|
|
1888
|
+
* @documentationMaturity preview
|
|
1889
|
+
*/
|
|
1890
|
+
export declare function queryStoreVariants(options?: QueryStoreVariantsOptions): Promise<QueryStoreVariantsResponse>;
|
|
1891
|
+
export interface QueryStoreVariantsOptions {
|
|
1892
|
+
/** Query options. */
|
|
1893
|
+
query?: PlatformQuery;
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Retrieves a store variant with the provided ID.
|
|
1897
|
+
* @param _id - Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`.
|
|
1898
|
+
* @public
|
|
1899
|
+
* @documentationMaturity preview
|
|
1900
|
+
* @requiredField _id
|
|
1901
|
+
*/
|
|
1902
|
+
export declare function getStoreVariant(_id: string): Promise<GetStoreVariantResponse>;
|
|
1465
1903
|
export {};
|