@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.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
- package/build/cjs/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +47 -44
- package/build/cjs/src/stores-catalog-v1-collection.http.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection.public.d.ts +5 -0
- package/build/cjs/src/stores-catalog-v1-collection.public.js +20 -0
- package/build/cjs/src/stores-catalog-v1-collection.public.js.map +1 -0
- package/build/cjs/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
- package/build/cjs/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
- package/build/cjs/src/stores-catalog-v1-collection.types.js.map +1 -0
- package/build/cjs/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
- package/build/cjs/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +55 -55
- package/build/cjs/src/stores-catalog-v1-collection.universal.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.http.d.ts +62 -0
- package/build/cjs/src/stores-catalog-v1-product.http.js +775 -0
- package/build/cjs/src/stores-catalog-v1-product.http.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.public.d.ts +25 -0
- package/build/cjs/src/stores-catalog-v1-product.public.js +139 -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 +1371 -0
- package/build/cjs/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
- package/build/cjs/src/stores-catalog-v1-product.types.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.universal.d.ts +1744 -0
- package/build/cjs/src/stores-catalog-v1-product.universal.js +1155 -0
- package/build/cjs/src/stores-catalog-v1-product.universal.js.map +1 -0
- package/build/es/index.d.ts +2 -2
- package/build/es/index.js +2 -2
- package/build/es/index.js.map +1 -1
- package/build/es/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
- package/build/es/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +44 -41
- package/build/es/src/stores-catalog-v1-collection.http.js.map +1 -0
- package/build/es/src/stores-catalog-v1-collection.public.d.ts +5 -0
- package/build/es/src/stores-catalog-v1-collection.public.js +13 -0
- package/build/es/src/stores-catalog-v1-collection.public.js.map +1 -0
- package/build/es/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
- package/build/es/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
- package/build/es/src/stores-catalog-v1-collection.types.js.map +1 -0
- package/build/es/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
- package/build/es/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +53 -53
- package/build/es/src/stores-catalog-v1-collection.universal.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.http.d.ts +62 -0
- package/build/es/src/stores-catalog-v1-product.http.js +751 -0
- package/build/es/src/stores-catalog-v1-product.http.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.public.d.ts +25 -0
- package/build/es/src/stores-catalog-v1-product.public.js +108 -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 +1371 -0
- package/build/es/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
- package/build/es/src/stores-catalog-v1-product.types.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.universal.d.ts +1744 -0
- package/build/es/src/stores-catalog-v1-product.universal.js +1112 -0
- package/build/es/src/stores-catalog-v1-product.universal.js.map +1 -0
- package/package.json +2 -2
- package/build/cjs/src/stores-poc-v1-collection.http.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-collection.public.d.ts +0 -6
- package/build/cjs/src/stores-poc-v1-collection.public.js +0 -20
- package/build/cjs/src/stores-poc-v1-collection.public.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-collection.types.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-collection.universal.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.http.d.ts +0 -4
- package/build/cjs/src/stores-poc-v1-product.http.js +0 -143
- package/build/cjs/src/stores-poc-v1-product.http.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.public.d.ts +0 -6
- package/build/cjs/src/stores-poc-v1-product.public.js +0 -25
- package/build/cjs/src/stores-poc-v1-product.public.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.types.d.ts +0 -470
- package/build/cjs/src/stores-poc-v1-product.types.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.universal.d.ts +0 -549
- package/build/cjs/src/stores-poc-v1-product.universal.js +0 -212
- package/build/cjs/src/stores-poc-v1-product.universal.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.http.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.public.d.ts +0 -6
- package/build/es/src/stores-poc-v1-collection.public.js +0 -13
- package/build/es/src/stores-poc-v1-collection.public.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.types.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.universal.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.http.d.ts +0 -4
- package/build/es/src/stores-poc-v1-product.http.js +0 -138
- package/build/es/src/stores-poc-v1-product.http.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.public.d.ts +0 -6
- package/build/es/src/stores-poc-v1-product.public.js +0 -13
- package/build/es/src/stores-poc-v1-product.public.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.types.d.ts +0 -470
- package/build/es/src/stores-poc-v1-product.types.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.universal.d.ts +0 -549
- package/build/es/src/stores-poc-v1-product.universal.js +0 -188
- package/build/es/src/stores-poc-v1-product.universal.js.map +0 -1
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { serializer, transformError, resolveQueryFieldsTransformationPaths, } from '@wix/metro-runtime/velo';
|
|
11
|
-
import * as
|
|
11
|
+
import * as ambassadorWixStoresCatalogV1Collection from './stores-catalog-v1-collection.http';
|
|
12
12
|
// @ts-ignore
|
|
13
13
|
import { wrapWithQueryBuilder } from '@wix/motion-edm-autogen-query-wrapper';
|
|
14
14
|
let __verbose = false;
|
|
@@ -44,55 +44,10 @@ const _getCollectionRequest = {};
|
|
|
44
44
|
const _getCollectionResponse = {};
|
|
45
45
|
const _queryCollectionsRequest = {};
|
|
46
46
|
const _queryCollectionsResponse = {};
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
export function getCollection(collectionId, options) {
|
|
52
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
53
|
-
const requestTransformation = {
|
|
54
|
-
collectionId: '$[0]',
|
|
55
|
-
includeNumberOfProducts: '$[1].includeNumberOfProducts',
|
|
56
|
-
includeDescription: '$[1].includeDescription',
|
|
57
|
-
};
|
|
58
|
-
const responseTransformation = '$.collection';
|
|
59
|
-
// @ts-ignore
|
|
60
|
-
const httpClient = arguments[2].httpClient;
|
|
61
|
-
const { toAmbassadorRequest } = serializer({
|
|
62
|
-
rootSchema: _getCollectionRequest,
|
|
63
|
-
depSchemas: {},
|
|
64
|
-
fqdnTransformation: {
|
|
65
|
-
paths: [],
|
|
66
|
-
transformation: _fromVeloEntity,
|
|
67
|
-
},
|
|
68
|
-
customTransformation: requestTransformation,
|
|
69
|
-
});
|
|
70
|
-
const { fromJSON } = serializer({
|
|
71
|
-
rootSchema: _getCollectionResponse,
|
|
72
|
-
depSchemas: {},
|
|
73
|
-
fqdnTransformation: {
|
|
74
|
-
paths: [...['collection']],
|
|
75
|
-
transformation: _toVeloEntity,
|
|
76
|
-
},
|
|
77
|
-
customTransformation: responseTransformation,
|
|
78
|
-
});
|
|
79
|
-
const payload = toAmbassadorRequest([collectionId, options]);
|
|
80
|
-
const reqOpts = ambassadorWixStoresPocV1Collection.getCollection(payload);
|
|
81
|
-
__log(`"GetCollection" sending request with: ${__inspect(reqOpts)}`);
|
|
82
|
-
try {
|
|
83
|
-
const { data } = yield httpClient.request(reqOpts);
|
|
84
|
-
return fromJSON(data);
|
|
85
|
-
}
|
|
86
|
-
catch (err) {
|
|
87
|
-
const transformedError = transformError(err, requestTransformation, [
|
|
88
|
-
'collectionId',
|
|
89
|
-
'options',
|
|
90
|
-
]);
|
|
91
|
-
throw transformedError;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/** @public */
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves a list of up to 100 collections, given the provided paging, sorting and filtering.
|
|
49
|
+
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
50
|
+
* @public */
|
|
96
51
|
export function queryCollections() {
|
|
97
52
|
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
98
53
|
const responseTransformation = {
|
|
@@ -121,7 +76,7 @@ export function queryCollections() {
|
|
|
121
76
|
});
|
|
122
77
|
return wrapWithQueryBuilder({
|
|
123
78
|
func: (payload) => {
|
|
124
|
-
const reqOpts =
|
|
79
|
+
const reqOpts = ambassadorWixStoresCatalogV1Collection.queryCollections(payload);
|
|
125
80
|
return httpClient.request(reqOpts);
|
|
126
81
|
},
|
|
127
82
|
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
@@ -130,8 +85,53 @@ export function queryCollections() {
|
|
|
130
85
|
const transformedError = transformError(err, requestTransformation);
|
|
131
86
|
throw transformedError;
|
|
132
87
|
},
|
|
133
|
-
pagingMethod: '
|
|
88
|
+
pagingMethod: 'CURSOR',
|
|
134
89
|
transformationPaths: resolveQueryFieldsTransformationPaths(_toVeloEntity),
|
|
135
90
|
})({ cursorWithEmptyFilterAndSort: true });
|
|
136
91
|
}
|
|
137
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves a collection with the provided ID.
|
|
94
|
+
* @param _id - Requested collection ID.
|
|
95
|
+
* @public
|
|
96
|
+
* @requiredField _id
|
|
97
|
+
*/
|
|
98
|
+
export function getCollection(_id) {
|
|
99
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
100
|
+
const requestTransformation = { id: '$[0]' };
|
|
101
|
+
const responseTransformation = '$.collection';
|
|
102
|
+
// @ts-ignore
|
|
103
|
+
const httpClient = arguments[1].httpClient;
|
|
104
|
+
const { toAmbassadorRequest } = serializer({
|
|
105
|
+
rootSchema: _getCollectionRequest,
|
|
106
|
+
depSchemas: {},
|
|
107
|
+
fqdnTransformation: {
|
|
108
|
+
paths: [],
|
|
109
|
+
transformation: _fromVeloEntity,
|
|
110
|
+
},
|
|
111
|
+
customTransformation: requestTransformation,
|
|
112
|
+
});
|
|
113
|
+
const { fromJSON } = serializer({
|
|
114
|
+
rootSchema: _getCollectionResponse,
|
|
115
|
+
depSchemas: {},
|
|
116
|
+
fqdnTransformation: {
|
|
117
|
+
paths: [...['collection']],
|
|
118
|
+
transformation: _toVeloEntity,
|
|
119
|
+
},
|
|
120
|
+
customTransformation: responseTransformation,
|
|
121
|
+
});
|
|
122
|
+
const payload = toAmbassadorRequest([_id]);
|
|
123
|
+
const reqOpts = ambassadorWixStoresCatalogV1Collection.getCollection(payload);
|
|
124
|
+
__log(`"GetCollection" sending request with: ${__inspect(reqOpts)}`);
|
|
125
|
+
try {
|
|
126
|
+
const { data } = yield httpClient.request(reqOpts);
|
|
127
|
+
return fromJSON(data);
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
const transformedError = transformError(err, requestTransformation, [
|
|
131
|
+
'_id',
|
|
132
|
+
]);
|
|
133
|
+
throw transformedError;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=stores-catalog-v1-collection.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores-catalog-v1-collection.universal.js","sourceRoot":"","sources":["../../../src/stores-catalog-v1-collection.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,sCAAsC,MAAM,qCAAqC,CAAC;AAC9F,aAAa;AACb,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AAuE5B,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,4EAA2D,CAAA;IAC3D,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,sCAAqB,CAAA;IACrB,4BAAW,CAAA;AACb,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAuED,MAAM,CAAN,IAAY,SAGX;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AC,GAAG,CAAC,CAAC,CAAC;QAE3C,MAAM,OAAO,GAAG,sCAAsC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAE9E,KAAK,CAAC,yCAAyC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAErE,IAAI;YACF,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAEnD,OAAO,QAAQ,CAAC,IAAI,CAAQ,CAAC;SAC9B;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,cAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,KAAK;aACN,CAAC,CAAC;YAEH,MAAM,gBAAgB,CAAC;SACxB;IACH,CAAC;CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { AddProductMediaRequest, AddProductMediaResponse, AddProductMediaToChoicesRequest, AddProductMediaToChoicesResponse, AddProductsToCollectionRequest, AddProductsToCollectionResponse, BulkAdjustProductPropertiesRequest, BulkAdjustProductPropertiesResponse, BulkUpdateProductsRequest, BulkUpdateProductsResponse, CreateCollectionRequest, CreateCollectionResponse, CreateProductRequest, CreateProductResponse, DeleteCollectionRequest, DeleteCollectionResponse, DeleteProductOptionsRequest, DeleteProductOptionsResponse, DeleteProductRequest, DeleteProductResponse, GetProductRequest, GetProductResponse, QueryProductsPlatformizedRequest, QueryProductsPlatformizedResponse, RemoveProductBrandRequest, RemoveProductBrandResponse, RemoveProductMediaFromChoicesRequest, RemoveProductMediaFromChoicesResponse, RemoveProductMediaRequest, RemoveProductMediaResponse, RemoveProductRibbonRequest, RemoveProductRibbonResponse, RemoveProductsFromCollectionRequest, RemoveProductsFromCollectionResponse, ResetAllVariantDataRequest, ResetAllVariantDataResponse, UpdateCollectionRequest, UpdateCollectionResponse, UpdateProductRequest, UpdateProductResponse, UpdateVariantsRequest, UpdateVariantsResponse } from './stores-catalog-v1-product.types';
|
|
3
|
+
/** Creates a new product. */
|
|
4
|
+
export declare function createProduct(payload: CreateProductRequest): RequestOptionsFactory<CreateProductResponse>;
|
|
5
|
+
/** Updates specified fields in a product. */
|
|
6
|
+
export declare function updateProduct(payload: UpdateProductRequest): RequestOptionsFactory<UpdateProductResponse>;
|
|
7
|
+
/** Deletes a product. */
|
|
8
|
+
export declare function deleteProduct(payload: DeleteProductRequest): RequestOptionsFactory<DeleteProductResponse>;
|
|
9
|
+
/** Updates variants of a specified product. */
|
|
10
|
+
export declare function updateVariants(payload: UpdateVariantsRequest): RequestOptionsFactory<UpdateVariantsResponse>;
|
|
11
|
+
/** Resets all variant information to default values (price = current product price; weight = current product weight; SKU = current product SKU; visibility = true). */
|
|
12
|
+
export declare function resetAllVariantData(payload: ResetAllVariantDataRequest): RequestOptionsFactory<ResetAllVariantDataResponse>;
|
|
13
|
+
/** Adds products to a specified collection. */
|
|
14
|
+
export declare function addProductsToCollection(payload: AddProductsToCollectionRequest): RequestOptionsFactory<AddProductsToCollectionResponse>;
|
|
15
|
+
/** Deletes products from a specified collection. */
|
|
16
|
+
export declare function removeProductsFromCollection(payload: RemoveProductsFromCollectionRequest): RequestOptionsFactory<RemoveProductsFromCollectionResponse>;
|
|
17
|
+
/** Adds media items to a specified product, either via URL or existing media ID. */
|
|
18
|
+
export declare function addProductMedia(payload: AddProductMediaRequest): RequestOptionsFactory<AddProductMediaResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Removes specified media items from a product.
|
|
21
|
+
* Pass an empty array to remove all media items.
|
|
22
|
+
*/
|
|
23
|
+
export declare function removeProductMedia(payload: RemoveProductMediaRequest): RequestOptionsFactory<RemoveProductMediaResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Links media items that are already associated with a specific product to a choice within the same product.
|
|
26
|
+
*
|
|
27
|
+
* 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).
|
|
28
|
+
*
|
|
29
|
+
* 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.
|
|
30
|
+
*/
|
|
31
|
+
export declare function addProductMediaToChoices(payload: AddProductMediaToChoicesRequest): RequestOptionsFactory<AddProductMediaToChoicesResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Removes media items from all or some of a product's choices.
|
|
34
|
+
* (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).)
|
|
35
|
+
*/
|
|
36
|
+
export declare function removeProductMediaFromChoices(payload: RemoveProductMediaFromChoicesRequest): RequestOptionsFactory<RemoveProductMediaFromChoicesResponse>;
|
|
37
|
+
/** Delete all options from a specific product (only available when variant management is disabled). */
|
|
38
|
+
export declare function deleteProductOptions(payload: DeleteProductOptionsRequest): RequestOptionsFactory<DeleteProductOptionsResponse>;
|
|
39
|
+
/** Deletes a product's brand. */
|
|
40
|
+
export declare function removeBrand(payload: RemoveProductBrandRequest): RequestOptionsFactory<RemoveProductBrandResponse>;
|
|
41
|
+
/** Creates a new collection. */
|
|
42
|
+
export declare function createCollection(payload: CreateCollectionRequest): RequestOptionsFactory<CreateCollectionResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Updates specified properties of a collection.
|
|
45
|
+
* 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.
|
|
46
|
+
*/
|
|
47
|
+
export declare function updateCollection(payload: UpdateCollectionRequest): RequestOptionsFactory<UpdateCollectionResponse>;
|
|
48
|
+
/** Deletes a collection. */
|
|
49
|
+
export declare function deleteCollection(payload: DeleteCollectionRequest): RequestOptionsFactory<DeleteCollectionResponse>;
|
|
50
|
+
/** Deletes a product's ribbon. */
|
|
51
|
+
export declare function removeRibbon(payload: RemoveProductRibbonRequest): RequestOptionsFactory<RemoveProductRibbonResponse>;
|
|
52
|
+
/** Updates a specified property for up to 100 products at a time. */
|
|
53
|
+
export declare function bulkUpdateProducts(payload: BulkUpdateProductsRequest): RequestOptionsFactory<BulkUpdateProductsResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Adjusts a specified numerical property for up to 100 products at a time.
|
|
56
|
+
* The property can be increased or decreased either by percentage or amount.
|
|
57
|
+
*/
|
|
58
|
+
export declare function bulkAdjustProductProperties(payload: BulkAdjustProductPropertiesRequest): RequestOptionsFactory<BulkAdjustProductPropertiesResponse>;
|
|
59
|
+
/** Returns a list of up to 100 products, given the provided paging, sorting and filtering. */
|
|
60
|
+
export declare function queryProductsPlatformized(payload: QueryProductsPlatformizedRequest): RequestOptionsFactory<QueryProductsPlatformizedResponse>;
|
|
61
|
+
/** Retrieves a product with the provided ID. */
|
|
62
|
+
export declare function getProduct(payload: GetProductRequest): RequestOptionsFactory<GetProductResponse>;
|