@wix/auto_sdk_stores_products 1.0.25 → 1.0.26
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 +68 -68
- package/build/cjs/index.js +830 -976
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1186 -1205
- package/build/cjs/index.typings.js +704 -850
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +643 -643
- package/build/cjs/meta.js +586 -732
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +68 -68
- package/build/es/index.mjs +830 -976
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1186 -1205
- package/build/es/index.typings.mjs +704 -850
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +643 -643
- package/build/es/meta.mjs +586 -732
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +68 -68
- package/build/internal/cjs/index.js +830 -976
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1186 -1205
- package/build/internal/cjs/index.typings.js +704 -850
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +643 -643
- package/build/internal/cjs/meta.js +586 -732
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +68 -68
- package/build/internal/es/index.mjs +830 -976
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1186 -1205
- package/build/internal/es/index.typings.mjs +704 -850
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +643 -643
- package/build/internal/es/meta.mjs +586 -732
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,8 +1,67 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export { AddProductMediaRequest, AddProductMediaResponse, AddProductMediaToChoicesRequest, AddProductMediaToChoicesResponse, AddProductsToCollectionRequest, AddProductsToCollectionResponse, AdditionalInfoSection, AdjustValueValueOneOf, AggregateProductsRequest, AggregateProductsResponse, AllowedProductsCountLimitExceededErrorData, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkAdjustProductPropertiesByFilterSyncRequest, BulkAdjustProductPropertiesByFilterSyncResponse, BulkAdjustProductPropertiesRequest, BulkDeleteProductsRequest, BulkDeleteProductsResponse, BulkProductResult, BulkQueryCustomFieldsRequest, BulkQueryCustomFieldsResponse, BulkRemoveCustomFieldsRequest, BulkRemoveCustomFieldsResponse, BulkSetCustomFieldsRequest, BulkSetCustomFieldsResponse, BulkUpdateProductsByFilterSyncRequest, BulkUpdateProductsByFilterSyncResponse, BulkUpdateProductsRequest, Choice, CollectionChanged, CollectionCreated, CollectionDeleted, CostAndProfitData, CreateCollectionRequest, CreateDigitalProductRequest, CreateDigitalProductResponse, CreateProductPlatformizedRequest, CreateProductPlatformizedResponse, CreateProductRequest, CursorPaging, Cursors, CustomFieldsContainer, CustomTextField, DeleteCollectionRequest, DeleteCollectionResponse, DeleteProductOptionsRequest, DeleteProductOptionsResponse, DeleteProductPlatformizedRequest, DeleteProductPlatformizedResponse, DeleteProductRequest, DeleteProductResponse, Discount, DiscountType, FileType, FocalPoint, FormattedPrice, GetCollectionBySlugRequest, GetCollectionRequest, GetCollectionResponse, GetProductPlatformizedRequest, GetProductPlatformizedResponse, GetProductRequest, GetProductsRequest, GetProductsResponse, GetStoreVariantRequest, IdentificationData, IdentificationDataIdOneOf, InventoryStatus, ItemMetadata, Keyword, MeasurementUnit, Media, MediaDataForWriteMediaSourceOneOf, MediaItem, MediaItemItemOneOf, MediaItemType, MediaItemUrlAndSize, MediaItemVideo, MessageEnvelope, NumericPropertyRange, OptionAndChoice, OptionType, PageUrl, Paging, PagingMetadata, PagingWithBigLimit, PercentageData, PlatformMedia, PlatformMediaMediaOneOf, PlatformPaging, PlatformPagingMetadata, PlatformQueryPagingMethodOneOf, PreorderInfo, PriceData, PricePerUnitData, ProductChanged, ProductCreated, ProductDeleted, ProductOption, ProductOptionsAvailabilityRequest, ProductType, ProductsQueryResult, PropertyAdjustmentData, PropertyAdjustmentDataByOneOf, Query, QueryCollectionsPlatformizedRequest, QueryCollectionsPlatformizedResponse, QueryCollectionsRequest, QueryCollectionsResponse, QueryCustomFieldsRequest, QueryCustomFieldsResponse, QueryProductVariantsRequest, QueryProductsPlatformizedRequest, QueryProductsPlatformizedResponse, QueryProductsRequest, QueryProductsResponse, QueryProductsWithBigPageLimitRequest, QueryStoreVariantsRequest, QueryStoreVariantsWithBigLimitRequest, QueryWithBigPageLimit, ReCloneStoreRequest, ReCloneStoreResponse, RemoveCustomFieldsRequest, RemoveCustomFieldsResponse, RemoveProductBrandRequest, RemoveProductBrandResponse, RemoveProductMediaFromChoicesRequest, RemoveProductMediaFromChoicesResponse, RemoveProductMediaRequest, RemoveProductMediaResponse, RemoveProductRibbonRequest, RemoveProductRibbonResponse, RemoveProductsFromCollectionRequest, RemoveProductsFromCollectionResponse, ResetAllVariantDataRequest, ResetAllVariantDataResponse, Ribbon, SecuredMedia, SeoSchema, SetCustomFieldsRequest, SetCustomFieldsResponse, SetValueValueOneOf, Settings, SortOrder, Sorting, Stock, StoreVariant, Tag, UnlimitedPlatformCursorPaging, UnlimitedPlatformPaging, UnlimitedPlatformQuery, UnlimitedPlatformQueryPagingMethodOneOf, UpdateCollectionRequest, UpdateProductPlatformizedRequest, UpdateProductPlatformizedResponse, UpdateProductRequest, UpdateVariantsRequest,
|
|
2
|
+
import { ProductsQueryBuilder, GetProductOptions, GetProductResponse, GetCollectionBySlugResponse, ProductOptionsAvailabilityResponse, QueryProductVariantsOptions, QueryProductVariantsResponse, PlatformQuery, QueryStoreVariantsResponse, GetStoreVariantResponse, Product, CreateProductResponse, UpdateProduct, UpdateProductResponse, VariantOverride, UpdateVariantsResponse, MediaDataForWrite, MediaAssignmentToChoice, Collection, CreateCollectionResponse, UpdateCollection, UpdateCollectionResponse, SetValue, BulkUpdateProductsResponse, AdjustValue, BulkAdjustProductPropertiesResponse, ProductCollectionChangedEnvelope, ProductCollectionCreatedEnvelope, ProductCollectionDeletedEnvelope, ProductChangedEnvelope, ProductCreatedEnvelope, ProductDeletedEnvelope, ProductVariantsChangedEnvelope } from './index.typings.js';
|
|
3
|
+
export { AddProductMediaRequest, AddProductMediaResponse, AddProductMediaToChoicesRequest, AddProductMediaToChoicesResponse, AddProductsToCollectionRequest, AddProductsToCollectionResponse, AdditionalInfoSection, AdjustValueValueOneOf, AggregateProductsRequest, AggregateProductsResponse, AllowedProductsCountLimitExceededErrorData, ApplicationError, BaseEventMetadata, BulkActionMetadata, BulkAdjustProductPropertiesByFilterSyncRequest, BulkAdjustProductPropertiesByFilterSyncResponse, BulkAdjustProductPropertiesRequest, BulkDeleteProductsRequest, BulkDeleteProductsResponse, BulkProductResult, BulkQueryCustomFieldsRequest, BulkQueryCustomFieldsResponse, BulkRemoveCustomFieldsRequest, BulkRemoveCustomFieldsResponse, BulkSetCustomFieldsRequest, BulkSetCustomFieldsResponse, BulkUpdateProductsByFilterSyncRequest, BulkUpdateProductsByFilterSyncResponse, BulkUpdateProductsRequest, Choice, CollectionChanged, CollectionCreated, CollectionDeleted, CostAndProfitData, CreateCollectionRequest, CreateDigitalProductRequest, CreateDigitalProductResponse, CreateProductPlatformizedRequest, CreateProductPlatformizedResponse, CreateProductRequest, CursorPaging, Cursors, CustomFieldsContainer, CustomTextField, DeleteCollectionRequest, DeleteCollectionResponse, DeleteProductOptionsRequest, DeleteProductOptionsResponse, DeleteProductPlatformizedRequest, DeleteProductPlatformizedResponse, DeleteProductRequest, DeleteProductResponse, Discount, DiscountType, FileType, FocalPoint, FormattedPrice, GetCollectionBySlugRequest, GetCollectionRequest, GetCollectionResponse, GetProductPlatformizedRequest, GetProductPlatformizedResponse, GetProductRequest, GetProductsRequest, GetProductsResponse, GetStoreVariantRequest, IdentificationData, IdentificationDataIdOneOf, InventoryStatus, ItemMetadata, Keyword, MeasurementUnit, Media, MediaDataForWriteMediaSourceOneOf, MediaItem, MediaItemItemOneOf, MediaItemType, MediaItemUrlAndSize, MediaItemVideo, MessageEnvelope, NumericPropertyRange, OptionAndChoice, OptionType, PageUrl, Paging, PagingMetadata, PagingWithBigLimit, PercentageData, PlatformMedia, PlatformMediaMediaOneOf, PlatformPaging, PlatformPagingMetadata, PlatformQueryPagingMethodOneOf, PreorderInfo, PriceData, PricePerUnitData, ProductChanged, ProductCreated, ProductDeleted, ProductOption, ProductOptionsAvailabilityRequest, ProductType, ProductsQueryResult, PropertyAdjustmentData, PropertyAdjustmentDataByOneOf, Query, QueryCollectionsPlatformizedRequest, QueryCollectionsPlatformizedResponse, QueryCollectionsRequest, QueryCollectionsResponse, QueryCustomFieldsRequest, QueryCustomFieldsResponse, QueryProductVariantsRequest, QueryProductsPlatformizedRequest, QueryProductsPlatformizedResponse, QueryProductsRequest, QueryProductsResponse, QueryProductsWithBigPageLimitRequest, QueryStoreVariantsRequest, QueryStoreVariantsWithBigLimitRequest, QueryWithBigPageLimit, ReCloneStoreRequest, ReCloneStoreResponse, RemoveCustomFieldsRequest, RemoveCustomFieldsResponse, RemoveProductBrandRequest, RemoveProductBrandResponse, RemoveProductMediaFromChoicesRequest, RemoveProductMediaFromChoicesResponse, RemoveProductMediaRequest, RemoveProductMediaResponse, RemoveProductRibbonRequest, RemoveProductRibbonResponse, RemoveProductsFromCollectionRequest, RemoveProductsFromCollectionResponse, ResetAllVariantDataRequest, ResetAllVariantDataResponse, Ribbon, SecuredMedia, SeoSchema, SetCustomFieldsRequest, SetCustomFieldsResponse, SetValueValueOneOf, Settings, SortOrder, Sorting, Stock, StoreVariant, Tag, UnlimitedPlatformCursorPaging, UnlimitedPlatformPaging, UnlimitedPlatformQuery, UnlimitedPlatformQueryPagingMethodOneOf, UpdateCollectionRequest, UpdateProductPlatformizedRequest, UpdateProductPlatformizedResponse, UpdateProductRequest, UpdateVariantsRequest, Variant, VariantChanged, VariantData, VariantDataWithNoStock, VariantStock, VariantsChanged, Version, VideoResolution, WebhookIdentityType } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
type ProductNonNullablePaths = `_id` | `slug` | `productType` | `weightRange.minValue` | `weightRange.maxValue` | `stock.trackInventory` | `stock.inStock` | `stock.inventoryStatus` | `price.currency` | `price.discountedPrice` | `price.formatted.price` | `price.formatted.discountedPrice` | `priceData.currency` | `priceData.discountedPrice` | `priceData.formatted.price` | `priceData.formatted.discountedPrice` | `convertedPriceData.currency` | `convertedPriceData.discountedPrice` | `convertedPriceData.formatted.price` | `convertedPriceData.formatted.discountedPrice` | `priceRange.minValue` | `priceRange.maxValue` | `costAndProfitData.formattedItemCost` | `costAndProfitData.profit` | `costAndProfitData.formattedProfit` | `costAndProfitData.profitMargin` | `costRange.minValue` | `costRange.maxValue` | `pricePerUnitData.totalQuantity` | `pricePerUnitData.totalMeasurementUnit` | `pricePerUnitData.baseQuantity` | `pricePerUnitData.baseMeasurementUnit` | `additionalInfoSections` | `additionalInfoSections.${number}.title` | `additionalInfoSections.${number}.description` | `ribbons` | `ribbons.${number}.text` | `media.mainMedia.image.url` | `media.mainMedia.image.width` | `media.mainMedia.image.height` | `media.mainMedia.video.files` | `media.mainMedia.video.stillFrameMediaId` | `media.mainMedia.mediaType` | `media.mainMedia.title` | `media.mainMedia._id` | `media.items` | `customTextFields` | `customTextFields.${number}.title` | `customTextFields.${number}.maxLength` | `customTextFields.${number}.mandatory` | `productOptions` | `productOptions.${number}.optionType` | `productOptions.${number}.name` | `productPageUrl.base` | `productPageUrl.path` | `numericId` | `inventoryItemId` | `discount.type` | `discount.value` | `collectionIds` | `variants` | `variants.${number}._id` | `variants.${number}.variant.priceData.currency` | `variants.${number}.variant.priceData.discountedPrice` | `variants.${number}.variant.priceData.formatted.price` | `variants.${number}.variant.priceData.formatted.discountedPrice` | `variants.${number}.variant.costAndProfitData.formattedItemCost` | `variants.${number}.variant.costAndProfitData.profit` | `variants.${number}.variant.costAndProfitData.formattedProfit` | `variants.${number}.variant.costAndProfitData.profitMargin` | `variants.${number}.variant.weight` | `variants.${number}.variant.sku` | `variants.${number}.variant.visible` | `variants.${number}.stock.trackQuantity` | `variants.${number}.stock.inStock` | `seoData.tags` | `seoData.tags.${number}.type` | `seoData.tags.${number}.children` | `seoData.tags.${number}.custom` | `seoData.tags.${number}.disabled` | `seoData.settings.preventAutoRedirect` | `seoData.settings.keywords` | `seoData.settings.keywords.${number}.term` | `seoData.settings.keywords.${number}.isMain`;
|
|
6
|
+
declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
|
|
7
|
+
interface QueryProductsSignature {
|
|
8
|
+
/**
|
|
9
|
+
* Returns a list of up to 100 products, given the provided paging, sorting and filtering.
|
|
10
|
+
*/
|
|
11
|
+
(): ProductsQueryBuilder;
|
|
12
|
+
}
|
|
13
|
+
declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
|
|
14
|
+
interface GetProductSignature {
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves a product with the provided ID.
|
|
17
|
+
* @param - Requested product ID.
|
|
18
|
+
*/
|
|
19
|
+
(_id: string, options?: GetProductOptions): Promise<NonNullablePaths<GetProductResponse, {
|
|
20
|
+
[P in ProductNonNullablePaths]: `product.${P}`;
|
|
21
|
+
}[ProductNonNullablePaths]>>;
|
|
22
|
+
}
|
|
23
|
+
declare function getCollectionBySlug$1(httpClient: HttpClient): GetCollectionBySlugSignature;
|
|
24
|
+
interface GetCollectionBySlugSignature {
|
|
25
|
+
/**
|
|
26
|
+
* Retrieves a collection with the provided slug.
|
|
27
|
+
* @param - Slug of the collection to retrieve.
|
|
28
|
+
*/
|
|
29
|
+
(slug: string): Promise<NonNullablePaths<GetCollectionBySlugResponse, `collection.media.mainMedia.image.url` | `collection.media.mainMedia.image.width` | `collection.media.mainMedia.image.height` | `collection.media.mainMedia.video.files` | `collection.media.mainMedia.video.stillFrameMediaId` | `collection.media.mainMedia.mediaType` | `collection.media.mainMedia.title` | `collection.media.mainMedia._id` | `collection.media.items` | `collection.numberOfProducts`>>;
|
|
30
|
+
}
|
|
31
|
+
declare function getProductOptionsAvailability$1(httpClient: HttpClient): GetProductOptionsAvailabilitySignature;
|
|
32
|
+
interface GetProductOptionsAvailabilitySignature {
|
|
33
|
+
/**
|
|
34
|
+
* 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.
|
|
35
|
+
* @param - Requested product ID.
|
|
36
|
+
* @param - Array containing the selected options. For example, `["color": "Blue", "size": "Large"]`.
|
|
37
|
+
*/
|
|
38
|
+
(_id: string, options: Record<string, string>): Promise<NonNullablePaths<ProductOptionsAvailabilityResponse, `selectedVariant.price.currency` | `selectedVariant.price.discountedPrice` | `selectedVariant.price.formatted.price` | `selectedVariant.price.formatted.discountedPrice` | `selectedVariant.sku` | `selectedVariant.inStock` | `selectedVariant.visible` | `media.mainMedia.image.url` | `media.mainMedia.image.width` | `media.mainMedia.image.height` | `media.mainMedia.video.files` | `media.mainMedia.video.stillFrameMediaId` | `media.mainMedia.mediaType` | `media.mainMedia.title` | `media.mainMedia._id` | `media.items` | `productOptions` | `productOptions.${number}.optionType` | `productOptions.${number}.name` | `availableForPurchase`>>;
|
|
39
|
+
}
|
|
40
|
+
declare function queryProductVariants$1(httpClient: HttpClient): QueryProductVariantsSignature;
|
|
41
|
+
interface QueryProductVariantsSignature {
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves product variants, based on either choices (option-choice key-value pairs) or variant IDs.
|
|
44
|
+
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
45
|
+
* @param - Requested product ID.
|
|
46
|
+
*/
|
|
47
|
+
(_id: string, options?: QueryProductVariantsOptions): Promise<NonNullablePaths<QueryProductVariantsResponse, `variants` | `variants.${number}._id` | `variants.${number}.variant.priceData.currency` | `variants.${number}.variant.priceData.discountedPrice` | `variants.${number}.variant.priceData.formatted.price` | `variants.${number}.variant.priceData.formatted.discountedPrice` | `variants.${number}.variant.costAndProfitData.formattedItemCost` | `variants.${number}.variant.costAndProfitData.profit` | `variants.${number}.variant.costAndProfitData.formattedProfit` | `variants.${number}.variant.costAndProfitData.profitMargin` | `variants.${number}.variant.weight` | `variants.${number}.variant.sku` | `variants.${number}.variant.visible` | `variants.${number}.stock.trackQuantity` | `variants.${number}.stock.inStock` | `metadata.items` | `metadata.offset` | `totalResults`>>;
|
|
48
|
+
}
|
|
49
|
+
declare function queryStoreVariants$1(httpClient: HttpClient): QueryStoreVariantsSignature;
|
|
50
|
+
interface QueryStoreVariantsSignature {
|
|
51
|
+
/**
|
|
52
|
+
* Retrieves up to 100 store variants, given the provided paging, filtering, and sorting.
|
|
53
|
+
* @param - Query options.
|
|
54
|
+
*/
|
|
55
|
+
(query: PlatformQuery): Promise<NonNullablePaths<QueryStoreVariantsResponse, `variants` | `variants.${number}._id` | `variants.${number}.variantId` | `variants.${number}.productId` | `variants.${number}.variantName` | `variants.${number}.productName` | `variants.${number}.managedVariant` | `variants.${number}.sku` | `variants.${number}.stock.trackQuantity` | `variants.${number}.stock.inStock` | `variants.${number}.preorderInfo.enabled`>>;
|
|
56
|
+
}
|
|
57
|
+
declare function getStoreVariant$1(httpClient: HttpClient): GetStoreVariantSignature;
|
|
58
|
+
interface GetStoreVariantSignature {
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves a store variant with the provided ID.
|
|
61
|
+
* @param - Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`.
|
|
62
|
+
*/
|
|
63
|
+
(_id: string): Promise<NonNullablePaths<GetStoreVariantResponse, `variant._id` | `variant.variantId` | `variant.productId` | `variant.variantName` | `variant.productName` | `variant.managedVariant` | `variant.sku` | `variant.stock.trackQuantity` | `variant.stock.inStock` | `variant.collectionIds` | `variant.preorderInfo.enabled`>>;
|
|
64
|
+
}
|
|
6
65
|
declare function createProduct$1(httpClient: HttpClient): CreateProductSignature;
|
|
7
66
|
interface CreateProductSignature {
|
|
8
67
|
/**
|
|
@@ -181,65 +240,6 @@ interface BulkAdjustProductPropertySignature {
|
|
|
181
240
|
*/
|
|
182
241
|
(adjust: AdjustValue, ids: string[]): Promise<NonNullablePaths<BulkAdjustProductPropertiesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
183
242
|
}
|
|
184
|
-
declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
|
|
185
|
-
interface QueryProductsSignature {
|
|
186
|
-
/**
|
|
187
|
-
* Returns a list of up to 100 products, given the provided paging, sorting and filtering.
|
|
188
|
-
*/
|
|
189
|
-
(): ProductsQueryBuilder;
|
|
190
|
-
}
|
|
191
|
-
declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
|
|
192
|
-
interface GetProductSignature {
|
|
193
|
-
/**
|
|
194
|
-
* Retrieves a product with the provided ID.
|
|
195
|
-
* @param - Requested product ID.
|
|
196
|
-
*/
|
|
197
|
-
(_id: string, options?: GetProductOptions): Promise<NonNullablePaths<GetProductResponse, {
|
|
198
|
-
[P in ProductNonNullablePaths]: `product.${P}`;
|
|
199
|
-
}[ProductNonNullablePaths]>>;
|
|
200
|
-
}
|
|
201
|
-
declare function getCollectionBySlug$1(httpClient: HttpClient): GetCollectionBySlugSignature;
|
|
202
|
-
interface GetCollectionBySlugSignature {
|
|
203
|
-
/**
|
|
204
|
-
* Retrieves a collection with the provided slug.
|
|
205
|
-
* @param - Slug of the collection to retrieve.
|
|
206
|
-
*/
|
|
207
|
-
(slug: string): Promise<NonNullablePaths<GetCollectionBySlugResponse, `collection.media.mainMedia.image.url` | `collection.media.mainMedia.image.width` | `collection.media.mainMedia.image.height` | `collection.media.mainMedia.video.files` | `collection.media.mainMedia.video.stillFrameMediaId` | `collection.media.mainMedia.mediaType` | `collection.media.mainMedia.title` | `collection.media.mainMedia._id` | `collection.media.items` | `collection.numberOfProducts`>>;
|
|
208
|
-
}
|
|
209
|
-
declare function getProductOptionsAvailability$1(httpClient: HttpClient): GetProductOptionsAvailabilitySignature;
|
|
210
|
-
interface GetProductOptionsAvailabilitySignature {
|
|
211
|
-
/**
|
|
212
|
-
* 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.
|
|
213
|
-
* @param - Requested product ID.
|
|
214
|
-
* @param - Array containing the selected options. For example, `["color": "Blue", "size": "Large"]`.
|
|
215
|
-
*/
|
|
216
|
-
(_id: string, options: Record<string, string>): Promise<NonNullablePaths<ProductOptionsAvailabilityResponse, `selectedVariant.price.currency` | `selectedVariant.price.discountedPrice` | `selectedVariant.price.formatted.price` | `selectedVariant.price.formatted.discountedPrice` | `selectedVariant.sku` | `selectedVariant.inStock` | `selectedVariant.visible` | `media.mainMedia.image.url` | `media.mainMedia.image.width` | `media.mainMedia.image.height` | `media.mainMedia.video.files` | `media.mainMedia.video.stillFrameMediaId` | `media.mainMedia.mediaType` | `media.mainMedia.title` | `media.mainMedia._id` | `media.items` | `productOptions` | `productOptions.${number}.optionType` | `productOptions.${number}.name` | `availableForPurchase`>>;
|
|
217
|
-
}
|
|
218
|
-
declare function queryProductVariants$1(httpClient: HttpClient): QueryProductVariantsSignature;
|
|
219
|
-
interface QueryProductVariantsSignature {
|
|
220
|
-
/**
|
|
221
|
-
* Retrieves product variants, based on either choices (option-choice key-value pairs) or variant IDs.
|
|
222
|
-
* See [Stores Pagination](https://dev.wix.com/api/rest/wix-stores/pagination) for more information.
|
|
223
|
-
* @param - Requested product ID.
|
|
224
|
-
*/
|
|
225
|
-
(_id: string, options?: QueryProductVariantsOptions): Promise<NonNullablePaths<QueryProductVariantsResponse, `variants` | `variants.${number}._id` | `variants.${number}.variant.priceData.currency` | `variants.${number}.variant.priceData.discountedPrice` | `variants.${number}.variant.priceData.formatted.price` | `variants.${number}.variant.priceData.formatted.discountedPrice` | `variants.${number}.variant.costAndProfitData.formattedItemCost` | `variants.${number}.variant.costAndProfitData.profit` | `variants.${number}.variant.costAndProfitData.formattedProfit` | `variants.${number}.variant.costAndProfitData.profitMargin` | `variants.${number}.variant.weight` | `variants.${number}.variant.sku` | `variants.${number}.variant.visible` | `variants.${number}.stock.trackQuantity` | `variants.${number}.stock.inStock` | `metadata.items` | `metadata.offset` | `totalResults`>>;
|
|
226
|
-
}
|
|
227
|
-
declare function queryStoreVariants$1(httpClient: HttpClient): QueryStoreVariantsSignature;
|
|
228
|
-
interface QueryStoreVariantsSignature {
|
|
229
|
-
/**
|
|
230
|
-
* Retrieves up to 100 store variants, given the provided paging, filtering, and sorting.
|
|
231
|
-
* @param - Query options.
|
|
232
|
-
*/
|
|
233
|
-
(query: PlatformQuery): Promise<NonNullablePaths<QueryStoreVariantsResponse, `variants` | `variants.${number}._id` | `variants.${number}.variantId` | `variants.${number}.productId` | `variants.${number}.variantName` | `variants.${number}.productName` | `variants.${number}.managedVariant` | `variants.${number}.sku` | `variants.${number}.stock.trackQuantity` | `variants.${number}.stock.inStock` | `variants.${number}.preorderInfo.enabled`>>;
|
|
234
|
-
}
|
|
235
|
-
declare function getStoreVariant$1(httpClient: HttpClient): GetStoreVariantSignature;
|
|
236
|
-
interface GetStoreVariantSignature {
|
|
237
|
-
/**
|
|
238
|
-
* Retrieves a store variant with the provided ID.
|
|
239
|
-
* @param - Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen. For example, `{productId}-{variantId}`.
|
|
240
|
-
*/
|
|
241
|
-
(_id: string): Promise<NonNullablePaths<GetStoreVariantResponse, `variant._id` | `variant.variantId` | `variant.productId` | `variant.variantName` | `variant.productName` | `variant.managedVariant` | `variant.sku` | `variant.stock.trackQuantity` | `variant.stock.inStock` | `variant.collectionIds` | `variant.preorderInfo.enabled`>>;
|
|
242
|
-
}
|
|
243
243
|
declare const onProductCollectionChanged$1: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
|
|
244
244
|
declare const onProductCollectionCreated$1: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
|
|
245
245
|
declare const onProductCollectionDeleted$1: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
|
|
@@ -248,6 +248,13 @@ declare const onProductCreated$1: EventDefinition<ProductCreatedEnvelope, "com.w
|
|
|
248
248
|
declare const onProductDeleted$1: EventDefinition<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
|
|
249
249
|
declare const onProductVariantsChanged$1: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
|
|
250
250
|
|
|
251
|
+
declare const queryProducts: MaybeContext<BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1>;
|
|
252
|
+
declare const getProduct: MaybeContext<BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1>;
|
|
253
|
+
declare const getCollectionBySlug: MaybeContext<BuildRESTFunction<typeof getCollectionBySlug$1> & typeof getCollectionBySlug$1>;
|
|
254
|
+
declare const getProductOptionsAvailability: MaybeContext<BuildRESTFunction<typeof getProductOptionsAvailability$1> & typeof getProductOptionsAvailability$1>;
|
|
255
|
+
declare const queryProductVariants: MaybeContext<BuildRESTFunction<typeof queryProductVariants$1> & typeof queryProductVariants$1>;
|
|
256
|
+
declare const queryStoreVariants: MaybeContext<BuildRESTFunction<typeof queryStoreVariants$1> & typeof queryStoreVariants$1>;
|
|
257
|
+
declare const getStoreVariant: MaybeContext<BuildRESTFunction<typeof getStoreVariant$1> & typeof getStoreVariant$1>;
|
|
251
258
|
declare const createProduct: MaybeContext<BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1>;
|
|
252
259
|
declare const updateProduct: MaybeContext<BuildRESTFunction<typeof updateProduct$1> & typeof updateProduct$1>;
|
|
253
260
|
declare const deleteProduct: MaybeContext<BuildRESTFunction<typeof deleteProduct$1> & typeof deleteProduct$1>;
|
|
@@ -267,13 +274,6 @@ declare const deleteCollection: MaybeContext<BuildRESTFunction<typeof deleteColl
|
|
|
267
274
|
declare const removeRibbon: MaybeContext<BuildRESTFunction<typeof removeRibbon$1> & typeof removeRibbon$1>;
|
|
268
275
|
declare const bulkUpdateProductsProperty: MaybeContext<BuildRESTFunction<typeof bulkUpdateProductsProperty$1> & typeof bulkUpdateProductsProperty$1>;
|
|
269
276
|
declare const bulkAdjustProductProperty: MaybeContext<BuildRESTFunction<typeof bulkAdjustProductProperty$1> & typeof bulkAdjustProductProperty$1>;
|
|
270
|
-
declare const queryProducts: MaybeContext<BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1>;
|
|
271
|
-
declare const getProduct: MaybeContext<BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1>;
|
|
272
|
-
declare const getCollectionBySlug: MaybeContext<BuildRESTFunction<typeof getCollectionBySlug$1> & typeof getCollectionBySlug$1>;
|
|
273
|
-
declare const getProductOptionsAvailability: MaybeContext<BuildRESTFunction<typeof getProductOptionsAvailability$1> & typeof getProductOptionsAvailability$1>;
|
|
274
|
-
declare const queryProductVariants: MaybeContext<BuildRESTFunction<typeof queryProductVariants$1> & typeof queryProductVariants$1>;
|
|
275
|
-
declare const queryStoreVariants: MaybeContext<BuildRESTFunction<typeof queryStoreVariants$1> & typeof queryStoreVariants$1>;
|
|
276
|
-
declare const getStoreVariant: MaybeContext<BuildRESTFunction<typeof getStoreVariant$1> & typeof getStoreVariant$1>;
|
|
277
277
|
/**
|
|
278
278
|
* Triggered when a collection is changed.
|
|
279
279
|
*/
|