@wix/stores 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +2 -2
- package/build/cjs/index.js +2 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
- package/build/cjs/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +47 -44
- package/build/cjs/src/stores-catalog-v1-collection.http.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-collection.public.d.ts +5 -0
- package/build/cjs/src/stores-catalog-v1-collection.public.js +20 -0
- package/build/cjs/src/stores-catalog-v1-collection.public.js.map +1 -0
- package/build/cjs/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
- package/build/cjs/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
- package/build/cjs/src/stores-catalog-v1-collection.types.js.map +1 -0
- package/build/cjs/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
- package/build/cjs/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +55 -55
- package/build/cjs/src/stores-catalog-v1-collection.universal.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.http.d.ts +62 -0
- package/build/cjs/src/stores-catalog-v1-product.http.js +775 -0
- package/build/cjs/src/stores-catalog-v1-product.http.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.public.d.ts +25 -0
- package/build/cjs/src/stores-catalog-v1-product.public.js +139 -0
- package/build/cjs/src/stores-catalog-v1-product.public.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.types.d.ts +1371 -0
- package/build/cjs/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
- package/build/cjs/src/stores-catalog-v1-product.types.js.map +1 -0
- package/build/cjs/src/stores-catalog-v1-product.universal.d.ts +1744 -0
- package/build/cjs/src/stores-catalog-v1-product.universal.js +1155 -0
- package/build/cjs/src/stores-catalog-v1-product.universal.js.map +1 -0
- package/build/es/index.d.ts +2 -2
- package/build/es/index.js +2 -2
- package/build/es/index.js.map +1 -1
- package/build/es/src/{stores-poc-v1-collection.http.d.ts → stores-catalog-v1-collection.http.d.ts} +7 -2
- package/build/es/src/{stores-poc-v1-collection.http.js → stores-catalog-v1-collection.http.js} +44 -41
- package/build/es/src/stores-catalog-v1-collection.http.js.map +1 -0
- package/build/es/src/stores-catalog-v1-collection.public.d.ts +5 -0
- package/build/es/src/stores-catalog-v1-collection.public.js +13 -0
- package/build/es/src/stores-catalog-v1-collection.public.js.map +1 -0
- package/build/es/src/{stores-poc-v1-collection.types.d.ts → stores-catalog-v1-collection.types.d.ts} +51 -17
- package/build/es/src/{stores-poc-v1-collection.types.js → stores-catalog-v1-collection.types.js} +1 -1
- package/build/es/src/stores-catalog-v1-collection.types.js.map +1 -0
- package/build/es/src/{stores-poc-v1-collection.universal.d.ts → stores-catalog-v1-collection.universal.d.ts} +63 -38
- package/build/es/src/{stores-poc-v1-collection.universal.js → stores-catalog-v1-collection.universal.js} +53 -53
- package/build/es/src/stores-catalog-v1-collection.universal.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.http.d.ts +62 -0
- package/build/es/src/stores-catalog-v1-product.http.js +751 -0
- package/build/es/src/stores-catalog-v1-product.http.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.public.d.ts +25 -0
- package/build/es/src/stores-catalog-v1-product.public.js +108 -0
- package/build/es/src/stores-catalog-v1-product.public.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.types.d.ts +1371 -0
- package/build/es/src/{stores-poc-v1-product.types.js → stores-catalog-v1-product.types.js} +1 -1
- package/build/es/src/stores-catalog-v1-product.types.js.map +1 -0
- package/build/es/src/stores-catalog-v1-product.universal.d.ts +1744 -0
- package/build/es/src/stores-catalog-v1-product.universal.js +1112 -0
- package/build/es/src/stores-catalog-v1-product.universal.js.map +1 -0
- package/package.json +2 -2
- package/build/cjs/src/stores-poc-v1-collection.http.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-collection.public.d.ts +0 -6
- package/build/cjs/src/stores-poc-v1-collection.public.js +0 -20
- package/build/cjs/src/stores-poc-v1-collection.public.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-collection.types.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-collection.universal.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.http.d.ts +0 -4
- package/build/cjs/src/stores-poc-v1-product.http.js +0 -143
- package/build/cjs/src/stores-poc-v1-product.http.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.public.d.ts +0 -6
- package/build/cjs/src/stores-poc-v1-product.public.js +0 -25
- package/build/cjs/src/stores-poc-v1-product.public.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.types.d.ts +0 -470
- package/build/cjs/src/stores-poc-v1-product.types.js.map +0 -1
- package/build/cjs/src/stores-poc-v1-product.universal.d.ts +0 -549
- package/build/cjs/src/stores-poc-v1-product.universal.js +0 -212
- package/build/cjs/src/stores-poc-v1-product.universal.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.http.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.public.d.ts +0 -6
- package/build/es/src/stores-poc-v1-collection.public.js +0 -13
- package/build/es/src/stores-poc-v1-collection.public.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.types.js.map +0 -1
- package/build/es/src/stores-poc-v1-collection.universal.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.http.d.ts +0 -4
- package/build/es/src/stores-poc-v1-product.http.js +0 -138
- package/build/es/src/stores-poc-v1-product.http.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.public.d.ts +0 -6
- package/build/es/src/stores-poc-v1-product.public.js +0 -13
- package/build/es/src/stores-poc-v1-product.public.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.types.d.ts +0 -470
- package/build/es/src/stores-poc-v1-product.types.js.map +0 -1
- package/build/es/src/stores-poc-v1-product.universal.d.ts +0 -549
- package/build/es/src/stores-poc-v1-product.universal.js +0 -188
- package/build/es/src/stores-poc-v1-product.universal.js.map +0 -1
|
@@ -1,470 +0,0 @@
|
|
|
1
|
-
export interface Product {
|
|
2
|
-
/**
|
|
3
|
-
* Product ID (generated automatically by the catalog).
|
|
4
|
-
* @readonly
|
|
5
|
-
*/
|
|
6
|
-
id?: string;
|
|
7
|
-
/** Product name. */
|
|
8
|
-
name?: string | null;
|
|
9
|
-
/** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
|
|
10
|
-
slug?: string;
|
|
11
|
-
/** Whether the product is visible to site visitors. */
|
|
12
|
-
visible?: boolean | null;
|
|
13
|
-
/** Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. */
|
|
14
|
-
productType?: ProductType;
|
|
15
|
-
/** Product description. Accepts [rich text](https://dev.wix.com/api/rest/wix-stores/rich-text). */
|
|
16
|
-
description?: string | null;
|
|
17
|
-
/** Stock keeping unit (if variant management is enabled, SKUs will be set per variant, and this field will be empty). */
|
|
18
|
-
sku?: string | null;
|
|
19
|
-
/** Product weight (if variant management is enabled, weight will be set per variant, and this field will be empty). */
|
|
20
|
-
weight?: number | null;
|
|
21
|
-
/**
|
|
22
|
-
* Product weight range. The minimum and maximum weights of all the variants.
|
|
23
|
-
* com.wix.ecommerce.catalog_spi.api.v1.NumericPropertyRange weight_range = 32 [(wix.api.readOnly) = true];
|
|
24
|
-
* Product inventory status (in future this will be writable via Inventory API).
|
|
25
|
-
* @readonly
|
|
26
|
-
*/
|
|
27
|
-
stock?: Stock;
|
|
28
|
-
/**
|
|
29
|
-
* Deprecated (use `priceData` instead).
|
|
30
|
-
* @readonly
|
|
31
|
-
*/
|
|
32
|
-
price?: PriceData;
|
|
33
|
-
/** Price data. */
|
|
34
|
-
priceData?: PriceData;
|
|
35
|
-
/**
|
|
36
|
-
* Price data, converted to the currency specified in request header.
|
|
37
|
-
* @readonly
|
|
38
|
-
*/
|
|
39
|
-
convertedPriceData?: PriceData;
|
|
40
|
-
/**
|
|
41
|
-
* Product price range. The minimum and maximum prices of all the variants.
|
|
42
|
-
* com.wix.ecommerce.catalog_spi.api.v1.NumericPropertyRange price_range = 31 [(wix.api.readOnly) = true];
|
|
43
|
-
* Cost and profit data.
|
|
44
|
-
*/
|
|
45
|
-
costAndProfitData?: CostAndProfitData;
|
|
46
|
-
/**
|
|
47
|
-
* Product cost range. The minimum and maximum costs of all the variants.
|
|
48
|
-
* com.wix.ecommerce.catalog_spi.api.v1.NumericPropertyRange cost_range = 33 [(wix.api.readOnly) = true];
|
|
49
|
-
* Price per unit data.
|
|
50
|
-
*/
|
|
51
|
-
pricePerUnitData?: PricePerUnitData;
|
|
52
|
-
/**
|
|
53
|
-
* Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). Currently writable only from the UI.
|
|
54
|
-
* @readonly
|
|
55
|
-
*/
|
|
56
|
-
additionalInfoSections?: AdditionalInfoSection[];
|
|
57
|
-
/**
|
|
58
|
-
* Deprecated (use `ribbon` instead).
|
|
59
|
-
* @readonly
|
|
60
|
-
*/
|
|
61
|
-
ribbons?: Ribbon[];
|
|
62
|
-
/**
|
|
63
|
-
* 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).
|
|
64
|
-
* @readonly
|
|
65
|
-
*/
|
|
66
|
-
media?: Media;
|
|
67
|
-
/**
|
|
68
|
-
* Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
|
|
69
|
-
* @readonly
|
|
70
|
-
*/
|
|
71
|
-
customTextFields?: CustomTextField[];
|
|
72
|
-
/** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. */
|
|
73
|
-
manageVariants?: boolean | null;
|
|
74
|
-
/** Options (color, size, etc) for this product. */
|
|
75
|
-
productOptions?: ProductOption[];
|
|
76
|
-
/**
|
|
77
|
-
* Product page URL for this product (generated automatically by the server).
|
|
78
|
-
* @readonly
|
|
79
|
-
*/
|
|
80
|
-
productPageUrl?: PageUrl;
|
|
81
|
-
/**
|
|
82
|
-
* Product’s unique numeric ID (assigned in ascending order).
|
|
83
|
-
* Primarily used for sorting and filtering when crawling all products.
|
|
84
|
-
* @readonly
|
|
85
|
-
*/
|
|
86
|
-
numericId?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Inventory item ID - ID referencing the inventory system.
|
|
89
|
-
* @readonly
|
|
90
|
-
*/
|
|
91
|
-
inventoryItemId?: string;
|
|
92
|
-
/** Discount deducted from the product's original price. */
|
|
93
|
-
discount?: Discount;
|
|
94
|
-
/**
|
|
95
|
-
* A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
|
|
96
|
-
* @readonly
|
|
97
|
-
*/
|
|
98
|
-
collectionIds?: string[];
|
|
99
|
-
/**
|
|
100
|
-
* Product variants, will be provided if the the request was sent with the includeVariants flag.
|
|
101
|
-
* @readonly
|
|
102
|
-
*/
|
|
103
|
-
variants?: Variant[];
|
|
104
|
-
/**
|
|
105
|
-
* Date and time the product was last updated.
|
|
106
|
-
* google.protobuf.Timestamp last_updated = 24 [(wix.api.readOnly) = true];
|
|
107
|
-
* Date and time the product was created.
|
|
108
|
-
* google.protobuf.Timestamp created_date = 34 [(wix.api.readOnly) = true];
|
|
109
|
-
* Custom SEO data for the product.
|
|
110
|
-
* com.wixpress.advanced.seo.SeoSchema seo_data = 27;
|
|
111
|
-
* Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out".
|
|
112
|
-
*/
|
|
113
|
-
ribbon?: string | null;
|
|
114
|
-
/** 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). */
|
|
115
|
-
brand?: string | null;
|
|
116
|
-
}
|
|
117
|
-
export declare enum ProductType {
|
|
118
|
-
unspecified_product_type = "unspecified_product_type",
|
|
119
|
-
physical = "physical",
|
|
120
|
-
digital = "digital"
|
|
121
|
-
}
|
|
122
|
-
export interface Stock {
|
|
123
|
-
/** Whether inventory is being tracked */
|
|
124
|
-
trackInventory?: boolean;
|
|
125
|
-
/** Quantity currently left in inventory */
|
|
126
|
-
quantity?: number | null;
|
|
127
|
-
/**
|
|
128
|
-
* Whether the product is currently in stock (relevant only when tracking manually)
|
|
129
|
-
* Deprecated (use `inventoryStatus` instead)
|
|
130
|
-
*/
|
|
131
|
-
inStock?: boolean;
|
|
132
|
-
/**
|
|
133
|
-
* The current status of the inventory
|
|
134
|
-
* + `IN_STOCK` - In stock
|
|
135
|
-
* + `OUT_OF_STOCK` - Not in stock
|
|
136
|
-
* + `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock
|
|
137
|
-
*/
|
|
138
|
-
inventoryStatus?: InventoryStatus;
|
|
139
|
-
}
|
|
140
|
-
export declare enum InventoryStatus {
|
|
141
|
-
IN_STOCK = "IN_STOCK",
|
|
142
|
-
OUT_OF_STOCK = "OUT_OF_STOCK",
|
|
143
|
-
PARTIALLY_OUT_OF_STOCK = "PARTIALLY_OUT_OF_STOCK"
|
|
144
|
-
}
|
|
145
|
-
export interface PriceData {
|
|
146
|
-
/**
|
|
147
|
-
* Product price currency
|
|
148
|
-
* @readonly
|
|
149
|
-
*/
|
|
150
|
-
currency?: string;
|
|
151
|
-
/** Product price */
|
|
152
|
-
price?: number | null;
|
|
153
|
-
/**
|
|
154
|
-
* Discounted product price (if no discounted price is set, the product price is returned)
|
|
155
|
-
* @readonly
|
|
156
|
-
*/
|
|
157
|
-
discountedPrice?: number;
|
|
158
|
-
/**
|
|
159
|
-
* The product price and discounted price, formatted with the currency
|
|
160
|
-
* @readonly
|
|
161
|
-
*/
|
|
162
|
-
formatted?: FormattedPrice;
|
|
163
|
-
/**
|
|
164
|
-
* Price per unit
|
|
165
|
-
* @readonly
|
|
166
|
-
*/
|
|
167
|
-
pricePerUnit?: number | null;
|
|
168
|
-
}
|
|
169
|
-
export interface FormattedPrice {
|
|
170
|
-
/** Product price formatted with the currency */
|
|
171
|
-
price?: string;
|
|
172
|
-
/** Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned) */
|
|
173
|
-
discountedPrice?: string;
|
|
174
|
-
/**
|
|
175
|
-
* Price per unit
|
|
176
|
-
* @readonly
|
|
177
|
-
*/
|
|
178
|
-
pricePerUnit?: string | null;
|
|
179
|
-
}
|
|
180
|
-
export interface CostAndProfitData {
|
|
181
|
-
/** Item cost. */
|
|
182
|
-
itemCost?: number | null;
|
|
183
|
-
/**
|
|
184
|
-
* Item cost formatted with currency symbol.
|
|
185
|
-
* @readonly
|
|
186
|
-
*/
|
|
187
|
-
formattedItemCost?: string;
|
|
188
|
-
/**
|
|
189
|
-
* Profit. Calculated by reducing `cost` from `discounted_price`.
|
|
190
|
-
* @readonly
|
|
191
|
-
*/
|
|
192
|
-
profit?: number;
|
|
193
|
-
/**
|
|
194
|
-
* Profit formatted with currency symbol.
|
|
195
|
-
* @readonly
|
|
196
|
-
*/
|
|
197
|
-
formattedProfit?: string;
|
|
198
|
-
/**
|
|
199
|
-
* Profit Margin. Calculated by dividing `profit` by `discounted_price`.
|
|
200
|
-
* The result is rounded to 4 decimal places.
|
|
201
|
-
* @readonly
|
|
202
|
-
*/
|
|
203
|
-
profitMargin?: number;
|
|
204
|
-
}
|
|
205
|
-
export interface PricePerUnitData {
|
|
206
|
-
/** Total quantity */
|
|
207
|
-
totalQuantity?: number;
|
|
208
|
-
/** Total measurement unit */
|
|
209
|
-
totalMeasurementUnit?: MeasurementUnit;
|
|
210
|
-
/** Base quantity */
|
|
211
|
-
baseQuantity?: number;
|
|
212
|
-
/** Base measurement unit */
|
|
213
|
-
baseMeasurementUnit?: MeasurementUnit;
|
|
214
|
-
}
|
|
215
|
-
export declare enum MeasurementUnit {
|
|
216
|
-
UNSPECIFIED = "UNSPECIFIED",
|
|
217
|
-
ML = "ML",
|
|
218
|
-
CL = "CL",
|
|
219
|
-
L = "L",
|
|
220
|
-
CBM = "CBM",
|
|
221
|
-
MG = "MG",
|
|
222
|
-
G = "G",
|
|
223
|
-
KG = "KG",
|
|
224
|
-
MM = "MM",
|
|
225
|
-
CM = "CM",
|
|
226
|
-
M = "M",
|
|
227
|
-
SQM = "SQM",
|
|
228
|
-
OZ = "OZ",
|
|
229
|
-
LB = "LB",
|
|
230
|
-
FLOZ = "FLOZ",
|
|
231
|
-
PT = "PT",
|
|
232
|
-
QT = "QT",
|
|
233
|
-
GAL = "GAL",
|
|
234
|
-
IN = "IN",
|
|
235
|
-
FT = "FT",
|
|
236
|
-
YD = "YD",
|
|
237
|
-
SQFT = "SQFT"
|
|
238
|
-
}
|
|
239
|
-
export interface AdditionalInfoSection {
|
|
240
|
-
/** Product info section title */
|
|
241
|
-
title?: string;
|
|
242
|
-
/** Product info section description */
|
|
243
|
-
description?: string;
|
|
244
|
-
}
|
|
245
|
-
export interface Ribbon {
|
|
246
|
-
/** Ribbon text */
|
|
247
|
-
text?: string;
|
|
248
|
-
}
|
|
249
|
-
export interface Media {
|
|
250
|
-
/** Primary media (image, video etc) associated with this product. */
|
|
251
|
-
mainMedia?: MediaItem;
|
|
252
|
-
/** Media (images, videos etc) associated with this product. */
|
|
253
|
-
items?: MediaItem[];
|
|
254
|
-
}
|
|
255
|
-
export interface MediaItem extends MediaItemItemOneOf {
|
|
256
|
-
/** Media item thumbnail details. */
|
|
257
|
-
thumbnail?: MediaItemUrlAndSize;
|
|
258
|
-
/** Media item type (image, video, etc.). */
|
|
259
|
-
mediaType?: MediaItemType;
|
|
260
|
-
/** Media item title. */
|
|
261
|
-
title?: string;
|
|
262
|
-
/** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
|
|
263
|
-
id?: string;
|
|
264
|
-
/** Image data (URL, size). */
|
|
265
|
-
image?: MediaItemUrlAndSize;
|
|
266
|
-
/** Video data (URL, size). */
|
|
267
|
-
video?: MediaItemVideo;
|
|
268
|
-
}
|
|
269
|
-
/** @oneof */
|
|
270
|
-
export interface MediaItemItemOneOf {
|
|
271
|
-
/** Image data (URL, size). */
|
|
272
|
-
image?: MediaItemUrlAndSize;
|
|
273
|
-
/** Video data (URL, size). */
|
|
274
|
-
video?: MediaItemVideo;
|
|
275
|
-
}
|
|
276
|
-
export interface MediaItemUrlAndSize {
|
|
277
|
-
/** Media item URL. */
|
|
278
|
-
url?: string;
|
|
279
|
-
/** Media item width. */
|
|
280
|
-
width?: number;
|
|
281
|
-
/** Media item height. */
|
|
282
|
-
height?: number;
|
|
283
|
-
/** Media format (mp4, png, etc.). */
|
|
284
|
-
format?: string | null;
|
|
285
|
-
/** Alt text. This text will be shown in case the image is not available. */
|
|
286
|
-
altText?: string | null;
|
|
287
|
-
}
|
|
288
|
-
export declare enum MediaItemType {
|
|
289
|
-
unspecified_media_item_type = "unspecified_media_item_type",
|
|
290
|
-
image = "image",
|
|
291
|
-
video = "video",
|
|
292
|
-
audio = "audio",
|
|
293
|
-
document = "document",
|
|
294
|
-
zip = "zip"
|
|
295
|
-
}
|
|
296
|
-
export interface MediaItemVideo {
|
|
297
|
-
/** Data (URL, size) about each resolution for which this video is available. */
|
|
298
|
-
files?: MediaItemUrlAndSize[];
|
|
299
|
-
/** ID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`. */
|
|
300
|
-
stillFrameMediaId?: string;
|
|
301
|
-
}
|
|
302
|
-
export interface CustomTextField {
|
|
303
|
-
/** Text box title */
|
|
304
|
-
title?: string;
|
|
305
|
-
/** Text box input max length */
|
|
306
|
-
maxLength?: number;
|
|
307
|
-
/** Whether this text box is mandatory */
|
|
308
|
-
mandatory?: boolean;
|
|
309
|
-
}
|
|
310
|
-
export interface ProductOption {
|
|
311
|
-
/**
|
|
312
|
-
* Option type - color or other(drop down)
|
|
313
|
-
* @readonly
|
|
314
|
-
*/
|
|
315
|
-
optionType?: OptionType;
|
|
316
|
-
/** Option name (e.g., color, size) */
|
|
317
|
-
name?: string;
|
|
318
|
-
/** Choices available for this option */
|
|
319
|
-
choices?: Choice[];
|
|
320
|
-
}
|
|
321
|
-
export declare enum OptionType {
|
|
322
|
-
unspecified_option_type = "unspecified_option_type",
|
|
323
|
-
drop_down = "drop_down",
|
|
324
|
-
color = "color"
|
|
325
|
-
}
|
|
326
|
-
export interface Choice {
|
|
327
|
-
/** Color hex value or choice name */
|
|
328
|
-
value?: string;
|
|
329
|
-
/** Choice name */
|
|
330
|
-
description?: string;
|
|
331
|
-
/**
|
|
332
|
-
* Media items (images, videos) associated with this choice
|
|
333
|
-
* @readonly
|
|
334
|
-
*/
|
|
335
|
-
media?: Media;
|
|
336
|
-
/**
|
|
337
|
-
* Based on the customer’s choices, which (if any) variants that include the selected choices are in stock
|
|
338
|
-
* @readonly
|
|
339
|
-
*/
|
|
340
|
-
inStock?: boolean;
|
|
341
|
-
/**
|
|
342
|
-
* Based on the customer’s choices, which (if any) variants that include the selected choices are visible
|
|
343
|
-
* @readonly
|
|
344
|
-
*/
|
|
345
|
-
visible?: boolean;
|
|
346
|
-
}
|
|
347
|
-
export interface PageUrl {
|
|
348
|
-
/** Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite). */
|
|
349
|
-
base?: string;
|
|
350
|
-
/** Path to the product page - e.g /product-page/a-product. */
|
|
351
|
-
path?: string;
|
|
352
|
-
}
|
|
353
|
-
export interface Discount {
|
|
354
|
-
/** Discount type: amount / percent */
|
|
355
|
-
type?: DiscountType;
|
|
356
|
-
/** Discount value */
|
|
357
|
-
value?: number;
|
|
358
|
-
}
|
|
359
|
-
export declare enum DiscountType {
|
|
360
|
-
UNDEFINED = "UNDEFINED",
|
|
361
|
-
/** No discount */
|
|
362
|
-
NONE = "NONE",
|
|
363
|
-
AMOUNT = "AMOUNT",
|
|
364
|
-
PERCENT = "PERCENT"
|
|
365
|
-
}
|
|
366
|
-
export interface Variant {
|
|
367
|
-
/** Requested Variant ID */
|
|
368
|
-
id?: string;
|
|
369
|
-
/** Specific choices within a selection, as option-choice key-value pairs */
|
|
370
|
-
choices?: Record<string, string>;
|
|
371
|
-
variant?: VariantDataWithNoStock;
|
|
372
|
-
/**
|
|
373
|
-
* Variant inventory status.
|
|
374
|
-
* @readonly
|
|
375
|
-
*/
|
|
376
|
-
stock?: VariantStock;
|
|
377
|
-
}
|
|
378
|
-
export interface VariantDataWithNoStock {
|
|
379
|
-
/** Variant price. */
|
|
380
|
-
priceData?: PriceData;
|
|
381
|
-
/**
|
|
382
|
-
* Variant price data, converted to currency requested in header.
|
|
383
|
-
* @readonly
|
|
384
|
-
*/
|
|
385
|
-
convertedPriceData?: PriceData;
|
|
386
|
-
/** Cost and profit data. */
|
|
387
|
-
costAndProfitData?: CostAndProfitData;
|
|
388
|
-
/** Variant weight. */
|
|
389
|
-
weight?: number;
|
|
390
|
-
/** Variant SKU (stock keeping unit). */
|
|
391
|
-
sku?: string;
|
|
392
|
-
/** Whether the variant is visible to customers. */
|
|
393
|
-
visible?: boolean;
|
|
394
|
-
}
|
|
395
|
-
export interface VariantStock {
|
|
396
|
-
/** Whether inventory is being tracked. */
|
|
397
|
-
trackQuantity?: boolean;
|
|
398
|
-
/** Quantity currently left in inventory. */
|
|
399
|
-
quantity?: number | null;
|
|
400
|
-
/** Whether the product is currently in stock (relevant only when tracking manually). */
|
|
401
|
-
inStock?: boolean;
|
|
402
|
-
}
|
|
403
|
-
export interface GetProductRequest {
|
|
404
|
-
/** Requested product ID. */
|
|
405
|
-
productId: string;
|
|
406
|
-
/** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
|
|
407
|
-
includeMerchantSpecificData?: boolean;
|
|
408
|
-
}
|
|
409
|
-
export interface GetProductResponse {
|
|
410
|
-
/** Requested product data. */
|
|
411
|
-
product?: Product;
|
|
412
|
-
}
|
|
413
|
-
export interface QueryProductsRequest {
|
|
414
|
-
query?: PlatformQuery;
|
|
415
|
-
/** Whether variants should be included in the response. */
|
|
416
|
-
includeVariants?: boolean;
|
|
417
|
-
/** Whether hidden products should be included in the response. Requires permissions to manage products. */
|
|
418
|
-
includeHiddenProducts?: boolean;
|
|
419
|
-
/** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
|
|
420
|
-
includeMerchantSpecificData?: boolean;
|
|
421
|
-
}
|
|
422
|
-
export interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
423
|
-
/** Filter object. */
|
|
424
|
-
filter?: Record<string, any> | null;
|
|
425
|
-
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
426
|
-
sort?: Sorting[];
|
|
427
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
428
|
-
paging?: PlatformPaging;
|
|
429
|
-
}
|
|
430
|
-
/** @oneof */
|
|
431
|
-
export interface PlatformQueryPagingMethodOneOf {
|
|
432
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
433
|
-
paging?: PlatformPaging;
|
|
434
|
-
}
|
|
435
|
-
export interface Sorting {
|
|
436
|
-
/** Name of the field to sort by. */
|
|
437
|
-
fieldName?: string;
|
|
438
|
-
/** Sort order. */
|
|
439
|
-
order?: SortOrder;
|
|
440
|
-
}
|
|
441
|
-
export declare enum SortOrder {
|
|
442
|
-
ASC = "ASC",
|
|
443
|
-
DESC = "DESC"
|
|
444
|
-
}
|
|
445
|
-
export interface PlatformPaging {
|
|
446
|
-
/** Number of items to load. */
|
|
447
|
-
limit?: number | null;
|
|
448
|
-
/** Number of items to skip in the current sort order. */
|
|
449
|
-
offset?: number | null;
|
|
450
|
-
}
|
|
451
|
-
export interface QueryProductsResponse {
|
|
452
|
-
products?: Product[];
|
|
453
|
-
metadata?: PlatformPagingMetadata;
|
|
454
|
-
}
|
|
455
|
-
export interface PlatformPagingMetadata {
|
|
456
|
-
/** The number of items returned in this response. */
|
|
457
|
-
count?: number | null;
|
|
458
|
-
/** The offset which was requested. Returned if offset paging was used. */
|
|
459
|
-
offset?: number | null;
|
|
460
|
-
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
461
|
-
total?: number | null;
|
|
462
|
-
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
463
|
-
cursors?: Cursors;
|
|
464
|
-
}
|
|
465
|
-
export interface Cursors {
|
|
466
|
-
/** Cursor pointing to next page in the list of results. */
|
|
467
|
-
next?: string | null;
|
|
468
|
-
/** Cursor pointing to previous page in the list of results. */
|
|
469
|
-
prev?: string | null;
|
|
470
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stores-poc-v1-product.types.js","sourceRoot":"","sources":["../../../src/stores-poc-v1-product.types.ts"],"names":[],"mappings":";;;AAqHA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,oEAAqD,CAAA;IACrD,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAqBD,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,gDAA6B,CAAA;IAC7B,oEAAiD,CAAA;AACnD,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AA4ED,IAAY,eAuBX;AAvBD,WAAY,eAAe;IACzB,8CAA2B,CAAA;IAC3B,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,0BAAO,CAAA;IACP,8BAAW,CAAA;IACX,4BAAS,CAAA;IACT,0BAAO,CAAA;IACP,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,0BAAO,CAAA;IACP,8BAAW,CAAA;IACX,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,gCAAa,CAAA;IACb,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,8BAAW,CAAA;IACX,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,4BAAS,CAAA;IACT,gCAAa,CAAA;AACf,CAAC,EAvBW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAuB1B;AAyDD,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,4EAA2D,CAAA;IAC3D,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,sCAAqB,CAAA;IACrB,4BAAW,CAAA;AACb,CAAC,EAPW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAOxB;AA8BD,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,iEAAmD,CAAA;IACnD,qCAAuB,CAAA;IACvB,6BAAe,CAAA;AACjB,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAsCD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,kBAAkB;IAClB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;AACrB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB;AAsFD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
|