@wix/stores 1.0.6 → 1.0.7
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 +1 -1
- package/build/cjs/index.js +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/{stores-catalog-v1-product.public.d.ts → stores-catalog-v1-product-products.public.d.ts} +5 -24
- package/build/cjs/src/stores-catalog-v1-product-products.public.js +25 -0
- package/build/cjs/src/stores-catalog-v1-product-products.public.js.map +1 -0
- package/build/{es/src/stores-catalog-v1-product.universal.d.ts → cjs/src/stores-catalog-v1-product-products.universal.d.ts} +0 -333
- package/build/cjs/src/stores-catalog-v1-product-products.universal.js +215 -0
- package/build/cjs/src/stores-catalog-v1-product-products.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -1
- package/build/es/index.js +1 -1
- package/build/es/index.js.map +1 -1
- package/build/es/src/{stores-catalog-v1-product.public.d.ts → stores-catalog-v1-product-products.public.d.ts} +5 -24
- package/build/es/src/stores-catalog-v1-product-products.public.js +13 -0
- package/build/es/src/stores-catalog-v1-product-products.public.js.map +1 -0
- package/build/{cjs/src/stores-catalog-v1-product.universal.d.ts → es/src/stores-catalog-v1-product-products.universal.d.ts} +0 -333
- package/build/es/src/stores-catalog-v1-product-products.universal.js +191 -0
- package/build/es/src/stores-catalog-v1-product-products.universal.js.map +1 -0
- package/package.json +2 -2
- package/build/cjs/src/stores-catalog-v1-product.public.js +0 -139
- package/build/cjs/src/stores-catalog-v1-product.public.js.map +0 -1
- package/build/cjs/src/stores-catalog-v1-product.universal.js +0 -1155
- package/build/cjs/src/stores-catalog-v1-product.universal.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.public.js +0 -108
- package/build/es/src/stores-catalog-v1-product.public.js.map +0 -1
- package/build/es/src/stores-catalog-v1-product.universal.js +0 -1112
- package/build/es/src/stores-catalog-v1-product.universal.js.map +0 -1
package/build/es/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * as collections from './src/stores-catalog-v1-collection.public';
|
|
2
|
-
export * as products from './src/stores-catalog-v1-product.public';
|
|
2
|
+
export * as products from './src/stores-catalog-v1-product-products.public';
|
package/build/es/index.js
CHANGED
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,2CAA2C,CAAC;AACzE,OAAO,KAAK,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,2CAA2C,CAAC;AACzE,OAAO,KAAK,QAAQ,MAAM,iDAAiD,CAAC"}
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import {
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export declare function resetAllVariantData(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
8
|
-
export declare function addProductsToCollection(httpClient: HttpClient): (_id: string, options?: AddProductsToCollectionOptions | undefined) => Promise<void>;
|
|
9
|
-
export declare function removeProductsFromCollection(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
|
|
10
|
-
export declare function addProductMedia(httpClient: HttpClient): (_id: string, options?: AddProductMediaOptions | undefined) => Promise<void>;
|
|
11
|
-
export declare function removeProductMedia(httpClient: HttpClient): (_id: string, options?: RemoveProductMediaOptions | undefined) => Promise<void>;
|
|
12
|
-
export declare function addProductMediaToChoices(httpClient: HttpClient): (_id: string, options?: AddProductMediaToChoicesOptions | undefined) => Promise<void>;
|
|
13
|
-
export declare function removeProductMediaFromChoices(httpClient: HttpClient): (_id: string, options?: RemoveProductMediaFromChoicesOptions | undefined) => Promise<void>;
|
|
14
|
-
export declare function deleteProductOptions(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
15
|
-
export declare function removeBrand(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
16
|
-
export declare function createCollection(httpClient: HttpClient): (collection: Collection) => Promise<import("./stores-catalog-v1-product.universal").CreateCollectionResponse>;
|
|
17
|
-
export declare function updateCollection(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<import("./stores-catalog-v1-product.universal").UpdateCollectionResponse>;
|
|
18
|
-
export declare function deleteCollection(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
19
|
-
export declare function removeRibbon(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
20
|
-
export declare function bulkUpdateProducts(httpClient: HttpClient): (ids: string[], options?: BulkUpdateProductsOptions | undefined) => Promise<import("./stores-catalog-v1-product.universal").BulkUpdateProductsResponse>;
|
|
21
|
-
export declare function bulkAdjustProductProperties(httpClient: HttpClient): (ids: string[], options?: BulkAdjustProductPropertiesOptions | undefined) => Promise<import("./stores-catalog-v1-product.universal").BulkAdjustProductPropertiesResponse>;
|
|
22
|
-
export declare function queryProducts(httpClient: HttpClient): () => import("./stores-catalog-v1-product.universal").ProductsQueryBuilder;
|
|
23
|
-
export declare function getProduct(httpClient: HttpClient): (_id: string, options?: GetProductOptions | undefined) => Promise<import("./stores-catalog-v1-product.universal").GetProductResponse>;
|
|
24
|
-
export { ProductType, InventoryStatus, MeasurementUnit, MediaItemType, OptionType, DiscountType, SortOrder, } from './stores-catalog-v1-product.universal';
|
|
25
|
-
export { Product, NumericPropertyRange, Stock, PriceData, FormattedPrice, CostAndProfitData, PricePerUnitData, AdditionalInfoSection, Ribbon, Media, MediaItem, MediaItemItemOneOf, MediaItemUrlAndSize, MediaItemVideo, CustomTextField, ProductOption, Choice, PageUrl, Discount, Variant, VariantDataWithNoStock, VariantStock, SeoSchema, Tag, Settings, CreateProductRequest, CreateProductResponse, UpdateProductRequest, UpdateProductResponse, DeleteProductRequest, DeleteProductResponse, BulkDeleteProductsRequest, BulkDeleteProductsResponse, UpdateVariantsRequest, VariantOverride, UpdateVariantsResponse, ResetAllVariantDataRequest, ResetAllVariantDataResponse, AddProductsToCollectionRequest, AddProductsToCollectionResponse, RemoveProductsFromCollectionRequest, RemoveProductsFromCollectionResponse, AddProductMediaRequest, MediaDataForWrite, MediaDataForWriteMediaSourceOneOf, OptionAndChoice, AddProductMediaResponse, RemoveProductMediaRequest, RemoveProductMediaResponse, AddProductMediaToChoicesRequest, MediaAssignmentToChoice, AddProductMediaToChoicesResponse, RemoveProductMediaFromChoicesRequest, RemoveProductMediaFromChoicesResponse, DeleteProductOptionsRequest, DeleteProductOptionsResponse, SetCustomFieldsRequest, SetCustomFieldsResponse, RemoveCustomFieldsRequest, RemoveCustomFieldsResponse, RemoveProductBrandRequest, RemoveProductBrandResponse, BulkSetCustomFieldsRequest, BulkSetCustomFieldsResponse, BulkRemoveCustomFieldsRequest, BulkRemoveCustomFieldsResponse, CreateCollectionRequest, Collection, CreateCollectionResponse, UpdateCollectionRequest, UpdateCollectionResponse, DeleteCollectionRequest, DeleteCollectionResponse, RemoveProductRibbonRequest, RemoveProductRibbonResponse, BulkUpdateProductsRequest, SetValue, SetValueValueOneOf, BulkUpdateProductsResponse, BulkProductResult, ItemMetadata, ApplicationError, BulkActionMetadata, BulkUpdateProductsByFilterSyncRequest, BulkUpdateProductsByFilterSyncResponse, AllowedProductsCountLimitExceededErrorData, BulkAdjustProductPropertiesRequest, AdjustValue, AdjustValueValueOneOf, PropertyAdjustmentData, PropertyAdjustmentDataByOneOf, PercentageData, BulkAdjustProductPropertiesResponse, BulkAdjustProductPropertiesByFilterSyncRequest, BulkAdjustProductPropertiesByFilterSyncResponse, ProductCreated, ProductChanged, ProductDeleted, CollectionCreated, CollectionChanged, CollectionDeleted, VariantsChanged, VariantChanged, QueryProductsRequest, Query, Paging, QueryProductsResponse, PagingMetadata, QueryProductsPlatformizedRequest, PlatformQuery, PlatformQueryPagingMethodOneOf, Sorting, PlatformPaging, CursorPaging, QueryProductsPlatformizedResponse, PlatformPagingMetadata, Cursors, QueryProductsWithBigPageLimitRequest, QueryWithBigPageLimit, PagingWithBigLimit, GetProductsRequest, GetProductsResponse, GetProductRequest, GetProductResponse, QueryCollectionsRequest, QueryCollectionsResponse, QueryCollectionsPlatformizedRequest, QueryCollectionsPlatformizedResponse, GetCollectionRequest, GetCollectionResponse, GetCollectionBySlugRequest, GetCollectionBySlugResponse, ProductOptionsAvailabilityRequest, ProductOptionsAvailabilityResponse, VariantData, QueryProductVariantsRequest, QueryProductVariantsResponse, QueryStoreVariantsRequest, QueryStoreVariantsResponse, StoreVariant, PlatformMedia, PlatformMediaMediaOneOf, VideoResolution, PreorderInfo, QueryStoreVariantsWithBigLimitRequest, UnlimitedPlatformQuery, UnlimitedPlatformQueryPagingMethodOneOf, UnlimitedPlatformPaging, UnlimitedPlatformCursorPaging, GetStoreVariantRequest, GetStoreVariantResponse, QueryCustomFieldsRequest, QueryCustomFieldsResponse, BulkQueryCustomFieldsRequest, BulkQueryCustomFieldsResponse, CustomFieldsContainer, AggregateProductsRequest, AggregateProductsResponse, CreateProductOptions, UpdateProduct, UpdateVariantsOptions, AddProductsToCollectionOptions, AddProductMediaOptions, RemoveProductMediaOptions, AddProductMediaToChoicesOptions, RemoveProductMediaFromChoicesOptions, UpdateCollection, BulkUpdateProductsOptions, BulkAdjustProductPropertiesOptions, ProductsQueryResult, ProductsQueryBuilder, GetProductOptions, } from './stores-catalog-v1-product.universal';
|
|
2
|
+
import { GetProductOptions } from './stores-catalog-v1-product-products.universal';
|
|
3
|
+
export declare function queryProducts(httpClient: HttpClient): () => import("./stores-catalog-v1-product-products.universal").ProductsQueryBuilder;
|
|
4
|
+
export declare function getProduct(httpClient: HttpClient): (_id: string, options?: GetProductOptions | undefined) => Promise<import("./stores-catalog-v1-product-products.universal").GetProductResponse>;
|
|
5
|
+
export { ProductType, InventoryStatus, MeasurementUnit, MediaItemType, OptionType, DiscountType, SortOrder, } from './stores-catalog-v1-product-products.universal';
|
|
6
|
+
export { Product, NumericPropertyRange, Stock, PriceData, FormattedPrice, CostAndProfitData, PricePerUnitData, AdditionalInfoSection, Ribbon, Media, MediaItem, MediaItemItemOneOf, MediaItemUrlAndSize, MediaItemVideo, CustomTextField, ProductOption, Choice, PageUrl, Discount, Variant, VariantDataWithNoStock, VariantStock, SeoSchema, Tag, Settings, CreateProductRequest, CreateProductResponse, UpdateProductRequest, UpdateProductResponse, DeleteProductRequest, DeleteProductResponse, BulkDeleteProductsRequest, BulkDeleteProductsResponse, UpdateVariantsRequest, VariantOverride, UpdateVariantsResponse, ResetAllVariantDataRequest, ResetAllVariantDataResponse, AddProductsToCollectionRequest, AddProductsToCollectionResponse, RemoveProductsFromCollectionRequest, RemoveProductsFromCollectionResponse, AddProductMediaRequest, MediaDataForWrite, MediaDataForWriteMediaSourceOneOf, OptionAndChoice, AddProductMediaResponse, RemoveProductMediaRequest, RemoveProductMediaResponse, AddProductMediaToChoicesRequest, MediaAssignmentToChoice, AddProductMediaToChoicesResponse, RemoveProductMediaFromChoicesRequest, RemoveProductMediaFromChoicesResponse, DeleteProductOptionsRequest, DeleteProductOptionsResponse, SetCustomFieldsRequest, SetCustomFieldsResponse, RemoveCustomFieldsRequest, RemoveCustomFieldsResponse, RemoveProductBrandRequest, RemoveProductBrandResponse, BulkSetCustomFieldsRequest, BulkSetCustomFieldsResponse, BulkRemoveCustomFieldsRequest, BulkRemoveCustomFieldsResponse, CreateCollectionRequest, Collection, CreateCollectionResponse, UpdateCollectionRequest, UpdateCollectionResponse, DeleteCollectionRequest, DeleteCollectionResponse, RemoveProductRibbonRequest, RemoveProductRibbonResponse, BulkUpdateProductsRequest, SetValue, SetValueValueOneOf, BulkUpdateProductsResponse, BulkProductResult, ItemMetadata, ApplicationError, BulkActionMetadata, BulkUpdateProductsByFilterSyncRequest, BulkUpdateProductsByFilterSyncResponse, AllowedProductsCountLimitExceededErrorData, BulkAdjustProductPropertiesRequest, AdjustValue, AdjustValueValueOneOf, PropertyAdjustmentData, PropertyAdjustmentDataByOneOf, PercentageData, BulkAdjustProductPropertiesResponse, BulkAdjustProductPropertiesByFilterSyncRequest, BulkAdjustProductPropertiesByFilterSyncResponse, ProductCreated, ProductChanged, ProductDeleted, CollectionCreated, CollectionChanged, CollectionDeleted, VariantsChanged, VariantChanged, QueryProductsRequest, Query, Paging, QueryProductsResponse, PagingMetadata, QueryProductsPlatformizedRequest, PlatformQuery, PlatformQueryPagingMethodOneOf, Sorting, PlatformPaging, CursorPaging, QueryProductsPlatformizedResponse, PlatformPagingMetadata, Cursors, QueryProductsWithBigPageLimitRequest, QueryWithBigPageLimit, PagingWithBigLimit, GetProductsRequest, GetProductsResponse, GetProductRequest, GetProductResponse, QueryCollectionsRequest, QueryCollectionsResponse, QueryCollectionsPlatformizedRequest, QueryCollectionsPlatformizedResponse, GetCollectionRequest, GetCollectionResponse, GetCollectionBySlugRequest, GetCollectionBySlugResponse, ProductOptionsAvailabilityRequest, ProductOptionsAvailabilityResponse, VariantData, QueryProductVariantsRequest, QueryProductVariantsResponse, QueryStoreVariantsRequest, QueryStoreVariantsResponse, StoreVariant, PlatformMedia, PlatformMediaMediaOneOf, VideoResolution, PreorderInfo, QueryStoreVariantsWithBigLimitRequest, UnlimitedPlatformQuery, UnlimitedPlatformQueryPagingMethodOneOf, UnlimitedPlatformPaging, UnlimitedPlatformCursorPaging, GetStoreVariantRequest, GetStoreVariantResponse, QueryCustomFieldsRequest, QueryCustomFieldsResponse, BulkQueryCustomFieldsRequest, BulkQueryCustomFieldsResponse, CustomFieldsContainer, AggregateProductsRequest, AggregateProductsResponse, ProductsQueryResult, ProductsQueryBuilder, GetProductOptions, } from './stores-catalog-v1-product-products.universal';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { queryProducts as universalQueryProducts, getProduct as universalGetProduct, } from './stores-catalog-v1-product-products.universal';
|
|
2
|
+
export function queryProducts(httpClient) {
|
|
3
|
+
return () => universalQueryProducts(
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
{ httpClient });
|
|
6
|
+
}
|
|
7
|
+
export function getProduct(httpClient) {
|
|
8
|
+
return (_id, options) => universalGetProduct(_id, options,
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
{ httpClient });
|
|
11
|
+
}
|
|
12
|
+
export { ProductType, InventoryStatus, MeasurementUnit, MediaItemType, OptionType, DiscountType, SortOrder, } from './stores-catalog-v1-product-products.universal';
|
|
13
|
+
//# sourceMappingURL=stores-catalog-v1-product-products.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores-catalog-v1-product-products.public.js","sourceRoot":"","sources":["../../../src/stores-catalog-v1-product-products.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,IAAI,sBAAsB,EACvC,UAAU,IAAI,mBAAmB,GAElC,MAAM,gDAAgD,CAAC;AAExD,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,GAAG,EAAE,CACV,sBAAsB;IACpB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,GAAW,EAAE,OAA2B,EAAE,EAAE,CAClD,mBAAmB,CACjB,GAAG,EACH,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,WAAW,EACX,eAAe,EACf,eAAe,EACf,aAAa,EACb,UAAU,EACV,YAAY,EACZ,SAAS,GACV,MAAM,gDAAgD,CAAC"}
|
|
@@ -1338,339 +1338,6 @@ export interface AggregateProductsRequest {
|
|
|
1338
1338
|
export interface AggregateProductsResponse {
|
|
1339
1339
|
aggregates?: Record<string, any> | null;
|
|
1340
1340
|
}
|
|
1341
|
-
/**
|
|
1342
|
-
* Creates a new product.
|
|
1343
|
-
* @public
|
|
1344
|
-
* @requiredField options.product.costAndProfitData.itemCost
|
|
1345
|
-
* @requiredField options.product.name
|
|
1346
|
-
* @requiredField options.product.priceData
|
|
1347
|
-
* @requiredField options.product.priceData.price
|
|
1348
|
-
*/
|
|
1349
|
-
export declare function createProduct(options?: CreateProductOptions): Promise<CreateProductResponse>;
|
|
1350
|
-
export interface CreateProductOptions {
|
|
1351
|
-
/** Product information. */
|
|
1352
|
-
product?: Product;
|
|
1353
|
-
}
|
|
1354
|
-
/**
|
|
1355
|
-
* Updates specified fields in a product.
|
|
1356
|
-
* @param _id - Product ID (generated automatically by the catalog).
|
|
1357
|
-
* @public
|
|
1358
|
-
* @requiredField _id
|
|
1359
|
-
* @requiredField product
|
|
1360
|
-
*/
|
|
1361
|
-
export declare function updateProduct(_id: string, product: UpdateProduct): Promise<UpdateProductResponse>;
|
|
1362
|
-
export interface UpdateProduct {
|
|
1363
|
-
/**
|
|
1364
|
-
* Product ID (generated automatically by the catalog).
|
|
1365
|
-
* @readonly
|
|
1366
|
-
*/
|
|
1367
|
-
_id?: string;
|
|
1368
|
-
/** Product name. */
|
|
1369
|
-
name?: string | null;
|
|
1370
|
-
/** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
|
|
1371
|
-
slug?: string;
|
|
1372
|
-
/** Whether the product is visible to site visitors. */
|
|
1373
|
-
visible?: boolean | null;
|
|
1374
|
-
/** Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. */
|
|
1375
|
-
productType?: ProductType;
|
|
1376
|
-
/** Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). */
|
|
1377
|
-
description?: string | null;
|
|
1378
|
-
/** Stock keeping unit (if variant management is enabled, SKUs will be set per variant, and this field will be empty). */
|
|
1379
|
-
sku?: string | null;
|
|
1380
|
-
/** Product weight (if variant management is enabled, weight will be set per variant, and this field will be empty). */
|
|
1381
|
-
weight?: number | null;
|
|
1382
|
-
/**
|
|
1383
|
-
* Product weight range. The minimum and maximum weights of all the variants.
|
|
1384
|
-
* @readonly
|
|
1385
|
-
*/
|
|
1386
|
-
weightRange?: NumericPropertyRange;
|
|
1387
|
-
/**
|
|
1388
|
-
* Product inventory status (in future this will be writable via Inventory API).
|
|
1389
|
-
* @readonly
|
|
1390
|
-
*/
|
|
1391
|
-
stock?: Stock;
|
|
1392
|
-
/**
|
|
1393
|
-
* Deprecated (use `priceData` instead).
|
|
1394
|
-
* @readonly
|
|
1395
|
-
*/
|
|
1396
|
-
price?: PriceData;
|
|
1397
|
-
/** Price data. */
|
|
1398
|
-
priceData?: PriceData;
|
|
1399
|
-
/**
|
|
1400
|
-
* Price data, converted to the currency specified in request header.
|
|
1401
|
-
* @readonly
|
|
1402
|
-
*/
|
|
1403
|
-
convertedPriceData?: PriceData;
|
|
1404
|
-
/**
|
|
1405
|
-
* Product price range. The minimum and maximum prices of all the variants.
|
|
1406
|
-
* @readonly
|
|
1407
|
-
*/
|
|
1408
|
-
priceRange?: NumericPropertyRange;
|
|
1409
|
-
/** Cost and profit data. */
|
|
1410
|
-
costAndProfitData?: CostAndProfitData;
|
|
1411
|
-
/**
|
|
1412
|
-
* Product cost range. The minimum and maximum costs of all the variants.
|
|
1413
|
-
* @readonly
|
|
1414
|
-
*/
|
|
1415
|
-
costRange?: NumericPropertyRange;
|
|
1416
|
-
/** Price per unit data. */
|
|
1417
|
-
pricePerUnitData?: PricePerUnitData;
|
|
1418
|
-
/**
|
|
1419
|
-
* Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). Currently writable only from the UI.
|
|
1420
|
-
* @readonly
|
|
1421
|
-
*/
|
|
1422
|
-
additionalInfoSections?: AdditionalInfoSection[];
|
|
1423
|
-
/**
|
|
1424
|
-
* Deprecated (use `ribbon` instead).
|
|
1425
|
-
* @readonly
|
|
1426
|
-
*/
|
|
1427
|
-
ribbons?: Ribbon[];
|
|
1428
|
-
/**
|
|
1429
|
-
* Media items (images, videos etc) associated with this product (writable via [Add Product Media](https://dev.wix.com/api/rest/wix-stores/catalog/products/add-product-media) endpoint).
|
|
1430
|
-
* @readonly
|
|
1431
|
-
*/
|
|
1432
|
-
media?: Media;
|
|
1433
|
-
/**
|
|
1434
|
-
* Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
|
|
1435
|
-
* @readonly
|
|
1436
|
-
*/
|
|
1437
|
-
customTextFields?: CustomTextField[];
|
|
1438
|
-
/** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. */
|
|
1439
|
-
manageVariants?: boolean | null;
|
|
1440
|
-
/** Options (color, size, etc) for this product. */
|
|
1441
|
-
productOptions?: ProductOption[];
|
|
1442
|
-
/**
|
|
1443
|
-
* Product page URL for this product (generated automatically by the server).
|
|
1444
|
-
* @readonly
|
|
1445
|
-
*/
|
|
1446
|
-
productPageUrl?: PageUrl;
|
|
1447
|
-
/**
|
|
1448
|
-
* Product’s unique numeric ID (assigned in ascending order).
|
|
1449
|
-
* Primarily used for sorting and filtering when crawling all products.
|
|
1450
|
-
* @readonly
|
|
1451
|
-
*/
|
|
1452
|
-
numericId?: string;
|
|
1453
|
-
/**
|
|
1454
|
-
* Inventory item ID - ID referencing the inventory system.
|
|
1455
|
-
* @readonly
|
|
1456
|
-
*/
|
|
1457
|
-
inventoryItemId?: string;
|
|
1458
|
-
/** Discount deducted from the product's original price. */
|
|
1459
|
-
discount?: Discount;
|
|
1460
|
-
/**
|
|
1461
|
-
* A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
|
|
1462
|
-
* @readonly
|
|
1463
|
-
*/
|
|
1464
|
-
collectionIds?: string[];
|
|
1465
|
-
/**
|
|
1466
|
-
* Product variants, will be provided if the the request was sent with the includeVariants flag.
|
|
1467
|
-
* @readonly
|
|
1468
|
-
*/
|
|
1469
|
-
variants?: Variant[];
|
|
1470
|
-
/**
|
|
1471
|
-
* Date and time the product was last updated.
|
|
1472
|
-
* @readonly
|
|
1473
|
-
*/
|
|
1474
|
-
lastUpdated?: Date;
|
|
1475
|
-
/**
|
|
1476
|
-
* Date and time the product was created.
|
|
1477
|
-
* @readonly
|
|
1478
|
-
*/
|
|
1479
|
-
_createdDate?: Date;
|
|
1480
|
-
/** Custom SEO data for the product. */
|
|
1481
|
-
seoData?: SeoSchema;
|
|
1482
|
-
/** Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". */
|
|
1483
|
-
ribbon?: string | null;
|
|
1484
|
-
/** Product brand. Including a brand name can help improve site and product [visibility on search engines](https://support.wix.com/en/article/adding-brand-names-to-boost-product-page-seo-in-wix-stores). */
|
|
1485
|
-
brand?: string | null;
|
|
1486
|
-
}
|
|
1487
|
-
/**
|
|
1488
|
-
* Deletes a product.
|
|
1489
|
-
* @param _id - ID of the product to be deleted.
|
|
1490
|
-
* @public
|
|
1491
|
-
* @requiredField _id
|
|
1492
|
-
*/
|
|
1493
|
-
export declare function deleteProduct(_id: string): Promise<void>;
|
|
1494
|
-
/**
|
|
1495
|
-
* Updates variants of a specified product.
|
|
1496
|
-
* @param _id - ID of the product with managed variants.
|
|
1497
|
-
* @public
|
|
1498
|
-
* @requiredField _id
|
|
1499
|
-
*/
|
|
1500
|
-
export declare function updateVariants(_id: string, options?: UpdateVariantsOptions): Promise<UpdateVariantsResponse>;
|
|
1501
|
-
export interface UpdateVariantsOptions {
|
|
1502
|
-
variants?: VariantOverride[];
|
|
1503
|
-
}
|
|
1504
|
-
/**
|
|
1505
|
-
* Resets all variant information to default values (price = current product price; weight = current product weight; SKU = current product SKU; visibility = true).
|
|
1506
|
-
* @param _id - Product ID.
|
|
1507
|
-
* @public
|
|
1508
|
-
* @requiredField _id
|
|
1509
|
-
*/
|
|
1510
|
-
export declare function resetAllVariantData(_id: string): Promise<void>;
|
|
1511
|
-
/**
|
|
1512
|
-
* Adds products to a specified collection.
|
|
1513
|
-
* @param _id - Collection ID.
|
|
1514
|
-
* @public
|
|
1515
|
-
* @requiredField _id
|
|
1516
|
-
*/
|
|
1517
|
-
export declare function addProductsToCollection(_id: string, options?: AddProductsToCollectionOptions): Promise<void>;
|
|
1518
|
-
export interface AddProductsToCollectionOptions {
|
|
1519
|
-
/** IDs of the products to add to the collection. */
|
|
1520
|
-
productIds?: string[];
|
|
1521
|
-
}
|
|
1522
|
-
/**
|
|
1523
|
-
* Deletes products from a specified collection.
|
|
1524
|
-
* @param _id - Collection ID.
|
|
1525
|
-
* @param productIds - IDs of the products that will be deleted from the collection.
|
|
1526
|
-
* @public
|
|
1527
|
-
* @requiredField _id
|
|
1528
|
-
* @requiredField productIds
|
|
1529
|
-
*/
|
|
1530
|
-
export declare function removeProductsFromCollection(_id: string, productIds: string[]): Promise<void>;
|
|
1531
|
-
/**
|
|
1532
|
-
* Adds media items to a specified product, either via URL or existing media ID.
|
|
1533
|
-
* @param _id - Product ID.
|
|
1534
|
-
* @public
|
|
1535
|
-
* @requiredField _id
|
|
1536
|
-
*/
|
|
1537
|
-
export declare function addProductMedia(_id: string, options?: AddProductMediaOptions): Promise<void>;
|
|
1538
|
-
export interface AddProductMediaOptions {
|
|
1539
|
-
media?: MediaDataForWrite[];
|
|
1540
|
-
}
|
|
1541
|
-
/**
|
|
1542
|
-
* Removes specified media items from a product.
|
|
1543
|
-
* Pass an empty array to remove all media items.
|
|
1544
|
-
* @param _id - Product ID.
|
|
1545
|
-
* @public
|
|
1546
|
-
* @requiredField _id
|
|
1547
|
-
*/
|
|
1548
|
-
export declare function removeProductMedia(_id: string, options?: RemoveProductMediaOptions): Promise<void>;
|
|
1549
|
-
export interface RemoveProductMediaOptions {
|
|
1550
|
-
/** List of media IDs to remove. Pass an empty array to delete all media items for the product. */
|
|
1551
|
-
mediaIds?: string[];
|
|
1552
|
-
}
|
|
1553
|
-
/**
|
|
1554
|
-
* Links media items that are already associated with a specific product to a choice within the same product.
|
|
1555
|
-
*
|
|
1556
|
-
* 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).
|
|
1557
|
-
*
|
|
1558
|
-
* 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.
|
|
1559
|
-
* @param _id - Product ID.
|
|
1560
|
-
* @public
|
|
1561
|
-
* @requiredField _id
|
|
1562
|
-
* @requiredField options.media.choice
|
|
1563
|
-
* @requiredField options.media.option
|
|
1564
|
-
*/
|
|
1565
|
-
export declare function addProductMediaToChoices(_id: string, options?: AddProductMediaToChoicesOptions): Promise<void>;
|
|
1566
|
-
export interface AddProductMediaToChoicesOptions {
|
|
1567
|
-
media?: MediaAssignmentToChoice[];
|
|
1568
|
-
}
|
|
1569
|
-
/**
|
|
1570
|
-
* Removes media items from all or some of a product's choices.
|
|
1571
|
-
* (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).)
|
|
1572
|
-
* @param _id - Product ID.
|
|
1573
|
-
* @public
|
|
1574
|
-
* @requiredField _id
|
|
1575
|
-
*/
|
|
1576
|
-
export declare function removeProductMediaFromChoices(_id: string, options?: RemoveProductMediaFromChoicesOptions): Promise<void>;
|
|
1577
|
-
export interface RemoveProductMediaFromChoicesOptions {
|
|
1578
|
-
/** Optional - if an empty array is passed, all media will be removed from all choices. */
|
|
1579
|
-
media?: MediaAssignmentToChoice[];
|
|
1580
|
-
}
|
|
1581
|
-
/**
|
|
1582
|
-
* Delete all options from a specific product (only available when variant management is disabled).
|
|
1583
|
-
* @param _id - Product ID.
|
|
1584
|
-
* @public
|
|
1585
|
-
* @requiredField _id
|
|
1586
|
-
*/
|
|
1587
|
-
export declare function deleteProductOptions(_id: string): Promise<void>;
|
|
1588
|
-
/**
|
|
1589
|
-
* Deletes a product's brand.
|
|
1590
|
-
* @param _id - Product ID.
|
|
1591
|
-
* @public
|
|
1592
|
-
* @requiredField _id
|
|
1593
|
-
*/
|
|
1594
|
-
export declare function removeBrand(_id: string): Promise<void>;
|
|
1595
|
-
/**
|
|
1596
|
-
* Creates a new collection.
|
|
1597
|
-
* @param collection - Collection information.
|
|
1598
|
-
* @public
|
|
1599
|
-
* @requiredField collection
|
|
1600
|
-
* @requiredField collection.name
|
|
1601
|
-
*/
|
|
1602
|
-
export declare function createCollection(collection: Collection): Promise<CreateCollectionResponse>;
|
|
1603
|
-
/**
|
|
1604
|
-
* Updates specified properties of a collection.
|
|
1605
|
-
* 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.
|
|
1606
|
-
* @param _id - Collection ID (generated automatically by the catalog)
|
|
1607
|
-
* @public
|
|
1608
|
-
* @requiredField _id
|
|
1609
|
-
* @requiredField collection
|
|
1610
|
-
*/
|
|
1611
|
-
export declare function updateCollection(_id: string | null, collection: UpdateCollection): Promise<UpdateCollectionResponse>;
|
|
1612
|
-
export interface UpdateCollection {
|
|
1613
|
-
/**
|
|
1614
|
-
* Collection ID (generated automatically by the catalog)
|
|
1615
|
-
* @readonly
|
|
1616
|
-
*/
|
|
1617
|
-
_id?: string | null;
|
|
1618
|
-
/** Collection name */
|
|
1619
|
-
name?: string | null;
|
|
1620
|
-
/**
|
|
1621
|
-
* Media items (images, videos etc) associated with this collection. Read only.
|
|
1622
|
-
* @readonly
|
|
1623
|
-
*/
|
|
1624
|
-
media?: Media;
|
|
1625
|
-
/**
|
|
1626
|
-
* Number of products in the collection. Read only.
|
|
1627
|
-
* @readonly
|
|
1628
|
-
*/
|
|
1629
|
-
numberOfProducts?: number;
|
|
1630
|
-
/** Collection description. The description length without HTML must not exceed 2000 characters (10K includes HTML) */
|
|
1631
|
-
description?: string | null;
|
|
1632
|
-
/** Collection slug */
|
|
1633
|
-
slug?: string | null;
|
|
1634
|
-
/** Collection visibility. Only impacts dynamic pages, no impact on static pages */
|
|
1635
|
-
visible?: boolean | null;
|
|
1636
|
-
}
|
|
1637
|
-
/**
|
|
1638
|
-
* Deletes a collection.
|
|
1639
|
-
* @param _id - Collection ID.
|
|
1640
|
-
* @public
|
|
1641
|
-
* @requiredField _id
|
|
1642
|
-
*/
|
|
1643
|
-
export declare function deleteCollection(_id: string): Promise<void>;
|
|
1644
|
-
/**
|
|
1645
|
-
* Deletes a product's ribbon.
|
|
1646
|
-
* @param _id - Product ID.
|
|
1647
|
-
* @public
|
|
1648
|
-
* @requiredField _id
|
|
1649
|
-
*/
|
|
1650
|
-
export declare function removeRibbon(_id: string): Promise<void>;
|
|
1651
|
-
/**
|
|
1652
|
-
* Updates a specified property for up to 100 products at a time.
|
|
1653
|
-
* @param ids - Product IDs.
|
|
1654
|
-
* @public
|
|
1655
|
-
* @requiredField ids
|
|
1656
|
-
*/
|
|
1657
|
-
export declare function bulkUpdateProducts(ids: string[], options?: BulkUpdateProductsOptions): Promise<BulkUpdateProductsResponse>;
|
|
1658
|
-
export interface BulkUpdateProductsOptions {
|
|
1659
|
-
/** Field to update. */
|
|
1660
|
-
set?: SetValue;
|
|
1661
|
-
}
|
|
1662
|
-
/**
|
|
1663
|
-
* Adjusts a specified numerical property for up to 100 products at a time.
|
|
1664
|
-
* The property can be increased or decreased either by percentage or amount.
|
|
1665
|
-
* @param ids - Product IDs.
|
|
1666
|
-
* @public
|
|
1667
|
-
* @requiredField ids
|
|
1668
|
-
*/
|
|
1669
|
-
export declare function bulkAdjustProductProperties(ids: string[], options?: BulkAdjustProductPropertiesOptions): Promise<BulkAdjustProductPropertiesResponse>;
|
|
1670
|
-
export interface BulkAdjustProductPropertiesOptions {
|
|
1671
|
-
/** Numerical property to adjust. */
|
|
1672
|
-
adjust?: AdjustValue;
|
|
1673
|
-
}
|
|
1674
1341
|
/**
|
|
1675
1342
|
* Returns a list of up to 100 products, given the provided paging, sorting and filtering.
|
|
1676
1343
|
* @public */
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { serializer, transformError, resolveQueryFieldsTransformationPaths, } from '@wix/metro-runtime/velo';
|
|
11
|
+
import * as ambassadorWixStoresCatalogV1Product from './stores-catalog-v1-product.http';
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
import { wrapWithQueryBuilder } from '@wix/motion-edm-autogen-query-wrapper';
|
|
14
|
+
let __verbose = false;
|
|
15
|
+
function __log(...args) {
|
|
16
|
+
__verbose && console.log(...args);
|
|
17
|
+
}
|
|
18
|
+
function __inspect(obj) {
|
|
19
|
+
return obj;
|
|
20
|
+
}
|
|
21
|
+
export const __debug = {
|
|
22
|
+
verboseLogging: {
|
|
23
|
+
on: () => (__verbose = true),
|
|
24
|
+
off: () => (__verbose = false),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const _toVeloEntity = '$';
|
|
28
|
+
const _fromVeloEntity = '$';
|
|
29
|
+
export var ProductType;
|
|
30
|
+
(function (ProductType) {
|
|
31
|
+
ProductType["unspecified_product_type"] = "unspecified_product_type";
|
|
32
|
+
ProductType["physical"] = "physical";
|
|
33
|
+
ProductType["digital"] = "digital";
|
|
34
|
+
})(ProductType || (ProductType = {}));
|
|
35
|
+
export var InventoryStatus;
|
|
36
|
+
(function (InventoryStatus) {
|
|
37
|
+
InventoryStatus["IN_STOCK"] = "IN_STOCK";
|
|
38
|
+
InventoryStatus["OUT_OF_STOCK"] = "OUT_OF_STOCK";
|
|
39
|
+
InventoryStatus["PARTIALLY_OUT_OF_STOCK"] = "PARTIALLY_OUT_OF_STOCK";
|
|
40
|
+
})(InventoryStatus || (InventoryStatus = {}));
|
|
41
|
+
export var MeasurementUnit;
|
|
42
|
+
(function (MeasurementUnit) {
|
|
43
|
+
MeasurementUnit["UNSPECIFIED"] = "UNSPECIFIED";
|
|
44
|
+
MeasurementUnit["ML"] = "ML";
|
|
45
|
+
MeasurementUnit["CL"] = "CL";
|
|
46
|
+
MeasurementUnit["L"] = "L";
|
|
47
|
+
MeasurementUnit["CBM"] = "CBM";
|
|
48
|
+
MeasurementUnit["MG"] = "MG";
|
|
49
|
+
MeasurementUnit["G"] = "G";
|
|
50
|
+
MeasurementUnit["KG"] = "KG";
|
|
51
|
+
MeasurementUnit["MM"] = "MM";
|
|
52
|
+
MeasurementUnit["CM"] = "CM";
|
|
53
|
+
MeasurementUnit["M"] = "M";
|
|
54
|
+
MeasurementUnit["SQM"] = "SQM";
|
|
55
|
+
MeasurementUnit["OZ"] = "OZ";
|
|
56
|
+
MeasurementUnit["LB"] = "LB";
|
|
57
|
+
MeasurementUnit["FLOZ"] = "FLOZ";
|
|
58
|
+
MeasurementUnit["PT"] = "PT";
|
|
59
|
+
MeasurementUnit["QT"] = "QT";
|
|
60
|
+
MeasurementUnit["GAL"] = "GAL";
|
|
61
|
+
MeasurementUnit["IN"] = "IN";
|
|
62
|
+
MeasurementUnit["FT"] = "FT";
|
|
63
|
+
MeasurementUnit["YD"] = "YD";
|
|
64
|
+
MeasurementUnit["SQFT"] = "SQFT";
|
|
65
|
+
})(MeasurementUnit || (MeasurementUnit = {}));
|
|
66
|
+
export var MediaItemType;
|
|
67
|
+
(function (MediaItemType) {
|
|
68
|
+
MediaItemType["unspecified_media_item_type"] = "unspecified_media_item_type";
|
|
69
|
+
MediaItemType["image"] = "image";
|
|
70
|
+
MediaItemType["video"] = "video";
|
|
71
|
+
MediaItemType["audio"] = "audio";
|
|
72
|
+
MediaItemType["document"] = "document";
|
|
73
|
+
MediaItemType["zip"] = "zip";
|
|
74
|
+
})(MediaItemType || (MediaItemType = {}));
|
|
75
|
+
export var OptionType;
|
|
76
|
+
(function (OptionType) {
|
|
77
|
+
OptionType["unspecified_option_type"] = "unspecified_option_type";
|
|
78
|
+
OptionType["drop_down"] = "drop_down";
|
|
79
|
+
OptionType["color"] = "color";
|
|
80
|
+
})(OptionType || (OptionType = {}));
|
|
81
|
+
export var DiscountType;
|
|
82
|
+
(function (DiscountType) {
|
|
83
|
+
DiscountType["UNDEFINED"] = "UNDEFINED";
|
|
84
|
+
/** No discount */
|
|
85
|
+
DiscountType["NONE"] = "NONE";
|
|
86
|
+
DiscountType["AMOUNT"] = "AMOUNT";
|
|
87
|
+
DiscountType["PERCENT"] = "PERCENT";
|
|
88
|
+
})(DiscountType || (DiscountType = {}));
|
|
89
|
+
export var SortOrder;
|
|
90
|
+
(function (SortOrder) {
|
|
91
|
+
SortOrder["ASC"] = "ASC";
|
|
92
|
+
SortOrder["DESC"] = "DESC";
|
|
93
|
+
})(SortOrder || (SortOrder = {}));
|
|
94
|
+
const _getProductRequest = {};
|
|
95
|
+
const _getProductResponse = {};
|
|
96
|
+
const _queryProductsPlatformizedRequest = {};
|
|
97
|
+
const _queryProductsPlatformizedResponse = {};
|
|
98
|
+
/**
|
|
99
|
+
* Returns a list of up to 100 products, given the provided paging, sorting and filtering.
|
|
100
|
+
* @public */
|
|
101
|
+
export function queryProducts() {
|
|
102
|
+
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
103
|
+
const responseTransformation = {
|
|
104
|
+
items: '$.products',
|
|
105
|
+
pagingMetadata: '$.metadata',
|
|
106
|
+
};
|
|
107
|
+
// @ts-ignore
|
|
108
|
+
const httpClient = arguments[0].httpClient;
|
|
109
|
+
const { toAmbassadorRequest } = serializer({
|
|
110
|
+
rootSchema: _queryProductsPlatformizedRequest,
|
|
111
|
+
depSchemas: {},
|
|
112
|
+
fqdnTransformation: {
|
|
113
|
+
paths: [],
|
|
114
|
+
transformation: _fromVeloEntity,
|
|
115
|
+
},
|
|
116
|
+
customTransformation: requestTransformation,
|
|
117
|
+
});
|
|
118
|
+
const { fromJSON } = serializer({
|
|
119
|
+
rootSchema: _queryProductsPlatformizedResponse,
|
|
120
|
+
depSchemas: {},
|
|
121
|
+
fqdnTransformation: {
|
|
122
|
+
paths: [...['Array#products']],
|
|
123
|
+
transformation: _toVeloEntity,
|
|
124
|
+
},
|
|
125
|
+
customTransformation: responseTransformation,
|
|
126
|
+
});
|
|
127
|
+
return wrapWithQueryBuilder({
|
|
128
|
+
func: (payload) => {
|
|
129
|
+
const reqOpts = ambassadorWixStoresCatalogV1Product.queryProductsPlatformized(payload);
|
|
130
|
+
return httpClient.request(reqOpts);
|
|
131
|
+
},
|
|
132
|
+
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
133
|
+
responseTransformer: ({ data }) => fromJSON(data),
|
|
134
|
+
errorTransformer: (err) => {
|
|
135
|
+
const transformedError = transformError(err, requestTransformation);
|
|
136
|
+
throw transformedError;
|
|
137
|
+
},
|
|
138
|
+
pagingMethod: 'CURSOR',
|
|
139
|
+
transformationPaths: resolveQueryFieldsTransformationPaths(_toVeloEntity),
|
|
140
|
+
})({ cursorWithEmptyFilterAndSort: true });
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Retrieves a product with the provided ID.
|
|
144
|
+
* @param _id - Requested product ID.
|
|
145
|
+
* @public
|
|
146
|
+
* @requiredField _id
|
|
147
|
+
*/
|
|
148
|
+
export function getProduct(_id, options) {
|
|
149
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
150
|
+
const requestTransformation = {
|
|
151
|
+
id: '$[0]',
|
|
152
|
+
includeMerchantSpecificData: '$[1].includeMerchantSpecificData',
|
|
153
|
+
};
|
|
154
|
+
const responseTransformation = '$';
|
|
155
|
+
// @ts-ignore
|
|
156
|
+
const httpClient = arguments[2].httpClient;
|
|
157
|
+
const { toAmbassadorRequest } = serializer({
|
|
158
|
+
rootSchema: _getProductRequest,
|
|
159
|
+
depSchemas: {},
|
|
160
|
+
fqdnTransformation: {
|
|
161
|
+
paths: [],
|
|
162
|
+
transformation: _fromVeloEntity,
|
|
163
|
+
},
|
|
164
|
+
customTransformation: requestTransformation,
|
|
165
|
+
});
|
|
166
|
+
const { fromJSON } = serializer({
|
|
167
|
+
rootSchema: _getProductResponse,
|
|
168
|
+
depSchemas: {},
|
|
169
|
+
fqdnTransformation: {
|
|
170
|
+
paths: [...['product']],
|
|
171
|
+
transformation: _toVeloEntity,
|
|
172
|
+
},
|
|
173
|
+
customTransformation: responseTransformation,
|
|
174
|
+
});
|
|
175
|
+
const payload = toAmbassadorRequest([_id, options]);
|
|
176
|
+
const reqOpts = ambassadorWixStoresCatalogV1Product.getProduct(payload);
|
|
177
|
+
__log(`"GetProduct" sending request with: ${__inspect(reqOpts)}`);
|
|
178
|
+
try {
|
|
179
|
+
const { data } = yield httpClient.request(reqOpts);
|
|
180
|
+
return fromJSON(data);
|
|
181
|
+
}
|
|
182
|
+
catch (err) {
|
|
183
|
+
const transformedError = transformError(err, requestTransformation, [
|
|
184
|
+
'_id',
|
|
185
|
+
'options',
|
|
186
|
+
]);
|
|
187
|
+
throw transformedError;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=stores-catalog-v1-product-products.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores-catalog-v1-product-products.universal.js","sourceRoot":"","sources":["../../../src/stores-catalog-v1-product-products.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,mCAAmC,MAAM,kCAAkC,CAAC;AACxF,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,OA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AAmB,EAAE,GAAG,UAAU,CAAC;YACzC,UAAU,EAAE,kBAAkB;YAC9B,UAAU,EAAE,EAAE;YACd,kBAAkB,EAAE;gBAClB,KAAK,EAAE,EAAE;gBACT,cAAc,EAAE,eAAe;aAChC;YACD,oBAAoB,EAAE,qBAAqB;SAC5C,CAAC,CAAC;QAEH,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;YAC9B,UAAU,EAAE,mBAAmB;YAC/B,UAAU,EAAE,EAAE;YACd,kBAAkB,EAAE;gBAClB,KAAK,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACvB,cAAc,EAAE,aAAa;aAC9B;YACD,oBAAoB,EAAE,sBAAsB;SAC7C,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,mBAAmB,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;QAEpD,MAAM,OAAO,GAAG,mCAAmC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAExE,KAAK,CAAC,sCAAsC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAElE,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;gBACL,SAAS;aACV,CAAC,CAAC;YAEH,MAAM,gBAAgB,CAAC;SACxB;IACH,CAAC;CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/stores",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"falconPackageHash": "
|
|
36
|
+
"falconPackageHash": "79df6ac06e3b09bf6e229216fce6876df96515e7a3e01f1a76444ae4"
|
|
37
37
|
}
|