@wix/auto_sdk_stores_read-only-variants-v-3 1.0.1 → 1.0.3
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.typings.js.map +1 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +1 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +4 -2
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +1 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +7 -0
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +88 -2
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +1 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +1 -0
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +20 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +1 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +1 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +9 -2
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +1 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts +16 -7
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +89 -1
- package/build/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +1 -1
- package/build/es/index.typings.js.map +1 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +1 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +3 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +1 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +7 -0
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +85 -0
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +1 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +1 -0
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +18 -0
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +1 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +1 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +7 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +1 -1
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts +16 -7
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +87 -0
- package/build/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +49 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +4 -2
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +4 -2
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +1 -1
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +7 -0
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +88 -2
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +1 -1
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +1 -0
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +20 -1
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +1 -1
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +13 -2
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +9 -2
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +1 -1
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts +72 -7
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +89 -1
- package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +1 -1
- package/build/internal/es/index.typings.d.ts +49 -0
- package/build/internal/es/index.typings.js.map +1 -1
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.d.ts +4 -2
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js +3 -1
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js.map +1 -1
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts +7 -0
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js +85 -0
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map +1 -1
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts +1 -0
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js +18 -0
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map +1 -1
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.d.ts +13 -2
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js +7 -1
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js.map +1 -1
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.d.ts +72 -7
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js +87 -0
- package/build/internal/es/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map +1 -1
- package/package.json +4 -4
package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.WebhookIdentityType = exports.DiscountType = exports.SubscriptionFrequency = exports.FileType = exports.ProductType = exports.ProductPreorderAvailability = exports.PreorderStatus = exports.AvailabilityStatus = exports.ModifierRenderType = exports.ChoiceType = exports.ProductOptionRenderType = exports.MediaType = exports.NullValue = exports.VerticalAlignment = exports.Direction = exports.InitialExpandedItems = exports.AppType = void 0;
|
|
3
|
+
exports.DecorationType = exports.BackgroundType = exports.PollLayoutDirection = exports.PollLayoutType = exports.VoteRole = exports.ViewRole = exports.MapType = exports.Position = exports.Source = exports.GIFType = exports.ThumbnailsAlignment = exports.Crop = exports.Orientation = exports.LayoutType = exports.ViewMode = exports.Alignment = exports.Width = exports.LineStyle = exports.TextAlignment = exports.Target = exports.Type = exports.PluginContainerDataAlignment = exports.WidthType = exports.NodeType = exports.SearchDetailsMode = exports.CommonAggregationType = exports.DateHistogramAggregationInterval = exports.NestedAggregationNestedAggregationType = exports.CommonScalarType = exports.ValueAggregationMissingValues = exports.ValueAggregationSortDirection = exports.ValueAggregationSortType = exports.CommonSortOrder = exports.Mode = exports.AggregationType = exports.Interval = exports.NestedAggregationType = exports.ScalarType = exports.MissingValues = exports.SortDirection = exports.SortType = exports.RequestedFields = exports.SortOrder = exports.WeightUnit = exports.V3ProductType = exports.SecuredMediaFileType = exports.MeasurementUnit = exports.ProductMediaMediaType = exports.searchVariants = exports.queryVariants = void 0;
|
|
4
|
+
exports.WebhookIdentityType = exports.DiscountType = exports.SubscriptionFrequency = exports.FileType = exports.ProductType = exports.ProductPreorderAvailability = exports.PreorderStatus = exports.AvailabilityStatus = exports.ModifierRenderType = exports.ChoiceType = exports.ProductOptionRenderType = exports.MediaType = exports.NullValue = exports.VerticalAlignment = exports.Direction = exports.InitialExpandedItems = exports.AppType = exports.FontType = void 0;
|
|
5
5
|
const stores_catalog_v3_read_only_variant_read_only_variants_v_3_public_js_1 = require("./stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js");
|
|
6
6
|
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
7
7
|
/** @internal */
|
|
8
8
|
exports.queryVariants = (0, rest_modules_1.createRESTModule)(stores_catalog_v3_read_only_variant_read_only_variants_v_3_public_js_1.queryVariants);
|
|
9
|
+
/** @internal */
|
|
10
|
+
exports.searchVariants = (0, rest_modules_1.createRESTModule)(stores_catalog_v3_read_only_variant_read_only_variants_v_3_public_js_1.searchVariants);
|
|
9
11
|
var stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_1 = require("./stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js");
|
|
10
12
|
Object.defineProperty(exports, "ProductMediaMediaType", { enumerable: true, get: function () { return stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_1.ProductMediaMediaType; } });
|
|
11
13
|
Object.defineProperty(exports, "MeasurementUnit", { enumerable: true, get: function () { return stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_1.MeasurementUnit; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.context.ts"],"names":[],"mappings":";;;;AAAA,iKAGgF;AAChF,gEAAiE;AAGjE,gBAAgB;AACH,QAAA,aAAa,GAER,IAAA,+BAAgB,EAAC,oFAAmB,CAAC,CAAC;AACxD,gBAAgB;AACH,QAAA,cAAc,GAET,IAAA,+BAAgB,EAAC,qFAAoB,CAAC,CAAC;AAEzD,qKAmEmF;AAlEjF,gLAAA,qBAAqB,OAAA;AACrB,0KAAA,eAAe,OAAA;AACf,+KAAA,oBAAoB,OAAA;AACpB,wKAAA,aAAa,OAAA;AACb,qKAAA,UAAU,OAAA;AACV,oKAAA,SAAS,OAAA;AACT,0KAAA,eAAe,OAAA;AACf,mKAAA,QAAQ,OAAA;AACR,wKAAA,aAAa,OAAA;AACb,wKAAA,aAAa,OAAA;AACb,qKAAA,UAAU,OAAA;AACV,gLAAA,qBAAqB,OAAA;AACrB,mKAAA,QAAQ,OAAA;AACR,0KAAA,eAAe,OAAA;AACf,+JAAA,IAAI,OAAA;AACJ,0KAAA,eAAe,OAAA;AACf,mLAAA,wBAAwB,OAAA;AACxB,wLAAA,6BAA6B,OAAA;AAC7B,wLAAA,6BAA6B,OAAA;AAC7B,2KAAA,gBAAgB,OAAA;AAChB,iMAAA,sCAAsC,OAAA;AACtC,2LAAA,gCAAgC,OAAA;AAChC,gLAAA,qBAAqB,OAAA;AACrB,4KAAA,iBAAiB,OAAA;AACjB,mKAAA,QAAQ,OAAA;AACR,oKAAA,SAAS,OAAA;AACT,uLAAA,4BAA4B,OAAA;AAC5B,+JAAA,IAAI,OAAA;AACJ,iKAAA,MAAM,OAAA;AACN,wKAAA,aAAa,OAAA;AACb,oKAAA,SAAS,OAAA;AACT,gKAAA,KAAK,OAAA;AACL,oKAAA,SAAS,OAAA;AACT,mKAAA,QAAQ,OAAA;AACR,qKAAA,UAAU,OAAA;AACV,sKAAA,WAAW,OAAA;AACX,+JAAA,IAAI,OAAA;AACJ,8KAAA,mBAAmB,OAAA;AACnB,kKAAA,OAAO,OAAA;AACP,iKAAA,MAAM,OAAA;AACN,mKAAA,QAAQ,OAAA;AACR,kKAAA,OAAO,OAAA;AACP,mKAAA,QAAQ,OAAA;AACR,mKAAA,QAAQ,OAAA;AACR,yKAAA,cAAc,OAAA;AACd,8KAAA,mBAAmB,OAAA;AACnB,yKAAA,cAAc,OAAA;AACd,yKAAA,cAAc,OAAA;AACd,mKAAA,QAAQ,OAAA;AACR,kKAAA,OAAO,OAAA;AACP,+KAAA,oBAAoB,OAAA;AACpB,oKAAA,SAAS,OAAA;AACT,4KAAA,iBAAiB,OAAA;AACjB,oKAAA,SAAS,OAAA;AACT,oKAAA,SAAS,OAAA;AACT,kLAAA,uBAAuB,OAAA;AACvB,qKAAA,UAAU,OAAA;AACV,6KAAA,kBAAkB,OAAA;AAClB,6KAAA,kBAAkB,OAAA;AAClB,yKAAA,cAAc,OAAA;AACd,sLAAA,2BAA2B,OAAA;AAC3B,sKAAA,WAAW,OAAA;AACX,mKAAA,QAAQ,OAAA;AACR,gLAAA,qBAAqB,OAAA;AACrB,uKAAA,YAAY,OAAA;AACZ,8KAAA,mBAAmB,OAAA"}
|
package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.d.ts
CHANGED
|
@@ -7,3 +7,10 @@ import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
|
7
7
|
* [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
|
|
8
8
|
*/
|
|
9
9
|
export declare function queryVariants(payload: object): RequestOptionsFactory<any>;
|
|
10
|
+
/**
|
|
11
|
+
* Search Variants using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
12
|
+
* >**Notes:**
|
|
13
|
+
* + If you don't have permissions to read non visible products then variants related to non-visible products will be filtered out from response.
|
|
14
|
+
* In such case non visible variants also will be filtered out.
|
|
15
|
+
*/
|
|
16
|
+
export declare function searchVariants(payload: object): RequestOptionsFactory<any>;
|
package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryVariants = void 0;
|
|
3
|
+
exports.searchVariants = exports.queryVariants = void 0;
|
|
4
4
|
const float_1 = require("@wix/sdk-runtime/transformations/float");
|
|
5
|
+
const float_2 = require("@wix/sdk-runtime/transformations/float");
|
|
5
6
|
const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
6
7
|
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
7
8
|
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
@@ -28,7 +29,7 @@ function queryVariants(payload) {
|
|
|
28
29
|
data: payload,
|
|
29
30
|
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
30
31
|
{
|
|
31
|
-
transformFn:
|
|
32
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
32
33
|
paths: [
|
|
33
34
|
{ path: 'variants.physicalProperties.weight' },
|
|
34
35
|
{
|
|
@@ -56,4 +57,89 @@ function queryVariants(payload) {
|
|
|
56
57
|
return __queryVariants;
|
|
57
58
|
}
|
|
58
59
|
exports.queryVariants = queryVariants;
|
|
60
|
+
/**
|
|
61
|
+
* Search Variants using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
62
|
+
* >**Notes:**
|
|
63
|
+
* + If you don't have permissions to read non visible products then variants related to non-visible products will be filtered out from response.
|
|
64
|
+
* In such case non visible variants also will be filtered out.
|
|
65
|
+
*/
|
|
66
|
+
function searchVariants(payload) {
|
|
67
|
+
function __searchVariants({ host }) {
|
|
68
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
69
|
+
{
|
|
70
|
+
transformFn: float_1.transformSDKFloatToRESTFloat,
|
|
71
|
+
paths: [
|
|
72
|
+
{ path: 'search.aggregations.range.buckets.from' },
|
|
73
|
+
{ path: 'search.aggregations.range.buckets.to' },
|
|
74
|
+
{
|
|
75
|
+
path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
const metadata = {
|
|
84
|
+
entityFqdn: 'wix.stores.catalog.v3.read_only_variant',
|
|
85
|
+
method: 'POST',
|
|
86
|
+
methodFqn: 'com.wix.stores.catalog.product.variants.reader.api.v3.ProductVariantsReader.SearchVariants',
|
|
87
|
+
packageName: PACKAGE_NAME,
|
|
88
|
+
url: resolveComWixStoresCatalogProductVariantsReaderApiV3ProductVariantsReaderUrl({
|
|
89
|
+
protoPath: '/v3/products/search-variants',
|
|
90
|
+
data: serializedData,
|
|
91
|
+
host,
|
|
92
|
+
}),
|
|
93
|
+
data: serializedData,
|
|
94
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
95
|
+
{
|
|
96
|
+
transformFn: float_2.transformRESTFloatToSDKFloat,
|
|
97
|
+
paths: [
|
|
98
|
+
{ path: 'variants.physicalProperties.weight' },
|
|
99
|
+
{ path: 'aggregationData.results.ranges.results.from' },
|
|
100
|
+
{ path: 'aggregationData.results.ranges.results.to' },
|
|
101
|
+
{
|
|
102
|
+
path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
path: 'aggregationData.results.nested.results.results.*.range.from',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
path: 'aggregationData.results.nested.results.results.*.range.to',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
path: 'variants.physicalProperties.pricePerUnit.settings.quantity',
|
|
115
|
+
},
|
|
116
|
+
{ path: 'variants.revenueDetails.profitMargin' },
|
|
117
|
+
{ path: 'aggregationData.results.scalar.value' },
|
|
118
|
+
{
|
|
119
|
+
path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
path: 'aggregationData.results.nested.results.results.*.scalar.value',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
transformFn: timestamp_1.transformRESTTimestampToSDKTimestamp,
|
|
128
|
+
paths: [
|
|
129
|
+
{ path: 'variants.media.image.urlExpirationDate' },
|
|
130
|
+
{ path: 'variants.media.video.urlExpirationDate' },
|
|
131
|
+
{ path: 'variants.media.video.resolutions.urlExpirationDate' },
|
|
132
|
+
{
|
|
133
|
+
path: 'variants.media.video.resolutions.poster.urlExpirationDate',
|
|
134
|
+
},
|
|
135
|
+
{ path: 'variants.media.video.posters.urlExpirationDate' },
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
]),
|
|
139
|
+
};
|
|
140
|
+
return metadata;
|
|
141
|
+
}
|
|
142
|
+
return __searchVariants;
|
|
143
|
+
}
|
|
144
|
+
exports.searchVariants = searchVariants;
|
|
59
145
|
//# sourceMappingURL=stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.ts"],"names":[],"mappings":";;;AAAA,kEAAsF;AACtF,0EAAkG;AAClG,sFAAkF;AAClF,gEAA2D;AAI3D,SAAS,4EAA4E,CACnF,IAA8C;IAE9C,MAAM,gBAAgB,GAAG,EAAE,CAAC;IAE5B,OAAO,IAAA,yBAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,YAAY,GAAG,6CAA6C,CAAC;AAEnE;;;;;;GAMG;AACH,SAAgB,aAAa,CAAC,OAAe;IAC3C,SAAS,eAAe,CAAC,EAAE,IAAI,EAAO;QACpC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,yCAAyC;YACrD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,2FAA2F;YAC7F,WAAW,EAAE,YAAY;YACzB,GAAG,EAAE,4EAA4E,CAC/E,EAAE,SAAS,EAAE,6BAA6B,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAClE;YACD,IAAI,EAAE,OAAO;YACb,iBAAiB,EAAE,CAAC,OAAY,EAAE,EAAE,CAClC,IAAA,gCAAc,EAAC,OAAO,EAAE;gBACtB;oBACE,WAAW,EAAE,oCAA4B;oBACzC,KAAK,EAAE;wBACL,EAAE,IAAI,EAAE,oCAAoC,EAAE;wBAC9C;4BACE,IAAI,EAAE,4DAA4D;yBACnE;wBACD,EAAE,IAAI,EAAE,sCAAsC,EAAE;qBACjD;iBACF;gBACD;oBACE,WAAW,EAAE,gDAAoC;oBACjD,KAAK,EAAE;wBACL,EAAE,IAAI,EAAE,wCAAwC,EAAE;wBAClD,EAAE,IAAI,EAAE,wCAAwC,EAAE;wBAClD,EAAE,IAAI,EAAE,oDAAoD,EAAE;wBAC9D;4BACE,IAAI,EAAE,2DAA2D;yBAClE;wBACD,EAAE,IAAI,EAAE,gDAAgD,EAAE;qBAC3D;iBACF;aACF,CAAC;SACL,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC;AA3CD,sCA2CC"}
|
|
1
|
+
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.ts"],"names":[],"mappings":"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"}
|
package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unk
|
|
|
11
11
|
__originalResponseType: R;
|
|
12
12
|
};
|
|
13
13
|
export declare function queryVariants(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixStoresCatalogV3ReadOnlyVariantUniversalTypes.QueryVariantsRequest, ambassadorWixStoresCatalogV3ReadOnlyVariantTypes.QueryVariantsRequest, ambassadorWixStoresCatalogV3ReadOnlyVariantUniversalTypes.QueryVariantsResponse, ambassadorWixStoresCatalogV3ReadOnlyVariantTypes.QueryVariantsResponse>;
|
|
14
|
+
export declare function searchVariants(): __PublicMethodMetaInfo<'POST', {}, ambassadorWixStoresCatalogV3ReadOnlyVariantUniversalTypes.SearchVariantsRequest, ambassadorWixStoresCatalogV3ReadOnlyVariantTypes.SearchVariantsRequest, ambassadorWixStoresCatalogV3ReadOnlyVariantUniversalTypes.SearchVariantsResponse, ambassadorWixStoresCatalogV3ReadOnlyVariantTypes.SearchVariantsResponse>;
|
package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.queryVariants = void 0;
|
|
26
|
+
exports.searchVariants = exports.queryVariants = void 0;
|
|
27
27
|
const ambassadorWixStoresCatalogV3ReadOnlyVariant = __importStar(require("./stores-catalog-v3-read-only-variant-read-only-variants-v-3.http.js"));
|
|
28
28
|
function queryVariants() {
|
|
29
29
|
const payload = {};
|
|
@@ -44,4 +44,23 @@ function queryVariants() {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
exports.queryVariants = queryVariants;
|
|
47
|
+
function searchVariants() {
|
|
48
|
+
const payload = {};
|
|
49
|
+
const getRequestOptions = ambassadorWixStoresCatalogV3ReadOnlyVariant.searchVariants(payload);
|
|
50
|
+
const getUrl = (context) => {
|
|
51
|
+
const { url } = getRequestOptions(context);
|
|
52
|
+
return url;
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
getUrl,
|
|
56
|
+
httpMethod: 'POST',
|
|
57
|
+
path: '/v3/products/search-variants',
|
|
58
|
+
pathParams: {},
|
|
59
|
+
__requestType: null,
|
|
60
|
+
__originalRequestType: null,
|
|
61
|
+
__responseType: null,
|
|
62
|
+
__originalResponseType: null,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
exports.searchVariants = searchVariants;
|
|
47
66
|
//# sourceMappingURL=stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kJAAoI;AAsBpI,SAAgB,aAAa;IAQ3B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,2CAA2C,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,6BAA6B;QACnC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,sCA4BC"}
|
|
1
|
+
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kJAAoI;AAsBpI,SAAgB,aAAa;IAQ3B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,2CAA2C,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,6BAA6B;QACnC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,sCA4BC;AAED,SAAgB,cAAc;IAQ5B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,2CAA2C,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEtE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,8BAA8B;QACpC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,wCA4BC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { QueryVariantsOptions, VariantsQueryBuilder } from './stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js';
|
|
2
|
+
import { QueryVariantsOptions, SearchVariantsOptions, SearchVariantsResponse, VariantsQueryBuilder } from './stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js';
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
@@ -15,4 +15,15 @@ interface QueryVariantsSignature {
|
|
|
15
15
|
*/
|
|
16
16
|
(options?: QueryVariantsOptions | undefined): VariantsQueryBuilder;
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare function searchVariants(httpClient: HttpClient): SearchVariantsSignature;
|
|
20
|
+
interface SearchVariantsSignature {
|
|
21
|
+
/**
|
|
22
|
+
* Search Variants using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
23
|
+
* >**Notes:**
|
|
24
|
+
* + If you don't have permissions to read non visible products then variants related to non-visible products will be filtered out from response.
|
|
25
|
+
* In such case non visible variants also will be filtered out.
|
|
26
|
+
*/
|
|
27
|
+
(options?: SearchVariantsOptions | undefined): Promise<SearchVariantsResponse>;
|
|
28
|
+
}
|
|
29
|
+
export { ActionEvent, Aggregation, AggregationData, AggregationDateHistogramAggregation, AggregationKindOneOf, AggregationNestedAggregation, AggregationRangeAggregation, AggregationResults, AggregationResultsResultOneOf, AggregationResultsScalarResult, AggregationScalarAggregation, AggregationType, AggregationValueAggregation, AggregationValueAggregationOptionsOneOf, Alignment, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AudioData, AvailabilityStatus, Background, BackgroundBackgroundOneOf, BackgroundType, BlockquoteData, BookingData, Border, BorderColors, Brand, BreadCrumb, BreadcrumbsInfo, BulletedListData, ButtonData, CaptionData, CellStyle, ChoiceType, ChoicesSettings, CodeBlockData, CollapsibleListData, ColorData, Colors, CommonAggregation, CommonAggregationKindOneOf, CommonAggregationType, CommonScalarType, CommonSearchDetails, CommonSortOrder, CommonSorting, CommonVideoResolution, ConnectedModifier, ConnectedModifierChoice, ConnectedModifierChoiceValueOneOf, ConnectedModifierModifierSettingsOneOf, ConnectedOption, ConnectedOptionChoice, ConnectedOptionChoiceValueOneOf, ConnectedOptionOptionSettingsOneOf, Crop, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, CursorSearch, CursorSearchPagingMethodOneOf, Cursors, DateHistogramAggregation, DateHistogramAggregationInterval, DateHistogramResult, DateHistogramResults, Decoration, DecorationDataOneOf, DecorationType, DeprecatedSearchVariantsWithOffsetRequest, DeprecatedSearchVariantsWithOffsetResponse, Design, Dimensions, Direction, DiscountType, DividerData, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, ExtendedFields, FileData, FileSource, FileSourceDataOneOf, FileType, FixedMonetaryAmount, FontSizeData, FontType, FreeTextSettings, GIF, GIFData, GIFType, GalleryData, GalleryOptions, Gradient, GroupByAggregation, GroupByAggregationKindOneOf, GroupByValueResults, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, IncludeMissingValuesOptions, InfoSection, InitialExpandedItems, Interval, Inventory, InventoryStatus, Item, ItemDataOneOf, ItemStyle, Keyword, Layout, LayoutCellData, LayoutType, LineStyle, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListValue, MapData, MapSettings, MapType, MeasurementUnit, Media, MediaItemsInfo, MediaType, MentionData, MessageEnvelope, Metadata, MigrateProductVariantsRequest, MigrateProductVariantsResponse, MinVariantPriceInfo, MissingValues, Mode, ModifierChoicesSettings, ModifierRenderType, MultipleColors, NestedAggregation, NestedAggregationItem, NestedAggregationItemKindOneOf, NestedAggregationNestedAggregationItem, NestedAggregationNestedAggregationItemKindOneOf, NestedAggregationNestedAggregationType, NestedAggregationResults, NestedAggregationResultsResultOneOf, NestedAggregationType, NestedResultValue, NestedResultValueResultOneOf, NestedResults, NestedValueAggregationResult, Node, NodeDataOneOf, NodeStyle, NodeType, NullValue, Oembed, Option, OptionChoice, OptionChoiceIds, OptionChoiceNames, OptionDesign, OptionLayout, OrderedListData, Orientation, PDFSettings, PagingMetadata, ParagraphData, Permissions, PhysicalProperties, PlatformOffsetSearch, PlatformOffsetSearchPagingMethodOneOf, PlatformPaging, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutType, PollSettings, Position, PreorderStatus, PriceInfo, PricePerUnit, PricePerUnitRange, PricePerUnitRangePricePerUnit, PricePerUnitSettings, PriceRange, Product, ProductCategoriesInfo, ProductCategory, ProductCategoryIdsInfo, ProductFields, ProductFieldsTypedPropertiesOneOf, ProductMedia, ProductMediaMediaOneOf, ProductMediaMediaType, ProductMediaSetByOneOf, ProductOptionRenderType, ProductPreorderAvailability, ProductType, ProductTypedPropertiesOneOf, QueryVariantsOptions, QueryVariantsRequest, QueryVariantsResponse, RangeAggregation, RangeAggregationRangeBucket, RangeAggregationResult, RangeBucket, RangeResult, RangeResults, ReadOnlyVariant, ReadOnlyVariantTypedPropertiesOneOf, Rel, RequestedFields, RestoreInfo, Results, RevenueDetails, Ribbon, RichContent, ScalarAggregation, ScalarResult, ScalarType, SearchDetails, SearchDetailsMode, SearchVariantsOptions, SearchVariantsRequest, SearchVariantsResponse, SecuredMedia, SecuredMediaFileType, SeoSchema, Settings, SortDirection, SortOrder, SortType, Sorting, Source, Spoiler, SpoilerData, Styles, StylesBorder, Subscription, SubscriptionCyclesOneOf, SubscriptionDetails, SubscriptionDiscount, SubscriptionDiscountDiscountOneOf, SubscriptionFrequency, SubscriptionPrice, SubscriptionPricePerUnit, SubscriptionPricesInfo, TableCellData, TableData, Tag, Target, TextAlignment, TextData, TextNodeStyle, TextStyle, Thumbnail, Thumbnails, ThumbnailsAlignment, Type, V1Media, V3FixedMonetaryAmount, V3InventoryStatus, V3OptionChoice, V3OptionChoiceIds, V3OptionChoiceNames, V3PhysicalProperties, V3PriceInfo, V3PricePerUnit, V3PricePerUnitSettings, V3ProductMedia, V3ProductMediaMediaOneOf, V3ProductMediaSetByOneOf, V3ProductType, V3RevenueDetails, V3SecuredMedia, V3SubscriptionPrice, V3SubscriptionPricePerUnit, V3SubscriptionPricesInfo, V3Thumbnail, V3VariantDigitalProperties, V3VariantPhysicalProperties, V3WeightMeasurementUnitInfo, ValueAggregation, ValueAggregationIncludeMissingValuesOptions, ValueAggregationMissingValues, ValueAggregationOptionsOneOf, ValueAggregationResult, ValueAggregationSortDirection, ValueAggregationSortType, ValueResult, ValueResults, Variant, VariantDigitalProperties, VariantPhysicalProperties, VariantSummary, VariantTypedPropertiesOneOf, VariantsInfo, VariantsQueryBuilder, VariantsQueryResult, VerticalAlignment, Video, VideoData, VideoResolution, ViewMode, ViewRole, VoteRole, WebhookIdentityType, WeightMeasurementUnitInfo, WeightRange, WeightUnit, Width, WidthType, } from './stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js';
|
package/build/internal/cjs/src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.WidthType = exports.Width = exports.WeightUnit = exports.WebhookIdentityType = exports.VoteRole = exports.ViewRole = exports.ViewMode = exports.VerticalAlignment = exports.ValueAggregationSortType = exports.ValueAggregationSortDirection = exports.ValueAggregationMissingValues = exports.V3ProductType = exports.Type = exports.ThumbnailsAlignment = exports.TextAlignment = exports.Target = exports.SubscriptionFrequency = exports.Source = void 0;
|
|
3
|
+
exports.SortOrder = exports.SortDirection = exports.SecuredMediaFileType = exports.SearchDetailsMode = exports.ScalarType = exports.RequestedFields = exports.ProductType = exports.ProductPreorderAvailability = exports.ProductOptionRenderType = exports.ProductMediaMediaType = exports.PreorderStatus = exports.Position = exports.PollLayoutType = exports.PollLayoutDirection = exports.PluginContainerDataAlignment = exports.Orientation = exports.NullValue = exports.NodeType = exports.NestedAggregationType = exports.NestedAggregationNestedAggregationType = exports.ModifierRenderType = exports.Mode = exports.MissingValues = exports.MediaType = exports.MeasurementUnit = exports.MapType = exports.LineStyle = exports.LayoutType = exports.Interval = exports.InitialExpandedItems = exports.GIFType = exports.FontType = exports.FileType = exports.DiscountType = exports.Direction = exports.DecorationType = exports.DateHistogramAggregationInterval = exports.Crop = exports.CommonSortOrder = exports.CommonScalarType = exports.CommonAggregationType = exports.ChoiceType = exports.BackgroundType = exports.AvailabilityStatus = exports.AppType = exports.Alignment = exports.AggregationType = exports.searchVariants = exports.queryVariants = exports.__metadata = void 0;
|
|
4
|
+
exports.WidthType = exports.Width = exports.WeightUnit = exports.WebhookIdentityType = exports.VoteRole = exports.ViewRole = exports.ViewMode = exports.VerticalAlignment = exports.ValueAggregationSortType = exports.ValueAggregationSortDirection = exports.ValueAggregationMissingValues = exports.V3ProductType = exports.Type = exports.ThumbnailsAlignment = exports.TextAlignment = exports.Target = exports.SubscriptionFrequency = exports.Source = exports.SortType = void 0;
|
|
5
5
|
const stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_1 = require("./stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js");
|
|
6
6
|
exports.__metadata = { PACKAGE_NAME: '@wix/stores' };
|
|
7
7
|
/** @internal */
|
|
@@ -11,6 +11,13 @@ function queryVariants(httpClient) {
|
|
|
11
11
|
{ httpClient });
|
|
12
12
|
}
|
|
13
13
|
exports.queryVariants = queryVariants;
|
|
14
|
+
/** @internal */
|
|
15
|
+
function searchVariants(httpClient) {
|
|
16
|
+
return (options) => (0, stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_1.searchVariants)(options,
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
{ httpClient });
|
|
19
|
+
}
|
|
20
|
+
exports.searchVariants = searchVariants;
|
|
14
21
|
var stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_2 = require("./stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js");
|
|
15
22
|
Object.defineProperty(exports, "AggregationType", { enumerable: true, get: function () { return stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_2.AggregationType; } });
|
|
16
23
|
Object.defineProperty(exports, "Alignment", { enumerable: true, get: function () { return stores_catalog_v3_read_only_variant_read_only_variants_v_3_universal_js_2.Alignment; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.js","sourceRoot":"","sources":["../../../../src/stores-catalog-v3-read-only-variant-read-only-variants-v-3.public.ts"],"names":[],"mappings":";;;;AACA,uKAOmF;AAEtE,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE1D,gBAAgB;AAChB,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,OAA8B,EAAE,EAAE,CACxC,IAAA,uFAAsB,EACpB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,sCAOC;AAaD,gBAAgB;AAChB,SAAgB,cAAc,CAC5B,UAAsB;IAEtB,OAAO,CAAC,OAA+B,EAAE,EAAE,CACzC,IAAA,wFAAuB,EACrB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AATD,wCASC;AAcD,qKAiVmF;AArUjF,0KAAA,eAAe,OAAA;AAGf,oKAAA,SAAS,OAAA;AAIT,kKAAA,OAAO,OAAA;AAEP,6KAAA,kBAAkB,OAAA;AAGlB,yKAAA,cAAc,OAAA;AAYd,qKAAA,UAAU,OAAA;AAQV,gLAAA,qBAAqB,OAAA;AACrB,2KAAA,gBAAgB,OAAA;AAEhB,0KAAA,eAAe,OAAA;AAWf,+JAAA,IAAI,OAAA;AASJ,2LAAA,gCAAgC,OAAA;AAKhC,yKAAA,cAAc,OAAA;AAKd,oKAAA,SAAS,OAAA;AACT,uKAAA,YAAY,OAAA;AAeZ,mKAAA,QAAQ,OAAA;AAGR,mKAAA,QAAQ,OAAA;AAIR,kKAAA,OAAO,OAAA;AAkBP,+KAAA,oBAAoB,OAAA;AACpB,mKAAA,QAAQ,OAAA;AASR,qKAAA,UAAU,OAAA;AACV,oKAAA,SAAS,OAAA;AAST,kKAAA,OAAO,OAAA;AACP,0KAAA,eAAe,OAAA;AAGf,oKAAA,SAAS,OAAA;AAOT,wKAAA,aAAa,OAAA;AACb,+JAAA,IAAI,OAAA;AAEJ,6KAAA,kBAAkB,OAAA;AAOlB,iMAAA,sCAAsC,OAAA;AAGtC,gLAAA,qBAAqB,OAAA;AAQrB,mKAAA,QAAQ,OAAA;AACR,oKAAA,SAAS,OAAA;AAST,sKAAA,WAAW,OAAA;AAWX,uLAAA,4BAA4B,OAAA;AAQ5B,8KAAA,mBAAmB,OAAA;AACnB,yKAAA,cAAc,OAAA;AAEd,mKAAA,QAAQ,OAAA;AACR,yKAAA,cAAc,OAAA;AAed,gLAAA,qBAAqB,OAAA;AAErB,kLAAA,uBAAuB,OAAA;AACvB,sLAAA,2BAA2B,OAAA;AAC3B,sKAAA,WAAW,OAAA;AAcX,0KAAA,eAAe,OAAA;AAQf,qKAAA,UAAU,OAAA;AAEV,4KAAA,iBAAiB,OAAA;AAKjB,+KAAA,oBAAoB,OAAA;AAGpB,wKAAA,aAAa,OAAA;AACb,oKAAA,SAAS,OAAA;AACT,mKAAA,QAAQ,OAAA;AAER,iKAAA,MAAM,OAAA;AAUN,gLAAA,qBAAqB,OAAA;AAOrB,iKAAA,MAAM,OAAA;AACN,wKAAA,aAAa,OAAA;AAMb,8KAAA,mBAAmB,OAAA;AACnB,+JAAA,IAAI,OAAA;AAcJ,wKAAA,aAAa,OAAA;AAYb,wLAAA,6BAA6B,OAAA;AAG7B,wLAAA,6BAA6B,OAAA;AAC7B,mLAAA,wBAAwB,OAAA;AAWxB,4KAAA,iBAAiB,OAAA;AAIjB,mKAAA,QAAQ,OAAA;AACR,mKAAA,QAAQ,OAAA;AACR,mKAAA,QAAQ,OAAA;AACR,8KAAA,mBAAmB,OAAA;AAGnB,qKAAA,UAAU,OAAA;AACV,gKAAA,KAAK,OAAA;AACL,oKAAA,SAAS,OAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
2
|
export interface ReadOnlyVariant extends ReadOnlyVariantTypedPropertiesOneOf {
|
|
2
3
|
/** Physical properties. Must be passed when `productType: PHYSICAL` */
|
|
3
4
|
physicalProperties?: V3VariantPhysicalProperties;
|
|
@@ -1787,7 +1788,7 @@ export interface Node extends NodeDataOneOf {
|
|
|
1787
1788
|
/** Node type. Use `APP_EMBED` for nodes that embed content from other Wix apps. Use `EMBED` to embed content in [oEmbed](https://oembed.com/) format. */
|
|
1788
1789
|
type?: NodeType;
|
|
1789
1790
|
/** Node ID. */
|
|
1790
|
-
|
|
1791
|
+
id?: string;
|
|
1791
1792
|
/** A list of child nodes. */
|
|
1792
1793
|
nodes?: Node[];
|
|
1793
1794
|
/** Padding and background color styling for the node. */
|
|
@@ -2204,7 +2205,7 @@ export interface FileSource extends FileSourceDataOneOf {
|
|
|
2204
2205
|
*/
|
|
2205
2206
|
custom?: string | null;
|
|
2206
2207
|
/** An ID that's resolved to a URL by a resolver function. */
|
|
2207
|
-
|
|
2208
|
+
id?: string | null;
|
|
2208
2209
|
/** Indicates whether the file's source is private. Defaults to `false`. */
|
|
2209
2210
|
private?: boolean | null;
|
|
2210
2211
|
}
|
|
@@ -2218,7 +2219,7 @@ export interface FileSourceDataOneOf {
|
|
|
2218
2219
|
*/
|
|
2219
2220
|
custom?: string | null;
|
|
2220
2221
|
/** An ID that's resolved to a URL by a resolver function. */
|
|
2221
|
-
|
|
2222
|
+
id?: string | null;
|
|
2222
2223
|
}
|
|
2223
2224
|
export interface PDFSettings {
|
|
2224
2225
|
/**
|
|
@@ -2621,7 +2622,7 @@ export interface Permissions {
|
|
|
2621
2622
|
}
|
|
2622
2623
|
export interface Option {
|
|
2623
2624
|
/** Option ID. */
|
|
2624
|
-
|
|
2625
|
+
id?: string | null;
|
|
2625
2626
|
/** Option title. */
|
|
2626
2627
|
title?: string | null;
|
|
2627
2628
|
/** The image displayed with the option. */
|
|
@@ -2718,7 +2719,7 @@ export interface OptionDesign {
|
|
|
2718
2719
|
}
|
|
2719
2720
|
export interface Poll {
|
|
2720
2721
|
/** Poll ID. */
|
|
2721
|
-
|
|
2722
|
+
id?: string | null;
|
|
2722
2723
|
/** Poll title. */
|
|
2723
2724
|
title?: string | null;
|
|
2724
2725
|
/** Poll creator ID. */
|
|
@@ -2829,7 +2830,7 @@ export interface MentionData {
|
|
|
2829
2830
|
/** The version of the user's name that appears after the `@` character in the mention. */
|
|
2830
2831
|
slug?: string;
|
|
2831
2832
|
/** Mentioned user's ID. */
|
|
2832
|
-
|
|
2833
|
+
id?: string | null;
|
|
2833
2834
|
}
|
|
2834
2835
|
export interface FontSizeData {
|
|
2835
2836
|
/** The units used for the font size. */
|
|
@@ -2843,7 +2844,7 @@ export declare enum FontType {
|
|
|
2843
2844
|
}
|
|
2844
2845
|
export interface SpoilerData {
|
|
2845
2846
|
/** Spoiler ID. */
|
|
2846
|
-
|
|
2847
|
+
id?: string | null;
|
|
2847
2848
|
}
|
|
2848
2849
|
export interface AppEmbedData extends AppEmbedDataAppDataOneOf {
|
|
2849
2850
|
/** Data for embedded Wix Bookings content. */
|
|
@@ -4446,6 +4447,7 @@ export declare enum WebhookIdentityType {
|
|
|
4446
4447
|
WIX_USER = "WIX_USER",
|
|
4447
4448
|
APP = "APP"
|
|
4448
4449
|
}
|
|
4450
|
+
type ReadOnlyVariantNonNullablePaths = `physicalProperties.pricePerUnit.settings.quantity` | `physicalProperties.pricePerUnit.settings.measurementUnit` | `physicalProperties.pricePerUnit.value` | `digitalProperties.digitalFile._id` | `digitalProperties.digitalFile.fileName` | `digitalProperties.digitalFile.fileType` | `_id` | `optionChoices` | `optionChoices.${number}.optionChoiceIds.optionId` | `optionChoices.${number}.optionChoiceIds.choiceId` | `optionChoices.${number}.optionChoiceNames.optionName` | `optionChoices.${number}.optionChoiceNames.choiceName` | `optionChoices.${number}.optionChoiceNames.renderType` | `price.actualPrice.amount` | `revenueDetails.cost.amount` | `revenueDetails.profitMargin` | `media._id` | `media.url` | `media.mediaType` | `media.thumbnail.url` | `media.thumbnail.height` | `media.thumbnail.width` | `media.uploadId` | `subscriptionPricesInfo.subscriptionPrices` | `subscriptionPricesInfo.subscriptionPrices.${number}.subscriptionId` | `subscriptionPricesInfo.subscriptionPrices.${number}.price.amount` | `subscriptionPricesInfo.subscriptionPrices.${number}.pricePerUnit.value` | `inventoryStatus.inStock` | `inventoryStatus.preorderEnabled` | `productData.physicalProperties.weightMeasurementUnitInfo.weightMeasurementUnit` | `productData.productId` | `productData.productType`;
|
|
4449
4451
|
/**
|
|
4450
4452
|
* Retrieves a list of ReadOnlyVariants, given the provided [paging, filtering, and sorting][1].
|
|
4451
4453
|
* Up to 1,000 ReadOnlyVariants can be returned per request.
|
|
@@ -4456,6 +4458,8 @@ export declare enum WebhookIdentityType {
|
|
|
4456
4458
|
* @documentationMaturity preview
|
|
4457
4459
|
* @permissionScope Manage Stores - all permissions
|
|
4458
4460
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4461
|
+
* @permissionScope Manage Stores
|
|
4462
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4459
4463
|
* @permissionScope Read products in v3 catalog
|
|
4460
4464
|
* @permissionScopeId SCOPE.STORES.PRODUCT_READ
|
|
4461
4465
|
* @permissionScope Read v3 catalog
|
|
@@ -4476,6 +4480,8 @@ export declare enum WebhookIdentityType {
|
|
|
4476
4480
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4477
4481
|
* @permissionScope Manage Stores - all permissions
|
|
4478
4482
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4483
|
+
* @permissionScope Manage Stores
|
|
4484
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4479
4485
|
* @permissionScope Manage Products
|
|
4480
4486
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
4481
4487
|
* @permissionScope Read Stores - all read permissions
|
|
@@ -4555,4 +4561,63 @@ export interface VariantsQueryBuilder {
|
|
|
4555
4561
|
/** @documentationMaturity preview */
|
|
4556
4562
|
find: () => Promise<VariantsQueryResult>;
|
|
4557
4563
|
}
|
|
4564
|
+
/**
|
|
4565
|
+
* Search Variants using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
4566
|
+
* >**Notes:**
|
|
4567
|
+
* + If you don't have permissions to read non visible products then variants related to non-visible products will be filtered out from response.
|
|
4568
|
+
* In such case non visible variants also will be filtered out.
|
|
4569
|
+
* @internal
|
|
4570
|
+
* @documentationMaturity preview
|
|
4571
|
+
* @permissionId WIX_STORES.READ_ONLY_VARIANT_READ
|
|
4572
|
+
* @permissionId WIX_STORES.READ_ONLY_VARIANT_READ_HIDDEN
|
|
4573
|
+
* @permissionScope Manage Stores - all permissions
|
|
4574
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4575
|
+
* @permissionScope Manage Stores
|
|
4576
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4577
|
+
* @permissionScope Read products in v3 catalog
|
|
4578
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_READ
|
|
4579
|
+
* @permissionScope Read v3 catalog
|
|
4580
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_READ
|
|
4581
|
+
* @permissionScope Manage Products
|
|
4582
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
4583
|
+
* @permissionScope Read Stores - all read permissions
|
|
4584
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
4585
|
+
* @permissionScope Read Products
|
|
4586
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
4587
|
+
* @permissionScope Product v3 read admin
|
|
4588
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_READ_ADMIN
|
|
4589
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
4590
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
4591
|
+
* @permissionScope Manage v3 catalog
|
|
4592
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_WRITE
|
|
4593
|
+
* @permissionScope Manage Orders
|
|
4594
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
4595
|
+
* @permissionScope Manage Stores - all permissions
|
|
4596
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
4597
|
+
* @permissionScope Manage Stores
|
|
4598
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
4599
|
+
* @permissionScope Manage Products
|
|
4600
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
4601
|
+
* @permissionScope Read Stores - all read permissions
|
|
4602
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
4603
|
+
* @permissionScope Read Products
|
|
4604
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
4605
|
+
* @permissionScope Product v3 read admin
|
|
4606
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_READ_ADMIN
|
|
4607
|
+
* @applicableIdentity APP
|
|
4608
|
+
* @applicableIdentity VISITOR
|
|
4609
|
+
* @fqn com.wix.stores.catalog.product.variants.reader.api.v3.ProductVariantsReader.SearchVariants
|
|
4610
|
+
*/
|
|
4611
|
+
export declare function searchVariants(options?: SearchVariantsOptions): Promise<NonNullablePaths<SearchVariantsResponse, {
|
|
4612
|
+
[P in ReadOnlyVariantNonNullablePaths]: `variants.${number}.${P}`;
|
|
4613
|
+
}[ReadOnlyVariantNonNullablePaths] | `aggregationData.results` | `aggregationData.results.${number}.scalar.type` | `aggregationData.results.${number}.scalar.value` | `aggregationData.results.${number}.name` | `aggregationData.results.${number}.type` | `aggregationData.results.${number}.fieldPath`>>;
|
|
4614
|
+
export interface SearchVariantsOptions {
|
|
4615
|
+
/** WQL expression */
|
|
4616
|
+
search?: CursorSearch;
|
|
4617
|
+
/**
|
|
4618
|
+
* A list of requested fields to be included in the response.
|
|
4619
|
+
* @maxSize 100
|
|
4620
|
+
*/
|
|
4621
|
+
fields?: RequestedFields[];
|
|
4622
|
+
}
|
|
4558
4623
|
export {};
|
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.AppType = exports.FontType = exports.DecorationType = exports.BackgroundType = exports.PollLayoutDirection = exports.PollLayoutType = exports.VoteRole = exports.ViewRole = exports.MapType = exports.Position = exports.Source = exports.GIFType = exports.ThumbnailsAlignment = exports.Crop = exports.Orientation = exports.LayoutType = exports.ViewMode = exports.Alignment = exports.Width = exports.LineStyle = exports.TextAlignment = exports.Target = exports.Type = exports.PluginContainerDataAlignment = exports.WidthType = exports.NodeType = exports.SearchDetailsMode = exports.CommonAggregationType = exports.DateHistogramAggregationInterval = exports.NestedAggregationNestedAggregationType = exports.CommonScalarType = exports.ValueAggregationMissingValues = exports.ValueAggregationSortDirection = exports.ValueAggregationSortType = exports.CommonSortOrder = exports.Mode = exports.AggregationType = exports.Interval = exports.NestedAggregationType = exports.ScalarType = exports.MissingValues = exports.SortDirection = exports.SortType = exports.RequestedFields = exports.SortOrder = exports.WeightUnit = exports.V3ProductType = exports.SecuredMediaFileType = exports.MeasurementUnit = exports.ProductMediaMediaType = void 0;
|
|
27
|
-
exports.queryVariants = exports.WebhookIdentityType = exports.DiscountType = exports.SubscriptionFrequency = exports.FileType = exports.ProductType = exports.ProductPreorderAvailability = exports.PreorderStatus = exports.AvailabilityStatus = exports.ModifierRenderType = exports.ChoiceType = exports.ProductOptionRenderType = exports.MediaType = exports.NullValue = exports.VerticalAlignment = exports.Direction = exports.InitialExpandedItems = void 0;
|
|
27
|
+
exports.searchVariants = exports.queryVariants = exports.WebhookIdentityType = exports.DiscountType = exports.SubscriptionFrequency = exports.FileType = exports.ProductType = exports.ProductPreorderAvailability = exports.PreorderStatus = exports.AvailabilityStatus = exports.ModifierRenderType = exports.ChoiceType = exports.ProductOptionRenderType = exports.MediaType = exports.NullValue = exports.VerticalAlignment = exports.Direction = exports.InitialExpandedItems = void 0;
|
|
28
28
|
const transform_error_1 = require("@wix/sdk-runtime/transform-error");
|
|
29
29
|
const query_builder_1 = require("@wix/sdk-runtime/query-builder");
|
|
30
30
|
const rename_all_nested_keys_1 = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
@@ -720,6 +720,8 @@ var WebhookIdentityType;
|
|
|
720
720
|
* @documentationMaturity preview
|
|
721
721
|
* @permissionScope Manage Stores - all permissions
|
|
722
722
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
723
|
+
* @permissionScope Manage Stores
|
|
724
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
723
725
|
* @permissionScope Read products in v3 catalog
|
|
724
726
|
* @permissionScopeId SCOPE.STORES.PRODUCT_READ
|
|
725
727
|
* @permissionScope Read v3 catalog
|
|
@@ -740,6 +742,8 @@ var WebhookIdentityType;
|
|
|
740
742
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
741
743
|
* @permissionScope Manage Stores - all permissions
|
|
742
744
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
745
|
+
* @permissionScope Manage Stores
|
|
746
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
743
747
|
* @permissionScope Manage Products
|
|
744
748
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
745
749
|
* @permissionScope Read Stores - all read permissions
|
|
@@ -807,4 +811,88 @@ function queryVariants(options) {
|
|
|
807
811
|
});
|
|
808
812
|
}
|
|
809
813
|
exports.queryVariants = queryVariants;
|
|
814
|
+
/**
|
|
815
|
+
* Search Variants using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
816
|
+
* >**Notes:**
|
|
817
|
+
* + If you don't have permissions to read non visible products then variants related to non-visible products will be filtered out from response.
|
|
818
|
+
* In such case non visible variants also will be filtered out.
|
|
819
|
+
* @internal
|
|
820
|
+
* @documentationMaturity preview
|
|
821
|
+
* @permissionId WIX_STORES.READ_ONLY_VARIANT_READ
|
|
822
|
+
* @permissionId WIX_STORES.READ_ONLY_VARIANT_READ_HIDDEN
|
|
823
|
+
* @permissionScope Manage Stores - all permissions
|
|
824
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
825
|
+
* @permissionScope Manage Stores
|
|
826
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
827
|
+
* @permissionScope Read products in v3 catalog
|
|
828
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_READ
|
|
829
|
+
* @permissionScope Read v3 catalog
|
|
830
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_READ
|
|
831
|
+
* @permissionScope Manage Products
|
|
832
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
833
|
+
* @permissionScope Read Stores - all read permissions
|
|
834
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
835
|
+
* @permissionScope Read Products
|
|
836
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
837
|
+
* @permissionScope Product v3 read admin
|
|
838
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_READ_ADMIN
|
|
839
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
840
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
841
|
+
* @permissionScope Manage v3 catalog
|
|
842
|
+
* @permissionScopeId SCOPE.STORES.CATALOG_WRITE
|
|
843
|
+
* @permissionScope Manage Orders
|
|
844
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS
|
|
845
|
+
* @permissionScope Manage Stores - all permissions
|
|
846
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
847
|
+
* @permissionScope Manage Stores
|
|
848
|
+
* @permissionScopeId SCOPE.STORES.MANAGE-STORES
|
|
849
|
+
* @permissionScope Manage Products
|
|
850
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
851
|
+
* @permissionScope Read Stores - all read permissions
|
|
852
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
853
|
+
* @permissionScope Read Products
|
|
854
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
855
|
+
* @permissionScope Product v3 read admin
|
|
856
|
+
* @permissionScopeId SCOPE.STORES.PRODUCT_READ_ADMIN
|
|
857
|
+
* @applicableIdentity APP
|
|
858
|
+
* @applicableIdentity VISITOR
|
|
859
|
+
* @fqn com.wix.stores.catalog.product.variants.reader.api.v3.ProductVariantsReader.SearchVariants
|
|
860
|
+
*/
|
|
861
|
+
async function searchVariants(options) {
|
|
862
|
+
// @ts-ignore
|
|
863
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
864
|
+
const payload = (0, rename_all_nested_keys_1.renameKeysFromSDKRequestToRESTRequest)({
|
|
865
|
+
search: options?.search,
|
|
866
|
+
fields: options?.fields,
|
|
867
|
+
});
|
|
868
|
+
const reqOpts = ambassadorWixStoresCatalogV3ReadOnlyVariant.searchVariants(payload);
|
|
869
|
+
sideEffects?.onSiteCall?.();
|
|
870
|
+
try {
|
|
871
|
+
const result = await httpClient.request(reqOpts);
|
|
872
|
+
sideEffects?.onSuccess?.(result);
|
|
873
|
+
return (0, rename_all_nested_keys_1.renameKeysFromRESTResponseToSDKResponse)((0, transform_paths_1.transformPaths)(result.data, [
|
|
874
|
+
{
|
|
875
|
+
transformFn: image_1.transformRESTImageToSDKImage,
|
|
876
|
+
paths: [{ path: 'variants.media.image' }],
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
transformFn: video_v2_1.transformRESTVideoV2ToSDKVideoV2,
|
|
880
|
+
paths: [{ path: 'variants.media.video' }],
|
|
881
|
+
},
|
|
882
|
+
]));
|
|
883
|
+
}
|
|
884
|
+
catch (err) {
|
|
885
|
+
const transformedError = (0, transform_error_1.transformError)(err, {
|
|
886
|
+
spreadPathsToArguments: {},
|
|
887
|
+
explicitPathsToArguments: {
|
|
888
|
+
search: '$[0].search',
|
|
889
|
+
fields: '$[0].fields',
|
|
890
|
+
},
|
|
891
|
+
singleArgumentUnchanged: false,
|
|
892
|
+
}, ['options']);
|
|
893
|
+
sideEffects?.onError?.(err);
|
|
894
|
+
throw transformedError;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
exports.searchVariants = searchVariants;
|
|
810
898
|
//# sourceMappingURL=stores-catalog-v3-read-only-variant-read-only-variants-v-3.universal.js.map
|