@wix/stores 1.0.166 → 1.0.168
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.
|
@@ -1,45 +1,8 @@
|
|
|
1
|
-
interface WishlistData {
|
|
2
|
-
/** GUID unique to this list for this site */
|
|
3
|
-
_id?: string | null;
|
|
4
|
-
/** Member id the list belongs to */
|
|
5
|
-
ownerId?: string;
|
|
6
|
-
/** List of items in the list. Not necessarily the full list (can depends on request data) */
|
|
7
|
-
items?: WishlistItem[];
|
|
8
|
-
/** Total count of items in the list */
|
|
9
|
-
totalCount?: number;
|
|
10
|
-
}
|
|
11
|
-
interface WishlistItem {
|
|
12
|
-
/** Unique identifier for an item of this type and origin */
|
|
13
|
-
_id?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The data the item was save to the list
|
|
16
|
-
* @readonly
|
|
17
|
-
*/
|
|
18
|
-
dateAdded?: Date;
|
|
19
|
-
/** The type of the item. For example "product" */
|
|
20
|
-
type?: string;
|
|
21
|
-
/** The origin of the item. Should be the scope the item type is related to. For example "wixstores" */
|
|
22
|
-
origin?: string;
|
|
23
|
-
}
|
|
24
|
-
interface WishlistItemKind {
|
|
25
|
-
/** The type of the item. For example "product" */
|
|
26
|
-
type?: string;
|
|
27
|
-
/** The origin of the item. Should be the scope the item type is related to. For example "wixstores" */
|
|
28
|
-
origin?: string;
|
|
29
|
-
}
|
|
30
|
-
interface GetWishlistByIdOptions {
|
|
31
|
-
/** List length limit. Default is 100 */
|
|
32
|
-
limit?: number | null;
|
|
33
|
-
/** List starting index offset. Default is 0 */
|
|
34
|
-
offset?: number | null;
|
|
35
|
-
/** Filter requested list by specific kinds of items */
|
|
36
|
-
kind?: WishlistItemKind[];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
1
|
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
40
2
|
interface HttpClient {
|
|
41
3
|
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
42
|
-
fetchWithAuth:
|
|
4
|
+
fetchWithAuth: typeof fetch;
|
|
5
|
+
wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
|
|
43
6
|
}
|
|
44
7
|
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
45
8
|
type HttpResponse<T = any> = {
|
|
@@ -79,2802 +42,64 @@ declare global {
|
|
|
79
42
|
}
|
|
80
43
|
}
|
|
81
44
|
|
|
82
|
-
declare function
|
|
83
|
-
ownerId: string;
|
|
84
|
-
items: {
|
|
85
|
-
_id: string;
|
|
86
|
-
type: string;
|
|
87
|
-
origin: string;
|
|
88
|
-
}[];
|
|
89
|
-
totalCount: number;
|
|
90
|
-
}>;
|
|
45
|
+
declare function createRESTModule$4<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
91
46
|
|
|
92
|
-
declare const getWishlistById:
|
|
47
|
+
declare const getWishlistById: ReturnType<typeof createRESTModule$4<typeof publicGetWishlistById>>;
|
|
93
48
|
|
|
94
49
|
declare const context$4_getWishlistById: typeof getWishlistById;
|
|
95
50
|
declare namespace context$4 {
|
|
96
51
|
export { context$4_getWishlistById as getWishlistById };
|
|
97
52
|
}
|
|
98
53
|
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Collection ID (generated automatically by the catalog).
|
|
102
|
-
* @readonly
|
|
103
|
-
*/
|
|
104
|
-
_id?: string | null;
|
|
105
|
-
/** Collection name. */
|
|
106
|
-
name?: string | null;
|
|
107
|
-
/**
|
|
108
|
-
* Media items (images, videos etc) associated with this collection. Read only.
|
|
109
|
-
* @readonly
|
|
110
|
-
*/
|
|
111
|
-
media?: Media$1;
|
|
112
|
-
/**
|
|
113
|
-
* Number of products in the collection. Read only.
|
|
114
|
-
* @readonly
|
|
115
|
-
*/
|
|
116
|
-
numberOfProducts?: number;
|
|
117
|
-
/** Collection description. */
|
|
118
|
-
description?: string | null;
|
|
119
|
-
/** Collection slug. */
|
|
120
|
-
slug?: string | null;
|
|
121
|
-
/** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
|
|
122
|
-
visible?: boolean | null;
|
|
123
|
-
}
|
|
124
|
-
interface Media$1 {
|
|
125
|
-
/** Primary media (image, video etc) associated with this product. */
|
|
126
|
-
mainMedia?: MediaItem$1;
|
|
127
|
-
/** Media (images, videos etc) associated with this product. */
|
|
128
|
-
items?: MediaItem$1[];
|
|
129
|
-
}
|
|
130
|
-
interface MediaItem$1 extends MediaItemItemOneOf$1 {
|
|
131
|
-
/** Image data (URL, size). */
|
|
132
|
-
image?: MediaItemUrlAndSize$1;
|
|
133
|
-
/** Video data (URL, size). */
|
|
134
|
-
video?: MediaItemVideo$1;
|
|
135
|
-
/** Media item thumbnail details. */
|
|
136
|
-
thumbnail?: MediaItemUrlAndSize$1;
|
|
137
|
-
/** Media item type (image, video, etc.). */
|
|
138
|
-
mediaType?: MediaItemType$1;
|
|
139
|
-
/** Media item title. */
|
|
140
|
-
title?: string;
|
|
141
|
-
/** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
|
|
142
|
-
_id?: string;
|
|
143
|
-
}
|
|
144
|
-
/** @oneof */
|
|
145
|
-
interface MediaItemItemOneOf$1 {
|
|
146
|
-
/** Image data (URL, size). */
|
|
147
|
-
image?: MediaItemUrlAndSize$1;
|
|
148
|
-
/** Video data (URL, size). */
|
|
149
|
-
video?: MediaItemVideo$1;
|
|
150
|
-
}
|
|
151
|
-
interface MediaItemUrlAndSize$1 {
|
|
152
|
-
/** Media item URL. */
|
|
153
|
-
url?: string;
|
|
154
|
-
/** Media item width. */
|
|
155
|
-
width?: number;
|
|
156
|
-
/** Media item height. */
|
|
157
|
-
height?: number;
|
|
158
|
-
/** Media format (mp4, png, etc.). */
|
|
159
|
-
format?: string | null;
|
|
160
|
-
/** Alt text. This text will be shown in case the image is not available. */
|
|
161
|
-
altText?: string | null;
|
|
162
|
-
}
|
|
163
|
-
declare enum MediaItemType$1 {
|
|
164
|
-
unspecified_media_item_type = "unspecified_media_item_type",
|
|
165
|
-
image = "image",
|
|
166
|
-
video = "video",
|
|
167
|
-
audio = "audio",
|
|
168
|
-
document = "document",
|
|
169
|
-
zip = "zip"
|
|
170
|
-
}
|
|
171
|
-
interface MediaItemVideo$1 {
|
|
172
|
-
/** Data (URL, size) about each resolution for which this video is available. */
|
|
173
|
-
files?: MediaItemUrlAndSize$1[];
|
|
174
|
-
/** 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"`. */
|
|
175
|
-
stillFrameMediaId?: string;
|
|
176
|
-
}
|
|
177
|
-
interface GetCollectionBySlugResponse$1 {
|
|
178
|
-
/** The requested collection. */
|
|
179
|
-
collection?: Collection$1;
|
|
180
|
-
}
|
|
181
|
-
interface GetCollectionBySlugResponseNonNullableFields$1 {
|
|
182
|
-
collection?: {
|
|
183
|
-
media?: {
|
|
184
|
-
mainMedia?: {
|
|
185
|
-
image?: {
|
|
186
|
-
url: string;
|
|
187
|
-
width: number;
|
|
188
|
-
height: number;
|
|
189
|
-
};
|
|
190
|
-
video?: {
|
|
191
|
-
files: {
|
|
192
|
-
url: string;
|
|
193
|
-
width: number;
|
|
194
|
-
height: number;
|
|
195
|
-
}[];
|
|
196
|
-
stillFrameMediaId: string;
|
|
197
|
-
};
|
|
198
|
-
thumbnail?: {
|
|
199
|
-
url: string;
|
|
200
|
-
width: number;
|
|
201
|
-
height: number;
|
|
202
|
-
};
|
|
203
|
-
mediaType: MediaItemType$1;
|
|
204
|
-
title: string;
|
|
205
|
-
_id: string;
|
|
206
|
-
};
|
|
207
|
-
items: {
|
|
208
|
-
image?: {
|
|
209
|
-
url: string;
|
|
210
|
-
width: number;
|
|
211
|
-
height: number;
|
|
212
|
-
};
|
|
213
|
-
video?: {
|
|
214
|
-
files: {
|
|
215
|
-
url: string;
|
|
216
|
-
width: number;
|
|
217
|
-
height: number;
|
|
218
|
-
}[];
|
|
219
|
-
stillFrameMediaId: string;
|
|
220
|
-
};
|
|
221
|
-
thumbnail?: {
|
|
222
|
-
url: string;
|
|
223
|
-
width: number;
|
|
224
|
-
height: number;
|
|
225
|
-
};
|
|
226
|
-
mediaType: MediaItemType$1;
|
|
227
|
-
title: string;
|
|
228
|
-
_id: string;
|
|
229
|
-
}[];
|
|
230
|
-
};
|
|
231
|
-
numberOfProducts: number;
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
interface QueryOffsetResult$1 {
|
|
235
|
-
currentPage: number | undefined;
|
|
236
|
-
totalPages: number | undefined;
|
|
237
|
-
totalCount: number | undefined;
|
|
238
|
-
hasNext: () => boolean;
|
|
239
|
-
hasPrev: () => boolean;
|
|
240
|
-
length: number;
|
|
241
|
-
pageSize: number;
|
|
242
|
-
}
|
|
243
|
-
interface CollectionsQueryResult extends QueryOffsetResult$1 {
|
|
244
|
-
items: Collection$1[];
|
|
245
|
-
query: CollectionsQueryBuilder;
|
|
246
|
-
next: () => Promise<CollectionsQueryResult>;
|
|
247
|
-
prev: () => Promise<CollectionsQueryResult>;
|
|
248
|
-
}
|
|
249
|
-
interface CollectionsQueryBuilder {
|
|
250
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
251
|
-
* @param value - Value to compare against.
|
|
252
|
-
* @documentationMaturity preview
|
|
253
|
-
*/
|
|
254
|
-
eq: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
255
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
256
|
-
* @param value - Value to compare against.
|
|
257
|
-
* @documentationMaturity preview
|
|
258
|
-
*/
|
|
259
|
-
ne: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
260
|
-
/** @param propertyName - Property whose value is compared with `string`.
|
|
261
|
-
* @param string - String to compare against. Case-insensitive.
|
|
262
|
-
* @documentationMaturity preview
|
|
263
|
-
*/
|
|
264
|
-
startsWith: (propertyName: '_id' | 'name', value: string) => CollectionsQueryBuilder;
|
|
265
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
266
|
-
* @param values - List of values to compare against.
|
|
267
|
-
* @documentationMaturity preview
|
|
268
|
-
*/
|
|
269
|
-
hasSome: (propertyName: '_id' | 'name', value: any[]) => CollectionsQueryBuilder;
|
|
270
|
-
/** @documentationMaturity preview */
|
|
271
|
-
in: (propertyName: '_id' | 'name', value: any) => CollectionsQueryBuilder;
|
|
272
|
-
/** @documentationMaturity preview */
|
|
273
|
-
exists: (propertyName: '_id' | 'name', value: boolean) => CollectionsQueryBuilder;
|
|
274
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
275
|
-
* @documentationMaturity preview
|
|
276
|
-
*/
|
|
277
|
-
ascending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder;
|
|
278
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
279
|
-
* @documentationMaturity preview
|
|
280
|
-
*/
|
|
281
|
-
descending: (...propertyNames: Array<'_id' | 'name'>) => CollectionsQueryBuilder;
|
|
282
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
283
|
-
* @documentationMaturity preview
|
|
284
|
-
*/
|
|
285
|
-
limit: (limit: number) => CollectionsQueryBuilder;
|
|
286
|
-
/** @param skip - Number of items to skip in the query results before returning the results.
|
|
287
|
-
* @documentationMaturity preview
|
|
288
|
-
*/
|
|
289
|
-
skip: (skip: number) => CollectionsQueryBuilder;
|
|
290
|
-
/** @documentationMaturity preview */
|
|
291
|
-
find: () => Promise<CollectionsQueryResult>;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
declare function queryCollections$1(httpClient: HttpClient): () => CollectionsQueryBuilder;
|
|
295
|
-
declare function getCollection$1(httpClient: HttpClient): (_id: string) => Promise<Collection$1 & {
|
|
296
|
-
media?: {
|
|
297
|
-
mainMedia?: {
|
|
298
|
-
image?: {
|
|
299
|
-
url: string;
|
|
300
|
-
width: number;
|
|
301
|
-
height: number;
|
|
302
|
-
} | undefined;
|
|
303
|
-
video?: {
|
|
304
|
-
files: {
|
|
305
|
-
url: string;
|
|
306
|
-
width: number;
|
|
307
|
-
height: number;
|
|
308
|
-
}[];
|
|
309
|
-
stillFrameMediaId: string;
|
|
310
|
-
} | undefined;
|
|
311
|
-
thumbnail?: {
|
|
312
|
-
url: string;
|
|
313
|
-
width: number;
|
|
314
|
-
height: number;
|
|
315
|
-
} | undefined;
|
|
316
|
-
mediaType: MediaItemType$1;
|
|
317
|
-
title: string;
|
|
318
|
-
_id: string;
|
|
319
|
-
} | undefined;
|
|
320
|
-
items: {
|
|
321
|
-
image?: {
|
|
322
|
-
url: string;
|
|
323
|
-
width: number;
|
|
324
|
-
height: number;
|
|
325
|
-
} | undefined;
|
|
326
|
-
video?: {
|
|
327
|
-
files: {
|
|
328
|
-
url: string;
|
|
329
|
-
width: number;
|
|
330
|
-
height: number;
|
|
331
|
-
}[];
|
|
332
|
-
stillFrameMediaId: string;
|
|
333
|
-
} | undefined;
|
|
334
|
-
thumbnail?: {
|
|
335
|
-
url: string;
|
|
336
|
-
width: number;
|
|
337
|
-
height: number;
|
|
338
|
-
} | undefined;
|
|
339
|
-
mediaType: MediaItemType$1;
|
|
340
|
-
title: string;
|
|
341
|
-
_id: string;
|
|
342
|
-
}[];
|
|
343
|
-
} | undefined;
|
|
344
|
-
numberOfProducts: number;
|
|
345
|
-
}>;
|
|
346
|
-
declare function getCollectionBySlug$3(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse$1 & GetCollectionBySlugResponseNonNullableFields$1>;
|
|
54
|
+
declare function createRESTModule$3<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
347
55
|
|
|
348
|
-
declare const queryCollections:
|
|
349
|
-
declare const getCollection:
|
|
350
|
-
declare const getCollectionBySlug$
|
|
56
|
+
declare const queryCollections: ReturnType<typeof createRESTModule$3<typeof publicQueryCollections>>;
|
|
57
|
+
declare const getCollection: ReturnType<typeof createRESTModule$3<typeof publicGetCollection>>;
|
|
58
|
+
declare const getCollectionBySlug$1: ReturnType<typeof createRESTModule$3<typeof publicGetCollectionBySlug>>;
|
|
351
59
|
|
|
352
60
|
declare const context$3_getCollection: typeof getCollection;
|
|
353
61
|
declare const context$3_queryCollections: typeof queryCollections;
|
|
354
62
|
declare namespace context$3 {
|
|
355
|
-
export { context$3_getCollection as getCollection, getCollectionBySlug$
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
* @readonly
|
|
396
|
-
* @deprecated
|
|
397
|
-
*/
|
|
398
|
-
price?: PriceData;
|
|
399
|
-
/** Price data. */
|
|
400
|
-
priceData?: PriceData;
|
|
401
|
-
/**
|
|
402
|
-
* Price data, converted to the currency specified in request header.
|
|
403
|
-
* @readonly
|
|
404
|
-
*/
|
|
405
|
-
convertedPriceData?: PriceData;
|
|
406
|
-
/**
|
|
407
|
-
* Product price range. The minimum and maximum prices of all the variants.
|
|
408
|
-
* @readonly
|
|
409
|
-
*/
|
|
410
|
-
priceRange?: NumericPropertyRange;
|
|
411
|
-
/** Cost and profit data. */
|
|
412
|
-
costAndProfitData?: CostAndProfitData;
|
|
413
|
-
/**
|
|
414
|
-
* Product cost range. The minimum and maximum costs of all the variants.
|
|
415
|
-
* @readonly
|
|
416
|
-
*/
|
|
417
|
-
costRange?: NumericPropertyRange;
|
|
418
|
-
/** Price per unit data. */
|
|
419
|
-
pricePerUnitData?: PricePerUnitData;
|
|
420
|
-
/** Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). */
|
|
421
|
-
additionalInfoSections?: AdditionalInfoSection[];
|
|
422
|
-
/**
|
|
423
|
-
* Deprecated (use `ribbon` instead).
|
|
424
|
-
* @readonly
|
|
425
|
-
* @deprecated
|
|
426
|
-
*/
|
|
427
|
-
ribbons?: Ribbon[];
|
|
428
|
-
/**
|
|
429
|
-
* 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).
|
|
430
|
-
* @readonly
|
|
431
|
-
*/
|
|
432
|
-
media?: Media;
|
|
433
|
-
/**
|
|
434
|
-
* Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
|
|
435
|
-
* @readonly
|
|
436
|
-
*/
|
|
437
|
-
customTextFields?: CustomTextField[];
|
|
438
|
-
/** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined. */
|
|
439
|
-
manageVariants?: boolean | null;
|
|
440
|
-
/** Options for this product. */
|
|
441
|
-
productOptions?: ProductOption[];
|
|
442
|
-
/**
|
|
443
|
-
* Product page URL for this product (generated automatically by the server).
|
|
444
|
-
* @readonly
|
|
445
|
-
*/
|
|
446
|
-
productPageUrl?: PageUrl;
|
|
447
|
-
/**
|
|
448
|
-
* Product’s unique numeric ID (assigned in ascending order).
|
|
449
|
-
* Primarily used for sorting and filtering when crawling all products.
|
|
450
|
-
* @readonly
|
|
451
|
-
*/
|
|
452
|
-
numericId?: string;
|
|
453
|
-
/**
|
|
454
|
-
* Inventory item ID - ID referencing the inventory system.
|
|
455
|
-
* @readonly
|
|
456
|
-
*/
|
|
457
|
-
inventoryItemId?: string;
|
|
458
|
-
/** Discount deducted from the product's original price. */
|
|
459
|
-
discount?: Discount$1;
|
|
460
|
-
/**
|
|
461
|
-
* A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
|
|
462
|
-
* @readonly
|
|
463
|
-
*/
|
|
464
|
-
collectionIds?: string[];
|
|
465
|
-
/**
|
|
466
|
-
* Product variants, will be provided if the the request was sent with the `includeVariants: true`.
|
|
467
|
-
*
|
|
468
|
-
* Max: 1,000 variants
|
|
469
|
-
* @readonly
|
|
470
|
-
*/
|
|
471
|
-
variants?: Variant[];
|
|
472
|
-
/**
|
|
473
|
-
* Date and time the product was last updated.
|
|
474
|
-
* @readonly
|
|
475
|
-
*/
|
|
476
|
-
lastUpdated?: Date;
|
|
477
|
-
/**
|
|
478
|
-
* Date and time the product was created.
|
|
479
|
-
* @readonly
|
|
480
|
-
*/
|
|
481
|
-
_createdDate?: Date;
|
|
482
|
-
/** Custom SEO data for the product. */
|
|
483
|
-
seoData?: SeoSchema;
|
|
484
|
-
/** Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". */
|
|
485
|
-
ribbon?: string | null;
|
|
486
|
-
/** 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). */
|
|
487
|
-
brand?: string | null;
|
|
488
|
-
}
|
|
489
|
-
declare enum ProductType {
|
|
490
|
-
unspecified_product_type = "unspecified_product_type",
|
|
491
|
-
physical = "physical",
|
|
492
|
-
digital = "digital"
|
|
493
|
-
}
|
|
494
|
-
interface NumericPropertyRange {
|
|
495
|
-
/** Minimum value. */
|
|
496
|
-
minValue?: number;
|
|
497
|
-
/** Maximum value. */
|
|
498
|
-
maxValue?: number;
|
|
499
|
-
}
|
|
500
|
-
interface Stock {
|
|
501
|
-
/** Whether inventory is being tracked */
|
|
502
|
-
trackInventory?: boolean;
|
|
503
|
-
/** Quantity currently left in inventory */
|
|
504
|
-
quantity?: number | null;
|
|
505
|
-
/**
|
|
506
|
-
* Whether the product is currently in stock (relevant only when tracking manually)
|
|
507
|
-
* Deprecated (use `inventoryStatus` instead)
|
|
508
|
-
* @deprecated
|
|
509
|
-
*/
|
|
510
|
-
inStock?: boolean;
|
|
511
|
-
/**
|
|
512
|
-
* The current status of the inventory
|
|
513
|
-
* + `IN_STOCK` - In stock
|
|
514
|
-
* + `OUT_OF_STOCK` - Not in stock
|
|
515
|
-
* + `PARTIALLY_OUT_OF_STOCK` - Some of the variants are not in stock
|
|
516
|
-
*/
|
|
517
|
-
inventoryStatus?: InventoryStatus;
|
|
518
|
-
}
|
|
519
|
-
declare enum InventoryStatus {
|
|
520
|
-
IN_STOCK = "IN_STOCK",
|
|
521
|
-
OUT_OF_STOCK = "OUT_OF_STOCK",
|
|
522
|
-
PARTIALLY_OUT_OF_STOCK = "PARTIALLY_OUT_OF_STOCK"
|
|
523
|
-
}
|
|
524
|
-
interface PriceData {
|
|
525
|
-
/**
|
|
526
|
-
* Product price currency
|
|
527
|
-
* @readonly
|
|
528
|
-
*/
|
|
529
|
-
currency?: string;
|
|
530
|
-
/** Product price */
|
|
531
|
-
price?: number | null;
|
|
532
|
-
/**
|
|
533
|
-
* Discounted product price (if no discounted price is set, the product price is returned)
|
|
534
|
-
* @readonly
|
|
535
|
-
*/
|
|
536
|
-
discountedPrice?: number;
|
|
537
|
-
/**
|
|
538
|
-
* The product price and discounted price, formatted with the currency
|
|
539
|
-
* @readonly
|
|
540
|
-
*/
|
|
541
|
-
formatted?: FormattedPrice;
|
|
542
|
-
/**
|
|
543
|
-
* Price per unit
|
|
544
|
-
* @readonly
|
|
545
|
-
*/
|
|
546
|
-
pricePerUnit?: number | null;
|
|
547
|
-
}
|
|
548
|
-
interface FormattedPrice {
|
|
549
|
-
/** Product price formatted with the currency */
|
|
550
|
-
price?: string;
|
|
551
|
-
/** Discounted product price formatted with the currency (if no discounted price is set, the product formatted price is returned) */
|
|
552
|
-
discountedPrice?: string;
|
|
553
|
-
/**
|
|
554
|
-
* Price per unit
|
|
555
|
-
* @readonly
|
|
556
|
-
*/
|
|
557
|
-
pricePerUnit?: string | null;
|
|
558
|
-
}
|
|
559
|
-
interface CostAndProfitData {
|
|
560
|
-
/** Item cost. */
|
|
561
|
-
itemCost?: number | null;
|
|
562
|
-
/**
|
|
563
|
-
* Item cost formatted with currency symbol.
|
|
564
|
-
* @readonly
|
|
565
|
-
*/
|
|
566
|
-
formattedItemCost?: string;
|
|
567
|
-
/**
|
|
568
|
-
* Profit. Calculated by reducing `cost` from `discounted_price`.
|
|
569
|
-
* @readonly
|
|
570
|
-
*/
|
|
571
|
-
profit?: number;
|
|
572
|
-
/**
|
|
573
|
-
* Profit formatted with currency symbol.
|
|
574
|
-
* @readonly
|
|
575
|
-
*/
|
|
576
|
-
formattedProfit?: string;
|
|
577
|
-
/**
|
|
578
|
-
* Profit Margin. Calculated by dividing `profit` by `discounted_price`.
|
|
579
|
-
* The result is rounded to 4 decimal places.
|
|
580
|
-
* @readonly
|
|
581
|
-
*/
|
|
582
|
-
profitMargin?: number;
|
|
583
|
-
}
|
|
584
|
-
interface PricePerUnitData {
|
|
585
|
-
/** Total quantity */
|
|
586
|
-
totalQuantity?: number;
|
|
587
|
-
/** Total measurement unit */
|
|
588
|
-
totalMeasurementUnit?: MeasurementUnit;
|
|
589
|
-
/** Base quantity */
|
|
590
|
-
baseQuantity?: number;
|
|
591
|
-
/** Base measurement unit */
|
|
592
|
-
baseMeasurementUnit?: MeasurementUnit;
|
|
593
|
-
}
|
|
594
|
-
declare enum MeasurementUnit {
|
|
595
|
-
UNSPECIFIED = "UNSPECIFIED",
|
|
596
|
-
ML = "ML",
|
|
597
|
-
CL = "CL",
|
|
598
|
-
L = "L",
|
|
599
|
-
CBM = "CBM",
|
|
600
|
-
MG = "MG",
|
|
601
|
-
G = "G",
|
|
602
|
-
KG = "KG",
|
|
603
|
-
MM = "MM",
|
|
604
|
-
CM = "CM",
|
|
605
|
-
M = "M",
|
|
606
|
-
SQM = "SQM",
|
|
607
|
-
OZ = "OZ",
|
|
608
|
-
LB = "LB",
|
|
609
|
-
FLOZ = "FLOZ",
|
|
610
|
-
PT = "PT",
|
|
611
|
-
QT = "QT",
|
|
612
|
-
GAL = "GAL",
|
|
613
|
-
IN = "IN",
|
|
614
|
-
FT = "FT",
|
|
615
|
-
YD = "YD",
|
|
616
|
-
SQFT = "SQFT"
|
|
617
|
-
}
|
|
618
|
-
interface AdditionalInfoSection {
|
|
619
|
-
/** Product info section title */
|
|
620
|
-
title?: string;
|
|
621
|
-
/** Product info section description */
|
|
622
|
-
description?: string;
|
|
623
|
-
}
|
|
624
|
-
interface Ribbon {
|
|
625
|
-
/** Ribbon text */
|
|
626
|
-
text?: string;
|
|
627
|
-
}
|
|
628
|
-
interface Media {
|
|
629
|
-
/** Primary media (image, video etc) associated with this product. */
|
|
630
|
-
mainMedia?: MediaItem;
|
|
631
|
-
/** Media (images, videos etc) associated with this product. */
|
|
632
|
-
items?: MediaItem[];
|
|
633
|
-
}
|
|
634
|
-
interface MediaItem extends MediaItemItemOneOf {
|
|
635
|
-
/** Image data (URL, size). */
|
|
636
|
-
image?: MediaItemUrlAndSize;
|
|
637
|
-
/** Video data (URL, size). */
|
|
638
|
-
video?: MediaItemVideo;
|
|
639
|
-
/** Media item thumbnail details. */
|
|
640
|
-
thumbnail?: MediaItemUrlAndSize;
|
|
641
|
-
/** Media item type (image, video, etc.). */
|
|
642
|
-
mediaType?: MediaItemType;
|
|
643
|
-
/** Media item title. */
|
|
644
|
-
title?: string;
|
|
645
|
-
/** Media ID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`). */
|
|
646
|
-
_id?: string;
|
|
647
|
-
}
|
|
648
|
-
/** @oneof */
|
|
649
|
-
interface MediaItemItemOneOf {
|
|
650
|
-
/** Image data (URL, size). */
|
|
651
|
-
image?: MediaItemUrlAndSize;
|
|
652
|
-
/** Video data (URL, size). */
|
|
653
|
-
video?: MediaItemVideo;
|
|
654
|
-
}
|
|
655
|
-
interface MediaItemUrlAndSize {
|
|
656
|
-
/** Media item URL. */
|
|
657
|
-
url?: string;
|
|
658
|
-
/** Media item width. */
|
|
659
|
-
width?: number;
|
|
660
|
-
/** Media item height. */
|
|
661
|
-
height?: number;
|
|
662
|
-
/** Media format (mp4, png, etc.). */
|
|
663
|
-
format?: string | null;
|
|
664
|
-
/** Alt text. This text will be shown in case the image is not available. */
|
|
665
|
-
altText?: string | null;
|
|
666
|
-
}
|
|
667
|
-
declare enum MediaItemType {
|
|
668
|
-
unspecified_media_item_type = "unspecified_media_item_type",
|
|
669
|
-
image = "image",
|
|
670
|
-
video = "video",
|
|
671
|
-
audio = "audio",
|
|
672
|
-
document = "document",
|
|
673
|
-
zip = "zip"
|
|
674
|
-
}
|
|
675
|
-
interface MediaItemVideo {
|
|
676
|
-
/** Data (URL, size) about each resolution for which this video is available. */
|
|
677
|
-
files?: MediaItemUrlAndSize[];
|
|
678
|
-
/** 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"`. */
|
|
679
|
-
stillFrameMediaId?: string;
|
|
680
|
-
}
|
|
681
|
-
interface CustomTextField {
|
|
682
|
-
/** Text box title */
|
|
683
|
-
title?: string;
|
|
684
|
-
/** Text box input max length */
|
|
685
|
-
maxLength?: number;
|
|
686
|
-
/** Whether this text box is mandatory */
|
|
687
|
-
mandatory?: boolean;
|
|
688
|
-
}
|
|
689
|
-
interface ProductOption {
|
|
690
|
-
/**
|
|
691
|
-
* Option type - color or other(drop down)
|
|
692
|
-
* @readonly
|
|
693
|
-
*/
|
|
694
|
-
optionType?: OptionType;
|
|
695
|
-
/** Option name. */
|
|
696
|
-
name?: string;
|
|
697
|
-
/** Choices available for this option. */
|
|
698
|
-
choices?: Choice[];
|
|
699
|
-
}
|
|
700
|
-
declare enum OptionType {
|
|
701
|
-
unspecified_option_type = "unspecified_option_type",
|
|
702
|
-
drop_down = "drop_down",
|
|
703
|
-
color = "color"
|
|
704
|
-
}
|
|
705
|
-
interface Choice {
|
|
706
|
-
/** Choice value. */
|
|
707
|
-
value?: string;
|
|
708
|
-
/** Choice description. */
|
|
709
|
-
description?: string;
|
|
710
|
-
/**
|
|
711
|
-
* Media items (images, videos) associated with this choice
|
|
712
|
-
* @readonly
|
|
713
|
-
*/
|
|
714
|
-
media?: Media;
|
|
715
|
-
/**
|
|
716
|
-
* Based on the customer’s choices, which (if any) variants that include the selected choices are in stock
|
|
717
|
-
* @readonly
|
|
718
|
-
*/
|
|
719
|
-
inStock?: boolean;
|
|
720
|
-
/**
|
|
721
|
-
* Based on the customer’s choices, which (if any) variants that include the selected choices are visible
|
|
722
|
-
* @readonly
|
|
723
|
-
*/
|
|
724
|
-
visible?: boolean;
|
|
725
|
-
}
|
|
726
|
-
interface PageUrl {
|
|
727
|
-
/** Base URL. For premium sites, this is the domain. For free sites, this is the site URL (e.g mysite.wixsite.com/mysite). */
|
|
728
|
-
base?: string;
|
|
729
|
-
/** Path to the product page - e.g /product-page/a-product. */
|
|
730
|
-
path?: string;
|
|
731
|
-
}
|
|
732
|
-
interface Discount$1 {
|
|
733
|
-
/**
|
|
734
|
-
* Discount type:
|
|
735
|
-
* + `"AMOUNT"`
|
|
736
|
-
* + `"PERCENT"`
|
|
737
|
-
*/
|
|
738
|
-
type?: DiscountType$1;
|
|
739
|
-
/** Discount value */
|
|
740
|
-
value?: number;
|
|
741
|
-
}
|
|
742
|
-
declare enum DiscountType$1 {
|
|
743
|
-
UNDEFINED = "UNDEFINED",
|
|
744
|
-
/** No discount */
|
|
745
|
-
NONE = "NONE",
|
|
746
|
-
AMOUNT = "AMOUNT",
|
|
747
|
-
PERCENT = "PERCENT"
|
|
748
|
-
}
|
|
749
|
-
interface Variant {
|
|
750
|
-
/** Requested Variant ID */
|
|
751
|
-
_id?: string;
|
|
752
|
-
/** Specific choices within a selection, as option-choice key-value pairs */
|
|
753
|
-
choices?: Record<string, string>;
|
|
754
|
-
variant?: VariantDataWithNoStock;
|
|
755
|
-
/**
|
|
756
|
-
* Variant inventory status.
|
|
757
|
-
* @readonly
|
|
758
|
-
*/
|
|
759
|
-
stock?: VariantStock;
|
|
760
|
-
}
|
|
761
|
-
interface VariantDataWithNoStock {
|
|
762
|
-
/** Variant price. */
|
|
763
|
-
priceData?: PriceData;
|
|
764
|
-
/**
|
|
765
|
-
* Variant price data, converted to currency requested in header.
|
|
766
|
-
* @readonly
|
|
767
|
-
*/
|
|
768
|
-
convertedPriceData?: PriceData;
|
|
769
|
-
/** Cost and profit data. */
|
|
770
|
-
costAndProfitData?: CostAndProfitData;
|
|
771
|
-
/** Variant weight. */
|
|
772
|
-
weight?: number;
|
|
773
|
-
/** Variant SKU (stock keeping unit). */
|
|
774
|
-
sku?: string;
|
|
775
|
-
/** Whether the variant is visible to customers. */
|
|
776
|
-
visible?: boolean;
|
|
777
|
-
}
|
|
778
|
-
interface VariantStock {
|
|
779
|
-
/** Whether inventory is being tracked. */
|
|
780
|
-
trackQuantity?: boolean;
|
|
781
|
-
/** Quantity currently left in inventory. */
|
|
782
|
-
quantity?: number | null;
|
|
783
|
-
/** Whether the product is currently in stock (relevant only when tracking manually). */
|
|
784
|
-
inStock?: boolean;
|
|
785
|
-
}
|
|
786
|
-
/**
|
|
787
|
-
* The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
|
|
788
|
-
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
789
|
-
* This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
|
|
790
|
-
*/
|
|
791
|
-
interface SeoSchema {
|
|
792
|
-
/** SEO tag information. */
|
|
793
|
-
tags?: Tag[];
|
|
794
|
-
/** SEO general settings. */
|
|
795
|
-
settings?: Settings;
|
|
796
|
-
}
|
|
797
|
-
interface Keyword {
|
|
798
|
-
/** Keyword value. */
|
|
799
|
-
term?: string;
|
|
800
|
-
/** Whether the keyword is the main focus keyword. */
|
|
801
|
-
isMain?: boolean;
|
|
802
|
-
}
|
|
803
|
-
interface Tag {
|
|
804
|
-
/**
|
|
805
|
-
* SEO tag type.
|
|
806
|
-
*
|
|
807
|
-
*
|
|
808
|
-
* Supported values: `title`, `meta`, `script`, `link`.
|
|
809
|
-
*/
|
|
810
|
-
type?: string;
|
|
811
|
-
/**
|
|
812
|
-
* A `{'key':'value'}` pair object where each SEO tag property (`'name'`, `'content'`, `'rel'`, `'href'`) contains a value.
|
|
813
|
-
* For example: `{'name': 'description', 'content': 'the description itself'}`.
|
|
814
|
-
*/
|
|
815
|
-
props?: Record<string, any> | null;
|
|
816
|
-
/** SEO tag meta data. For example, `{height: 300, width: 240}`. */
|
|
817
|
-
meta?: Record<string, any> | null;
|
|
818
|
-
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
819
|
-
children?: string;
|
|
820
|
-
/** Whether the tag is a custom tag. */
|
|
821
|
-
custom?: boolean;
|
|
822
|
-
/** Whether the tag is disabled. */
|
|
823
|
-
disabled?: boolean;
|
|
824
|
-
}
|
|
825
|
-
interface Settings {
|
|
826
|
-
/**
|
|
827
|
-
* Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.
|
|
828
|
-
*
|
|
829
|
-
*
|
|
830
|
-
* Default: `false` (Auto Redirect is enabled.)
|
|
831
|
-
*/
|
|
832
|
-
preventAutoRedirect?: boolean;
|
|
833
|
-
/** User-selected keyword terms for a specific page. */
|
|
834
|
-
keywords?: Keyword[];
|
|
835
|
-
}
|
|
836
|
-
interface CreateProductResponse {
|
|
837
|
-
product?: Product;
|
|
838
|
-
}
|
|
839
|
-
interface UpdateProductResponse {
|
|
840
|
-
product?: Product;
|
|
841
|
-
}
|
|
842
|
-
interface VariantOverride {
|
|
843
|
-
/** The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice). You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (Not relevant when passing variant IDs) */
|
|
844
|
-
choices?: Record<string, string>;
|
|
845
|
-
/**
|
|
846
|
-
* List of variant IDs
|
|
847
|
-
* (Not relevant when passing choices)
|
|
848
|
-
*/
|
|
849
|
-
variantIds?: string[];
|
|
850
|
-
/** Variant price */
|
|
851
|
-
price?: number | null;
|
|
852
|
-
/** Variant cost of goods */
|
|
853
|
-
cost?: number | null;
|
|
854
|
-
/** Variant weight */
|
|
855
|
-
weight?: number | null;
|
|
856
|
-
/** Variant SKU (stock keeping unit) */
|
|
857
|
-
sku?: string | null;
|
|
858
|
-
/** Whether the variant is visible to customers */
|
|
859
|
-
visible?: boolean | null;
|
|
860
|
-
}
|
|
861
|
-
interface UpdateVariantsResponse {
|
|
862
|
-
/** List of the product's variants. */
|
|
863
|
-
variants?: Variant[];
|
|
864
|
-
}
|
|
865
|
-
interface MediaDataForWrite extends MediaDataForWriteMediaSourceOneOf {
|
|
866
|
-
/** Media ID. */
|
|
867
|
-
mediaId?: string;
|
|
868
|
-
/** Media external URL (for new media items). */
|
|
869
|
-
url?: string;
|
|
870
|
-
/** Assign this media item to a specific product choice. Note that you may set media items for choices under only one option (e.g., if Colors blue, green, and red have media items, Sizes S, M, and L can't have media items assigned to them). You may clear existing media from choices with the [Remove Product Media From Choices](#removeproductmediafromchoices). */
|
|
871
|
-
choice?: OptionAndChoice;
|
|
872
|
-
}
|
|
873
|
-
/** @oneof */
|
|
874
|
-
interface MediaDataForWriteMediaSourceOneOf {
|
|
875
|
-
/** Media ID. */
|
|
876
|
-
mediaId?: string;
|
|
877
|
-
/** Media external URL (for new media items). */
|
|
878
|
-
url?: string;
|
|
879
|
-
}
|
|
880
|
-
interface OptionAndChoice {
|
|
881
|
-
/** Option to add the media to. */
|
|
882
|
-
option?: string;
|
|
883
|
-
/** Choice to add the media to. */
|
|
884
|
-
choice?: string;
|
|
885
|
-
}
|
|
886
|
-
interface MediaAssignmentToChoice {
|
|
887
|
-
/** Option name. */
|
|
888
|
-
option?: string;
|
|
889
|
-
/** Choice name. */
|
|
890
|
-
choice?: string;
|
|
891
|
-
/** Media IDs (available via the Query Product endpoint). */
|
|
892
|
-
mediaIds?: string[];
|
|
893
|
-
}
|
|
894
|
-
interface Collection {
|
|
895
|
-
/**
|
|
896
|
-
* Collection ID (generated automatically by the catalog).
|
|
897
|
-
* @readonly
|
|
898
|
-
*/
|
|
899
|
-
_id?: string | null;
|
|
900
|
-
/** Collection name. */
|
|
901
|
-
name?: string | null;
|
|
902
|
-
/**
|
|
903
|
-
* Media items (images, videos etc) associated with this collection. Read only.
|
|
904
|
-
* @readonly
|
|
905
|
-
*/
|
|
906
|
-
media?: Media;
|
|
907
|
-
/**
|
|
908
|
-
* Number of products in the collection. Read only.
|
|
909
|
-
* @readonly
|
|
910
|
-
*/
|
|
911
|
-
numberOfProducts?: number;
|
|
912
|
-
/** Collection description. */
|
|
913
|
-
description?: string | null;
|
|
914
|
-
/** Collection slug. */
|
|
915
|
-
slug?: string | null;
|
|
916
|
-
/** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
|
|
917
|
-
visible?: boolean | null;
|
|
918
|
-
}
|
|
919
|
-
interface CreateCollectionResponse {
|
|
920
|
-
/** Collection. */
|
|
921
|
-
collection?: Collection;
|
|
922
|
-
}
|
|
923
|
-
interface UpdateCollectionResponse {
|
|
924
|
-
/** Updated collection. */
|
|
925
|
-
collection?: Collection;
|
|
926
|
-
}
|
|
927
|
-
interface SetValue extends SetValueValueOneOf {
|
|
928
|
-
/**
|
|
929
|
-
* Set product price.
|
|
930
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
931
|
-
* variant prices will be calculated according to the set product price.
|
|
932
|
-
* If variant price is negative after setting new price, the update will fail.
|
|
933
|
-
*/
|
|
934
|
-
price?: number;
|
|
935
|
-
/**
|
|
936
|
-
* Set product cost of goods.
|
|
937
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
938
|
-
* cost of goods will be set per variant.
|
|
939
|
-
*/
|
|
940
|
-
cost?: number;
|
|
941
|
-
/**
|
|
942
|
-
* Set product weight.
|
|
943
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
944
|
-
* weight will be set per variant.
|
|
945
|
-
*/
|
|
946
|
-
weight?: number;
|
|
947
|
-
/** Set product ribbon. Pass empty string to remove existing ribbon. */
|
|
948
|
-
ribbon?: string;
|
|
949
|
-
/** Set product brand. Pass empty string to remove existing brand. */
|
|
950
|
-
brand?: string;
|
|
951
|
-
}
|
|
952
|
-
/** @oneof */
|
|
953
|
-
interface SetValueValueOneOf {
|
|
954
|
-
/**
|
|
955
|
-
* Set product price.
|
|
956
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
957
|
-
* variant prices will be calculated according to the set product price.
|
|
958
|
-
* If variant price is negative after setting new price, the update will fail.
|
|
959
|
-
*/
|
|
960
|
-
price?: number;
|
|
961
|
-
/**
|
|
962
|
-
* Set product cost of goods.
|
|
963
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
964
|
-
* cost of goods will be set per variant.
|
|
965
|
-
*/
|
|
966
|
-
cost?: number;
|
|
967
|
-
/**
|
|
968
|
-
* Set product weight.
|
|
969
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
970
|
-
* weight will be set per variant.
|
|
971
|
-
*/
|
|
972
|
-
weight?: number;
|
|
973
|
-
/** Set product ribbon. Pass empty string to remove existing ribbon. */
|
|
974
|
-
ribbon?: string;
|
|
975
|
-
/** Set product brand. Pass empty string to remove existing brand. */
|
|
976
|
-
brand?: string;
|
|
977
|
-
}
|
|
978
|
-
interface BulkUpdateProductsResponse {
|
|
979
|
-
/** Bulk action results. */
|
|
980
|
-
results?: BulkProductResult[];
|
|
981
|
-
/** Bulk action metadata. */
|
|
982
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
983
|
-
}
|
|
984
|
-
interface BulkProductResult {
|
|
985
|
-
/** Item metadata. */
|
|
986
|
-
itemMetadata?: ItemMetadata;
|
|
987
|
-
}
|
|
988
|
-
interface ItemMetadata {
|
|
989
|
-
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
990
|
-
_id?: string | null;
|
|
991
|
-
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
992
|
-
originalIndex?: number;
|
|
993
|
-
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
994
|
-
success?: boolean;
|
|
995
|
-
/** Details about the error in case of failure. */
|
|
996
|
-
error?: ApplicationError;
|
|
997
|
-
}
|
|
998
|
-
interface ApplicationError {
|
|
999
|
-
/** Error code. */
|
|
1000
|
-
code?: string;
|
|
1001
|
-
/** Description of the error. */
|
|
1002
|
-
description?: string;
|
|
1003
|
-
/** Data related to the error. */
|
|
1004
|
-
data?: Record<string, any> | null;
|
|
1005
|
-
}
|
|
1006
|
-
interface BulkActionMetadata {
|
|
1007
|
-
/** Number of items that were successfully processed. */
|
|
1008
|
-
totalSuccesses?: number;
|
|
1009
|
-
/** Number of items that couldn't be processed. */
|
|
1010
|
-
totalFailures?: number;
|
|
1011
|
-
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
1012
|
-
undetailedFailures?: number;
|
|
1013
|
-
}
|
|
1014
|
-
interface AdjustValue extends AdjustValueValueOneOf {
|
|
1015
|
-
/**
|
|
1016
|
-
* Adjust product price.
|
|
1017
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
1018
|
-
* variants prices will be calculated according to the adjusted price.
|
|
1019
|
-
* If variant price is negative after the adjustment, the update will fail.
|
|
1020
|
-
*/
|
|
1021
|
-
price?: PropertyAdjustmentData;
|
|
1022
|
-
/**
|
|
1023
|
-
* Adjust product cost of goods.
|
|
1024
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
1025
|
-
* cost of goods will be adjusted per variant.
|
|
1026
|
-
*/
|
|
1027
|
-
cost?: PropertyAdjustmentData;
|
|
1028
|
-
/**
|
|
1029
|
-
* Adjust product weight.
|
|
1030
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
1031
|
-
* weight will be adjusted per variant.
|
|
1032
|
-
*/
|
|
1033
|
-
weight?: PropertyAdjustmentData;
|
|
1034
|
-
}
|
|
1035
|
-
/** @oneof */
|
|
1036
|
-
interface AdjustValueValueOneOf {
|
|
1037
|
-
/**
|
|
1038
|
-
* Adjust product price.
|
|
1039
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
1040
|
-
* variants prices will be calculated according to the adjusted price.
|
|
1041
|
-
* If variant price is negative after the adjustment, the update will fail.
|
|
1042
|
-
*/
|
|
1043
|
-
price?: PropertyAdjustmentData;
|
|
1044
|
-
/**
|
|
1045
|
-
* Adjust product cost of goods.
|
|
1046
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
1047
|
-
* cost of goods will be adjusted per variant.
|
|
1048
|
-
*/
|
|
1049
|
-
cost?: PropertyAdjustmentData;
|
|
1050
|
-
/**
|
|
1051
|
-
* Adjust product weight.
|
|
1052
|
-
* If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled,
|
|
1053
|
-
* weight will be adjusted per variant.
|
|
1054
|
-
*/
|
|
1055
|
-
weight?: PropertyAdjustmentData;
|
|
1056
|
-
}
|
|
1057
|
-
interface PropertyAdjustmentData extends PropertyAdjustmentDataByOneOf {
|
|
1058
|
-
/** Adjust by percentage. */
|
|
1059
|
-
percentage?: PercentageData;
|
|
1060
|
-
/** Adjust by amount. */
|
|
1061
|
-
amount?: number;
|
|
1062
|
-
}
|
|
1063
|
-
/** @oneof */
|
|
1064
|
-
interface PropertyAdjustmentDataByOneOf {
|
|
1065
|
-
/** Adjust by percentage. */
|
|
1066
|
-
percentage?: PercentageData;
|
|
1067
|
-
/** Adjust by amount. */
|
|
1068
|
-
amount?: number;
|
|
1069
|
-
}
|
|
1070
|
-
interface PercentageData {
|
|
1071
|
-
/**
|
|
1072
|
-
* If `true`, result will be rounded to the nearest whole number.
|
|
1073
|
-
* If `false`, result will be rounded to 2 places after the decimal point.
|
|
1074
|
-
*/
|
|
1075
|
-
roundToInt?: boolean;
|
|
1076
|
-
/**
|
|
1077
|
-
* Percentage value, as a whole number (integer) between `-100` and `1000`.
|
|
1078
|
-
*
|
|
1079
|
-
* For example:
|
|
1080
|
-
* + Pass `100` to increase value by 100% (multiply original value by 2).
|
|
1081
|
-
* + Pass `1000` to increase value by 1000% (multiply original value by 10).
|
|
1082
|
-
* + Pass `-50` to decrease value by 50% (original value is halved).
|
|
1083
|
-
*/
|
|
1084
|
-
rate?: number;
|
|
1085
|
-
}
|
|
1086
|
-
interface BulkAdjustProductPropertiesResponse {
|
|
1087
|
-
/** Bulk action results. */
|
|
1088
|
-
results?: BulkProductResult[];
|
|
1089
|
-
/** Bulk action metadata. */
|
|
1090
|
-
bulkActionMetadata?: BulkActionMetadata;
|
|
1091
|
-
}
|
|
1092
|
-
interface ProductCreated {
|
|
1093
|
-
/** Product ID (generated automatically by the catalog). */
|
|
1094
|
-
productId?: string;
|
|
1095
|
-
/** Product name. */
|
|
1096
|
-
name?: string;
|
|
1097
|
-
/** Product price. */
|
|
1098
|
-
price?: PriceData;
|
|
1099
|
-
/** Whether the product is visible to customers. */
|
|
1100
|
-
visible?: boolean;
|
|
1101
|
-
/** Media items (images, videos, etc.) associated with this product. */
|
|
1102
|
-
media?: Media;
|
|
1103
|
-
/** Product stock keeping unit (SKU). If variants are being managed, this will be empty. */
|
|
1104
|
-
sku?: string;
|
|
1105
|
-
/** Product page URL for this product (generated automatically by the server). */
|
|
1106
|
-
productPageUrl?: PageUrl;
|
|
1107
|
-
/** Product brand. */
|
|
1108
|
-
brand?: string | null;
|
|
1109
|
-
/** Cost and profit data */
|
|
1110
|
-
costAndProfitData?: CostAndProfitData;
|
|
1111
|
-
}
|
|
1112
|
-
interface ProductChanged {
|
|
1113
|
-
/** Product ID. */
|
|
1114
|
-
productId?: string;
|
|
1115
|
-
/** List of product fields that were changed. */
|
|
1116
|
-
changedFields?: string[];
|
|
1117
|
-
}
|
|
1118
|
-
interface ProductDeleted {
|
|
1119
|
-
/** ID of the product that was deleted. */
|
|
1120
|
-
productId?: string;
|
|
1121
|
-
}
|
|
1122
|
-
interface CollectionCreated {
|
|
1123
|
-
/** Collection ID (generated automatically by the catalog). */
|
|
1124
|
-
collection_Id?: string;
|
|
1125
|
-
/** Collection name. */
|
|
1126
|
-
name?: string;
|
|
1127
|
-
/** Media items (images, videos, etc.) associated with this collection. */
|
|
1128
|
-
media?: Media;
|
|
1129
|
-
/** Collection slug */
|
|
1130
|
-
slug?: string;
|
|
1131
|
-
/** Collection visible status */
|
|
1132
|
-
visible?: boolean;
|
|
1133
|
-
}
|
|
1134
|
-
interface CollectionChanged {
|
|
1135
|
-
/** Collection ID (generated automatically by the catalog). */
|
|
1136
|
-
collection_Id?: string;
|
|
1137
|
-
/** List of collection fields that were changed. */
|
|
1138
|
-
changedFields?: string[];
|
|
1139
|
-
}
|
|
1140
|
-
interface CollectionDeleted {
|
|
1141
|
-
/** ID of the collection that was deleted. */
|
|
1142
|
-
collection_Id?: string;
|
|
1143
|
-
}
|
|
1144
|
-
interface VariantsChanged {
|
|
1145
|
-
/** Product ID. */
|
|
1146
|
-
productId?: string;
|
|
1147
|
-
/** List of variants that were changed. */
|
|
1148
|
-
variants?: VariantChanged[];
|
|
1149
|
-
}
|
|
1150
|
-
interface VariantChanged {
|
|
1151
|
-
/** Variant ID. */
|
|
1152
|
-
variantId?: string;
|
|
1153
|
-
choices?: Record<string, string>;
|
|
1154
|
-
/** List of variant fields that were changed. */
|
|
1155
|
-
changedFields?: string[];
|
|
1156
|
-
}
|
|
1157
|
-
interface Paging$1 {
|
|
1158
|
-
/** Amount of items to load per page */
|
|
1159
|
-
limit?: number | null;
|
|
1160
|
-
/** Number of items to skip in the display (relevant for all pages after the first) */
|
|
1161
|
-
offset?: number | null;
|
|
1162
|
-
}
|
|
1163
|
-
interface PagingMetadata$1 {
|
|
1164
|
-
/** Amount of items to load per page */
|
|
1165
|
-
items?: number;
|
|
1166
|
-
/** Number of items to skip in the display (relevant for all pages after the first) */
|
|
1167
|
-
offset?: number;
|
|
1168
|
-
}
|
|
1169
|
-
interface PlatformQuery extends PlatformQueryPagingMethodOneOf {
|
|
1170
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
1171
|
-
paging?: PlatformPaging;
|
|
1172
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
1173
|
-
cursorPaging?: CursorPaging;
|
|
1174
|
-
/** Filter object. */
|
|
1175
|
-
filter?: Record<string, any> | null;
|
|
1176
|
-
/** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */
|
|
1177
|
-
sort?: Sorting[];
|
|
1178
|
-
}
|
|
1179
|
-
/** @oneof */
|
|
1180
|
-
interface PlatformQueryPagingMethodOneOf {
|
|
1181
|
-
/** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */
|
|
1182
|
-
paging?: PlatformPaging;
|
|
1183
|
-
/** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */
|
|
1184
|
-
cursorPaging?: CursorPaging;
|
|
1185
|
-
}
|
|
1186
|
-
interface Sorting {
|
|
1187
|
-
/** Name of the field to sort by. */
|
|
1188
|
-
fieldName?: string;
|
|
1189
|
-
/** Sort order. */
|
|
1190
|
-
order?: SortOrder;
|
|
1191
|
-
}
|
|
1192
|
-
declare enum SortOrder {
|
|
1193
|
-
ASC = "ASC",
|
|
1194
|
-
DESC = "DESC"
|
|
1195
|
-
}
|
|
1196
|
-
interface PlatformPaging {
|
|
1197
|
-
/** Number of items to load. */
|
|
1198
|
-
limit?: number | null;
|
|
1199
|
-
/** Number of items to skip in the current sort order. */
|
|
1200
|
-
offset?: number | null;
|
|
1201
|
-
}
|
|
1202
|
-
interface CursorPaging {
|
|
1203
|
-
/** Maximum number of items to return in the results. */
|
|
1204
|
-
limit?: number | null;
|
|
1205
|
-
/**
|
|
1206
|
-
* Pointer to the next or previous page in the list of results.
|
|
1207
|
-
*
|
|
1208
|
-
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1209
|
-
* Not relevant for the first request.
|
|
1210
|
-
*/
|
|
1211
|
-
cursor?: string | null;
|
|
1212
|
-
}
|
|
1213
|
-
interface PlatformPagingMetadata {
|
|
1214
|
-
/** The number of items returned in this response. */
|
|
1215
|
-
count?: number | null;
|
|
1216
|
-
/** The offset which was requested. Returned if offset paging was used. */
|
|
1217
|
-
offset?: number | null;
|
|
1218
|
-
/** The total number of items that match the query. Returned if offset paging was used. */
|
|
1219
|
-
total?: number | null;
|
|
1220
|
-
/** Cursors to navigate through result pages. Returned if cursor paging was used. */
|
|
1221
|
-
cursors?: Cursors;
|
|
1222
|
-
}
|
|
1223
|
-
interface Cursors {
|
|
1224
|
-
/** Cursor string pointing to the next page in the list of results. */
|
|
1225
|
-
next?: string | null;
|
|
1226
|
-
/** Cursor pointing to the previous page in the list of results. */
|
|
1227
|
-
prev?: string | null;
|
|
1228
|
-
}
|
|
1229
|
-
interface GetProductResponse {
|
|
1230
|
-
/** Requested product data. */
|
|
1231
|
-
product?: Product;
|
|
1232
|
-
}
|
|
1233
|
-
interface GetCollectionBySlugResponse {
|
|
1234
|
-
/** The requested collection. */
|
|
1235
|
-
collection?: Collection;
|
|
1236
|
-
}
|
|
1237
|
-
interface ProductOptionsAvailabilityResponse {
|
|
1238
|
-
/** Variant information, given that all the choices were provided. */
|
|
1239
|
-
selectedVariant?: VariantData;
|
|
1240
|
-
/** Information about media items (images, videos, etc.) associated with this choice. */
|
|
1241
|
-
media?: Media;
|
|
1242
|
-
/** Options information (color, size, etc.) for this product, with the inventory and visibility fields updated based on the provided choices. */
|
|
1243
|
-
productOptions?: ProductOption[];
|
|
1244
|
-
/** Whether all the selected choices result in a visible, in-stock variant. */
|
|
1245
|
-
availableForPurchase?: boolean;
|
|
1246
|
-
}
|
|
1247
|
-
interface VariantData {
|
|
1248
|
-
/** Variant price. */
|
|
1249
|
-
price?: PriceData;
|
|
1250
|
-
/**
|
|
1251
|
-
* Variant price data converted to currency provided in header.
|
|
1252
|
-
* @readonly
|
|
1253
|
-
*/
|
|
1254
|
-
convertedPriceData?: PriceData;
|
|
1255
|
-
/** Variant weight. */
|
|
1256
|
-
weight?: number | null;
|
|
1257
|
-
/** Variant SKU (stock keeping unit). */
|
|
1258
|
-
sku?: string;
|
|
1259
|
-
/** Quantity currently in inventory (relevant only when tracking by inventory). */
|
|
1260
|
-
quantity?: number | null;
|
|
1261
|
-
/** Whether the product is currently in stock (relevant only when tracking manually). */
|
|
1262
|
-
inStock?: boolean;
|
|
1263
|
-
/** Whether the variant is visible to customers. */
|
|
1264
|
-
visible?: boolean;
|
|
1265
|
-
}
|
|
1266
|
-
interface QueryProductVariantsResponse {
|
|
1267
|
-
/** List of variants based on the specified filters and sorting. */
|
|
1268
|
-
variants?: Variant[];
|
|
1269
|
-
metadata?: PagingMetadata$1;
|
|
1270
|
-
totalResults?: number;
|
|
1271
|
-
}
|
|
1272
|
-
interface QueryStoreVariantsResponse {
|
|
1273
|
-
/** List of variants based on the specified filters and sorting. */
|
|
1274
|
-
variants?: StoreVariant[];
|
|
1275
|
-
/** Details on the paged set of results returned. */
|
|
1276
|
-
metadata?: PlatformPagingMetadata;
|
|
1277
|
-
}
|
|
1278
|
-
interface StoreVariant {
|
|
1279
|
-
/** Store variant ID. Comprised of the `productId` and the `variantId`, separated by a hyphen: {productId}.{variantId}. */
|
|
1280
|
-
_id?: string;
|
|
1281
|
-
/** Variant ID. */
|
|
1282
|
-
variantId?: string;
|
|
1283
|
-
/** Product ID. */
|
|
1284
|
-
productId?: string;
|
|
1285
|
-
/** Variant name. */
|
|
1286
|
-
variantName?: string;
|
|
1287
|
-
/** Product name. */
|
|
1288
|
-
productName?: string;
|
|
1289
|
-
/** Whether the variant is managed or represents a product. */
|
|
1290
|
-
managedVariant?: boolean;
|
|
1291
|
-
/** Variant SKU (stock keeping unit). */
|
|
1292
|
-
sku?: string;
|
|
1293
|
-
/** Variant inventory status. */
|
|
1294
|
-
stock?: VariantStock;
|
|
1295
|
-
/** The selected options of this variant. For example, `{"Color": "Blue", "Size": "Large"}`. */
|
|
1296
|
-
choices?: Record<string, string>;
|
|
1297
|
-
/** Collections that include this variant. */
|
|
1298
|
-
collectionIds?: string[];
|
|
1299
|
-
/**
|
|
1300
|
-
* Media items (images, videos) associated with this variant.
|
|
1301
|
-
* @readonly
|
|
1302
|
-
*/
|
|
1303
|
-
media?: PlatformMedia;
|
|
1304
|
-
/** Preorder information. */
|
|
1305
|
-
preorderInfo?: PreorderInfo$1;
|
|
1306
|
-
}
|
|
1307
|
-
interface PlatformMedia extends PlatformMediaMediaOneOf {
|
|
1308
|
-
image?: string;
|
|
1309
|
-
video?: string;
|
|
1310
|
-
}
|
|
1311
|
-
/** @oneof */
|
|
1312
|
-
interface PlatformMediaMediaOneOf {
|
|
1313
|
-
image?: string;
|
|
1314
|
-
video?: string;
|
|
1315
|
-
}
|
|
1316
|
-
interface PreorderInfo$1 {
|
|
1317
|
-
/** Whether the item is available for preorder. */
|
|
1318
|
-
enabled?: boolean;
|
|
1319
|
-
/** A message the buyer will see when the item is out of stock and preorder is enabled. */
|
|
1320
|
-
message?: string | null;
|
|
1321
|
-
/** Number of products that can be preordered after stock reaches zero. */
|
|
1322
|
-
limit?: number | null;
|
|
1323
|
-
}
|
|
1324
|
-
interface GetStoreVariantResponse {
|
|
1325
|
-
/** The requested store variant. */
|
|
1326
|
-
variant?: StoreVariant;
|
|
1327
|
-
}
|
|
1328
|
-
interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
|
|
1329
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
1330
|
-
anonymousVisitorId?: string;
|
|
1331
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
1332
|
-
memberId?: string;
|
|
1333
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1334
|
-
wixUserId?: string;
|
|
1335
|
-
/** ID of an app. */
|
|
1336
|
-
appId?: string;
|
|
1337
|
-
/** @readonly */
|
|
1338
|
-
identityType?: WebhookIdentityType$1;
|
|
1339
|
-
}
|
|
1340
|
-
/** @oneof */
|
|
1341
|
-
interface IdentificationDataIdOneOf$1 {
|
|
1342
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
1343
|
-
anonymousVisitorId?: string;
|
|
1344
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
1345
|
-
memberId?: string;
|
|
1346
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1347
|
-
wixUserId?: string;
|
|
1348
|
-
/** ID of an app. */
|
|
1349
|
-
appId?: string;
|
|
1350
|
-
}
|
|
1351
|
-
declare enum WebhookIdentityType$1 {
|
|
1352
|
-
UNKNOWN = "UNKNOWN",
|
|
1353
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1354
|
-
MEMBER = "MEMBER",
|
|
1355
|
-
WIX_USER = "WIX_USER",
|
|
1356
|
-
APP = "APP"
|
|
1357
|
-
}
|
|
1358
|
-
interface CreateProductResponseNonNullableFields {
|
|
1359
|
-
product?: {
|
|
1360
|
-
_id: string;
|
|
1361
|
-
slug: string;
|
|
1362
|
-
productType: ProductType;
|
|
1363
|
-
weightRange?: {
|
|
1364
|
-
minValue: number;
|
|
1365
|
-
maxValue: number;
|
|
1366
|
-
};
|
|
1367
|
-
stock?: {
|
|
1368
|
-
trackInventory: boolean;
|
|
1369
|
-
inStock: boolean;
|
|
1370
|
-
inventoryStatus: InventoryStatus;
|
|
1371
|
-
};
|
|
1372
|
-
price?: {
|
|
1373
|
-
currency: string;
|
|
1374
|
-
discountedPrice: number;
|
|
1375
|
-
formatted?: {
|
|
1376
|
-
price: string;
|
|
1377
|
-
discountedPrice: string;
|
|
1378
|
-
};
|
|
1379
|
-
};
|
|
1380
|
-
priceData?: {
|
|
1381
|
-
currency: string;
|
|
1382
|
-
discountedPrice: number;
|
|
1383
|
-
formatted?: {
|
|
1384
|
-
price: string;
|
|
1385
|
-
discountedPrice: string;
|
|
1386
|
-
};
|
|
1387
|
-
};
|
|
1388
|
-
convertedPriceData?: {
|
|
1389
|
-
currency: string;
|
|
1390
|
-
discountedPrice: number;
|
|
1391
|
-
formatted?: {
|
|
1392
|
-
price: string;
|
|
1393
|
-
discountedPrice: string;
|
|
1394
|
-
};
|
|
1395
|
-
};
|
|
1396
|
-
priceRange?: {
|
|
1397
|
-
minValue: number;
|
|
1398
|
-
maxValue: number;
|
|
1399
|
-
};
|
|
1400
|
-
costAndProfitData?: {
|
|
1401
|
-
formattedItemCost: string;
|
|
1402
|
-
profit: number;
|
|
1403
|
-
formattedProfit: string;
|
|
1404
|
-
profitMargin: number;
|
|
1405
|
-
};
|
|
1406
|
-
costRange?: {
|
|
1407
|
-
minValue: number;
|
|
1408
|
-
maxValue: number;
|
|
1409
|
-
};
|
|
1410
|
-
pricePerUnitData?: {
|
|
1411
|
-
totalQuantity: number;
|
|
1412
|
-
totalMeasurementUnit: MeasurementUnit;
|
|
1413
|
-
baseQuantity: number;
|
|
1414
|
-
baseMeasurementUnit: MeasurementUnit;
|
|
1415
|
-
};
|
|
1416
|
-
additionalInfoSections: {
|
|
1417
|
-
title: string;
|
|
1418
|
-
description: string;
|
|
1419
|
-
}[];
|
|
1420
|
-
ribbons: {
|
|
1421
|
-
text: string;
|
|
1422
|
-
}[];
|
|
1423
|
-
media?: {
|
|
1424
|
-
mainMedia?: {
|
|
1425
|
-
image?: {
|
|
1426
|
-
url: string;
|
|
1427
|
-
width: number;
|
|
1428
|
-
height: number;
|
|
1429
|
-
};
|
|
1430
|
-
video?: {
|
|
1431
|
-
files: {
|
|
1432
|
-
url: string;
|
|
1433
|
-
width: number;
|
|
1434
|
-
height: number;
|
|
1435
|
-
}[];
|
|
1436
|
-
stillFrameMediaId: string;
|
|
1437
|
-
};
|
|
1438
|
-
thumbnail?: {
|
|
1439
|
-
url: string;
|
|
1440
|
-
width: number;
|
|
1441
|
-
height: number;
|
|
1442
|
-
};
|
|
1443
|
-
mediaType: MediaItemType;
|
|
1444
|
-
title: string;
|
|
1445
|
-
_id: string;
|
|
1446
|
-
};
|
|
1447
|
-
items: {
|
|
1448
|
-
image?: {
|
|
1449
|
-
url: string;
|
|
1450
|
-
width: number;
|
|
1451
|
-
height: number;
|
|
1452
|
-
};
|
|
1453
|
-
video?: {
|
|
1454
|
-
files: {
|
|
1455
|
-
url: string;
|
|
1456
|
-
width: number;
|
|
1457
|
-
height: number;
|
|
1458
|
-
}[];
|
|
1459
|
-
stillFrameMediaId: string;
|
|
1460
|
-
};
|
|
1461
|
-
thumbnail?: {
|
|
1462
|
-
url: string;
|
|
1463
|
-
width: number;
|
|
1464
|
-
height: number;
|
|
1465
|
-
};
|
|
1466
|
-
mediaType: MediaItemType;
|
|
1467
|
-
title: string;
|
|
1468
|
-
_id: string;
|
|
1469
|
-
}[];
|
|
1470
|
-
};
|
|
1471
|
-
customTextFields: {
|
|
1472
|
-
title: string;
|
|
1473
|
-
maxLength: number;
|
|
1474
|
-
mandatory: boolean;
|
|
1475
|
-
}[];
|
|
1476
|
-
productOptions: {
|
|
1477
|
-
optionType: OptionType;
|
|
1478
|
-
name: string;
|
|
1479
|
-
choices: {
|
|
1480
|
-
value: string;
|
|
1481
|
-
description: string;
|
|
1482
|
-
media?: {
|
|
1483
|
-
mainMedia?: {
|
|
1484
|
-
image?: {
|
|
1485
|
-
url: string;
|
|
1486
|
-
width: number;
|
|
1487
|
-
height: number;
|
|
1488
|
-
};
|
|
1489
|
-
video?: {
|
|
1490
|
-
files: {
|
|
1491
|
-
url: string;
|
|
1492
|
-
width: number;
|
|
1493
|
-
height: number;
|
|
1494
|
-
}[];
|
|
1495
|
-
stillFrameMediaId: string;
|
|
1496
|
-
};
|
|
1497
|
-
thumbnail?: {
|
|
1498
|
-
url: string;
|
|
1499
|
-
width: number;
|
|
1500
|
-
height: number;
|
|
1501
|
-
};
|
|
1502
|
-
mediaType: MediaItemType;
|
|
1503
|
-
title: string;
|
|
1504
|
-
_id: string;
|
|
1505
|
-
};
|
|
1506
|
-
items: {
|
|
1507
|
-
image?: {
|
|
1508
|
-
url: string;
|
|
1509
|
-
width: number;
|
|
1510
|
-
height: number;
|
|
1511
|
-
};
|
|
1512
|
-
video?: {
|
|
1513
|
-
files: {
|
|
1514
|
-
url: string;
|
|
1515
|
-
width: number;
|
|
1516
|
-
height: number;
|
|
1517
|
-
}[];
|
|
1518
|
-
stillFrameMediaId: string;
|
|
1519
|
-
};
|
|
1520
|
-
thumbnail?: {
|
|
1521
|
-
url: string;
|
|
1522
|
-
width: number;
|
|
1523
|
-
height: number;
|
|
1524
|
-
};
|
|
1525
|
-
mediaType: MediaItemType;
|
|
1526
|
-
title: string;
|
|
1527
|
-
_id: string;
|
|
1528
|
-
}[];
|
|
1529
|
-
};
|
|
1530
|
-
inStock: boolean;
|
|
1531
|
-
visible: boolean;
|
|
1532
|
-
}[];
|
|
1533
|
-
}[];
|
|
1534
|
-
productPageUrl?: {
|
|
1535
|
-
base: string;
|
|
1536
|
-
path: string;
|
|
1537
|
-
};
|
|
1538
|
-
numericId: string;
|
|
1539
|
-
inventoryItemId: string;
|
|
1540
|
-
discount?: {
|
|
1541
|
-
type: DiscountType$1;
|
|
1542
|
-
value: number;
|
|
1543
|
-
};
|
|
1544
|
-
collectionIds: string[];
|
|
1545
|
-
variants: {
|
|
1546
|
-
_id: string;
|
|
1547
|
-
variant?: {
|
|
1548
|
-
priceData?: {
|
|
1549
|
-
currency: string;
|
|
1550
|
-
discountedPrice: number;
|
|
1551
|
-
formatted?: {
|
|
1552
|
-
price: string;
|
|
1553
|
-
discountedPrice: string;
|
|
1554
|
-
};
|
|
1555
|
-
};
|
|
1556
|
-
convertedPriceData?: {
|
|
1557
|
-
currency: string;
|
|
1558
|
-
discountedPrice: number;
|
|
1559
|
-
formatted?: {
|
|
1560
|
-
price: string;
|
|
1561
|
-
discountedPrice: string;
|
|
1562
|
-
};
|
|
1563
|
-
};
|
|
1564
|
-
costAndProfitData?: {
|
|
1565
|
-
formattedItemCost: string;
|
|
1566
|
-
profit: number;
|
|
1567
|
-
formattedProfit: string;
|
|
1568
|
-
profitMargin: number;
|
|
1569
|
-
};
|
|
1570
|
-
weight: number;
|
|
1571
|
-
sku: string;
|
|
1572
|
-
visible: boolean;
|
|
1573
|
-
};
|
|
1574
|
-
stock?: {
|
|
1575
|
-
trackQuantity: boolean;
|
|
1576
|
-
inStock: boolean;
|
|
1577
|
-
};
|
|
1578
|
-
}[];
|
|
1579
|
-
seoData?: {
|
|
1580
|
-
tags: {
|
|
1581
|
-
type: string;
|
|
1582
|
-
children: string;
|
|
1583
|
-
custom: boolean;
|
|
1584
|
-
disabled: boolean;
|
|
1585
|
-
}[];
|
|
1586
|
-
settings?: {
|
|
1587
|
-
preventAutoRedirect: boolean;
|
|
1588
|
-
keywords: {
|
|
1589
|
-
term: string;
|
|
1590
|
-
isMain: boolean;
|
|
1591
|
-
}[];
|
|
1592
|
-
};
|
|
1593
|
-
};
|
|
1594
|
-
};
|
|
1595
|
-
}
|
|
1596
|
-
interface UpdateProductResponseNonNullableFields {
|
|
1597
|
-
product?: {
|
|
1598
|
-
_id: string;
|
|
1599
|
-
slug: string;
|
|
1600
|
-
productType: ProductType;
|
|
1601
|
-
weightRange?: {
|
|
1602
|
-
minValue: number;
|
|
1603
|
-
maxValue: number;
|
|
1604
|
-
};
|
|
1605
|
-
stock?: {
|
|
1606
|
-
trackInventory: boolean;
|
|
1607
|
-
inStock: boolean;
|
|
1608
|
-
inventoryStatus: InventoryStatus;
|
|
1609
|
-
};
|
|
1610
|
-
price?: {
|
|
1611
|
-
currency: string;
|
|
1612
|
-
discountedPrice: number;
|
|
1613
|
-
formatted?: {
|
|
1614
|
-
price: string;
|
|
1615
|
-
discountedPrice: string;
|
|
1616
|
-
};
|
|
1617
|
-
};
|
|
1618
|
-
priceData?: {
|
|
1619
|
-
currency: string;
|
|
1620
|
-
discountedPrice: number;
|
|
1621
|
-
formatted?: {
|
|
1622
|
-
price: string;
|
|
1623
|
-
discountedPrice: string;
|
|
1624
|
-
};
|
|
1625
|
-
};
|
|
1626
|
-
convertedPriceData?: {
|
|
1627
|
-
currency: string;
|
|
1628
|
-
discountedPrice: number;
|
|
1629
|
-
formatted?: {
|
|
1630
|
-
price: string;
|
|
1631
|
-
discountedPrice: string;
|
|
1632
|
-
};
|
|
1633
|
-
};
|
|
1634
|
-
priceRange?: {
|
|
1635
|
-
minValue: number;
|
|
1636
|
-
maxValue: number;
|
|
1637
|
-
};
|
|
1638
|
-
costAndProfitData?: {
|
|
1639
|
-
formattedItemCost: string;
|
|
1640
|
-
profit: number;
|
|
1641
|
-
formattedProfit: string;
|
|
1642
|
-
profitMargin: number;
|
|
1643
|
-
};
|
|
1644
|
-
costRange?: {
|
|
1645
|
-
minValue: number;
|
|
1646
|
-
maxValue: number;
|
|
1647
|
-
};
|
|
1648
|
-
pricePerUnitData?: {
|
|
1649
|
-
totalQuantity: number;
|
|
1650
|
-
totalMeasurementUnit: MeasurementUnit;
|
|
1651
|
-
baseQuantity: number;
|
|
1652
|
-
baseMeasurementUnit: MeasurementUnit;
|
|
1653
|
-
};
|
|
1654
|
-
additionalInfoSections: {
|
|
1655
|
-
title: string;
|
|
1656
|
-
description: string;
|
|
1657
|
-
}[];
|
|
1658
|
-
ribbons: {
|
|
1659
|
-
text: string;
|
|
1660
|
-
}[];
|
|
1661
|
-
media?: {
|
|
1662
|
-
mainMedia?: {
|
|
1663
|
-
image?: {
|
|
1664
|
-
url: string;
|
|
1665
|
-
width: number;
|
|
1666
|
-
height: number;
|
|
1667
|
-
};
|
|
1668
|
-
video?: {
|
|
1669
|
-
files: {
|
|
1670
|
-
url: string;
|
|
1671
|
-
width: number;
|
|
1672
|
-
height: number;
|
|
1673
|
-
}[];
|
|
1674
|
-
stillFrameMediaId: string;
|
|
1675
|
-
};
|
|
1676
|
-
thumbnail?: {
|
|
1677
|
-
url: string;
|
|
1678
|
-
width: number;
|
|
1679
|
-
height: number;
|
|
1680
|
-
};
|
|
1681
|
-
mediaType: MediaItemType;
|
|
1682
|
-
title: string;
|
|
1683
|
-
_id: string;
|
|
1684
|
-
};
|
|
1685
|
-
items: {
|
|
1686
|
-
image?: {
|
|
1687
|
-
url: string;
|
|
1688
|
-
width: number;
|
|
1689
|
-
height: number;
|
|
1690
|
-
};
|
|
1691
|
-
video?: {
|
|
1692
|
-
files: {
|
|
1693
|
-
url: string;
|
|
1694
|
-
width: number;
|
|
1695
|
-
height: number;
|
|
1696
|
-
}[];
|
|
1697
|
-
stillFrameMediaId: string;
|
|
1698
|
-
};
|
|
1699
|
-
thumbnail?: {
|
|
1700
|
-
url: string;
|
|
1701
|
-
width: number;
|
|
1702
|
-
height: number;
|
|
1703
|
-
};
|
|
1704
|
-
mediaType: MediaItemType;
|
|
1705
|
-
title: string;
|
|
1706
|
-
_id: string;
|
|
1707
|
-
}[];
|
|
1708
|
-
};
|
|
1709
|
-
customTextFields: {
|
|
1710
|
-
title: string;
|
|
1711
|
-
maxLength: number;
|
|
1712
|
-
mandatory: boolean;
|
|
1713
|
-
}[];
|
|
1714
|
-
productOptions: {
|
|
1715
|
-
optionType: OptionType;
|
|
1716
|
-
name: string;
|
|
1717
|
-
choices: {
|
|
1718
|
-
value: string;
|
|
1719
|
-
description: string;
|
|
1720
|
-
media?: {
|
|
1721
|
-
mainMedia?: {
|
|
1722
|
-
image?: {
|
|
1723
|
-
url: string;
|
|
1724
|
-
width: number;
|
|
1725
|
-
height: number;
|
|
1726
|
-
};
|
|
1727
|
-
video?: {
|
|
1728
|
-
files: {
|
|
1729
|
-
url: string;
|
|
1730
|
-
width: number;
|
|
1731
|
-
height: number;
|
|
1732
|
-
}[];
|
|
1733
|
-
stillFrameMediaId: string;
|
|
1734
|
-
};
|
|
1735
|
-
thumbnail?: {
|
|
1736
|
-
url: string;
|
|
1737
|
-
width: number;
|
|
1738
|
-
height: number;
|
|
1739
|
-
};
|
|
1740
|
-
mediaType: MediaItemType;
|
|
1741
|
-
title: string;
|
|
1742
|
-
_id: string;
|
|
1743
|
-
};
|
|
1744
|
-
items: {
|
|
1745
|
-
image?: {
|
|
1746
|
-
url: string;
|
|
1747
|
-
width: number;
|
|
1748
|
-
height: number;
|
|
1749
|
-
};
|
|
1750
|
-
video?: {
|
|
1751
|
-
files: {
|
|
1752
|
-
url: string;
|
|
1753
|
-
width: number;
|
|
1754
|
-
height: number;
|
|
1755
|
-
}[];
|
|
1756
|
-
stillFrameMediaId: string;
|
|
1757
|
-
};
|
|
1758
|
-
thumbnail?: {
|
|
1759
|
-
url: string;
|
|
1760
|
-
width: number;
|
|
1761
|
-
height: number;
|
|
1762
|
-
};
|
|
1763
|
-
mediaType: MediaItemType;
|
|
1764
|
-
title: string;
|
|
1765
|
-
_id: string;
|
|
1766
|
-
}[];
|
|
1767
|
-
};
|
|
1768
|
-
inStock: boolean;
|
|
1769
|
-
visible: boolean;
|
|
1770
|
-
}[];
|
|
1771
|
-
}[];
|
|
1772
|
-
productPageUrl?: {
|
|
1773
|
-
base: string;
|
|
1774
|
-
path: string;
|
|
1775
|
-
};
|
|
1776
|
-
numericId: string;
|
|
1777
|
-
inventoryItemId: string;
|
|
1778
|
-
discount?: {
|
|
1779
|
-
type: DiscountType$1;
|
|
1780
|
-
value: number;
|
|
1781
|
-
};
|
|
1782
|
-
collectionIds: string[];
|
|
1783
|
-
variants: {
|
|
1784
|
-
_id: string;
|
|
1785
|
-
variant?: {
|
|
1786
|
-
priceData?: {
|
|
1787
|
-
currency: string;
|
|
1788
|
-
discountedPrice: number;
|
|
1789
|
-
formatted?: {
|
|
1790
|
-
price: string;
|
|
1791
|
-
discountedPrice: string;
|
|
1792
|
-
};
|
|
1793
|
-
};
|
|
1794
|
-
convertedPriceData?: {
|
|
1795
|
-
currency: string;
|
|
1796
|
-
discountedPrice: number;
|
|
1797
|
-
formatted?: {
|
|
1798
|
-
price: string;
|
|
1799
|
-
discountedPrice: string;
|
|
1800
|
-
};
|
|
1801
|
-
};
|
|
1802
|
-
costAndProfitData?: {
|
|
1803
|
-
formattedItemCost: string;
|
|
1804
|
-
profit: number;
|
|
1805
|
-
formattedProfit: string;
|
|
1806
|
-
profitMargin: number;
|
|
1807
|
-
};
|
|
1808
|
-
weight: number;
|
|
1809
|
-
sku: string;
|
|
1810
|
-
visible: boolean;
|
|
1811
|
-
};
|
|
1812
|
-
stock?: {
|
|
1813
|
-
trackQuantity: boolean;
|
|
1814
|
-
inStock: boolean;
|
|
1815
|
-
};
|
|
1816
|
-
}[];
|
|
1817
|
-
seoData?: {
|
|
1818
|
-
tags: {
|
|
1819
|
-
type: string;
|
|
1820
|
-
children: string;
|
|
1821
|
-
custom: boolean;
|
|
1822
|
-
disabled: boolean;
|
|
1823
|
-
}[];
|
|
1824
|
-
settings?: {
|
|
1825
|
-
preventAutoRedirect: boolean;
|
|
1826
|
-
keywords: {
|
|
1827
|
-
term: string;
|
|
1828
|
-
isMain: boolean;
|
|
1829
|
-
}[];
|
|
1830
|
-
};
|
|
1831
|
-
};
|
|
1832
|
-
};
|
|
1833
|
-
}
|
|
1834
|
-
interface UpdateVariantsResponseNonNullableFields {
|
|
1835
|
-
variants: {
|
|
1836
|
-
_id: string;
|
|
1837
|
-
variant?: {
|
|
1838
|
-
priceData?: {
|
|
1839
|
-
currency: string;
|
|
1840
|
-
discountedPrice: number;
|
|
1841
|
-
formatted?: {
|
|
1842
|
-
price: string;
|
|
1843
|
-
discountedPrice: string;
|
|
1844
|
-
};
|
|
1845
|
-
};
|
|
1846
|
-
convertedPriceData?: {
|
|
1847
|
-
currency: string;
|
|
1848
|
-
discountedPrice: number;
|
|
1849
|
-
formatted?: {
|
|
1850
|
-
price: string;
|
|
1851
|
-
discountedPrice: string;
|
|
1852
|
-
};
|
|
1853
|
-
};
|
|
1854
|
-
costAndProfitData?: {
|
|
1855
|
-
formattedItemCost: string;
|
|
1856
|
-
profit: number;
|
|
1857
|
-
formattedProfit: string;
|
|
1858
|
-
profitMargin: number;
|
|
1859
|
-
};
|
|
1860
|
-
weight: number;
|
|
1861
|
-
sku: string;
|
|
1862
|
-
visible: boolean;
|
|
1863
|
-
};
|
|
1864
|
-
stock?: {
|
|
1865
|
-
trackQuantity: boolean;
|
|
1866
|
-
inStock: boolean;
|
|
1867
|
-
};
|
|
1868
|
-
}[];
|
|
1869
|
-
}
|
|
1870
|
-
interface CreateCollectionResponseNonNullableFields {
|
|
1871
|
-
collection?: {
|
|
1872
|
-
media?: {
|
|
1873
|
-
mainMedia?: {
|
|
1874
|
-
image?: {
|
|
1875
|
-
url: string;
|
|
1876
|
-
width: number;
|
|
1877
|
-
height: number;
|
|
1878
|
-
};
|
|
1879
|
-
video?: {
|
|
1880
|
-
files: {
|
|
1881
|
-
url: string;
|
|
1882
|
-
width: number;
|
|
1883
|
-
height: number;
|
|
1884
|
-
}[];
|
|
1885
|
-
stillFrameMediaId: string;
|
|
1886
|
-
};
|
|
1887
|
-
thumbnail?: {
|
|
1888
|
-
url: string;
|
|
1889
|
-
width: number;
|
|
1890
|
-
height: number;
|
|
1891
|
-
};
|
|
1892
|
-
mediaType: MediaItemType;
|
|
1893
|
-
title: string;
|
|
1894
|
-
_id: string;
|
|
1895
|
-
};
|
|
1896
|
-
items: {
|
|
1897
|
-
image?: {
|
|
1898
|
-
url: string;
|
|
1899
|
-
width: number;
|
|
1900
|
-
height: number;
|
|
1901
|
-
};
|
|
1902
|
-
video?: {
|
|
1903
|
-
files: {
|
|
1904
|
-
url: string;
|
|
1905
|
-
width: number;
|
|
1906
|
-
height: number;
|
|
1907
|
-
}[];
|
|
1908
|
-
stillFrameMediaId: string;
|
|
1909
|
-
};
|
|
1910
|
-
thumbnail?: {
|
|
1911
|
-
url: string;
|
|
1912
|
-
width: number;
|
|
1913
|
-
height: number;
|
|
1914
|
-
};
|
|
1915
|
-
mediaType: MediaItemType;
|
|
1916
|
-
title: string;
|
|
1917
|
-
_id: string;
|
|
1918
|
-
}[];
|
|
1919
|
-
};
|
|
1920
|
-
numberOfProducts: number;
|
|
1921
|
-
};
|
|
1922
|
-
}
|
|
1923
|
-
interface UpdateCollectionResponseNonNullableFields {
|
|
1924
|
-
collection?: {
|
|
1925
|
-
media?: {
|
|
1926
|
-
mainMedia?: {
|
|
1927
|
-
image?: {
|
|
1928
|
-
url: string;
|
|
1929
|
-
width: number;
|
|
1930
|
-
height: number;
|
|
1931
|
-
};
|
|
1932
|
-
video?: {
|
|
1933
|
-
files: {
|
|
1934
|
-
url: string;
|
|
1935
|
-
width: number;
|
|
1936
|
-
height: number;
|
|
1937
|
-
}[];
|
|
1938
|
-
stillFrameMediaId: string;
|
|
1939
|
-
};
|
|
1940
|
-
thumbnail?: {
|
|
1941
|
-
url: string;
|
|
1942
|
-
width: number;
|
|
1943
|
-
height: number;
|
|
1944
|
-
};
|
|
1945
|
-
mediaType: MediaItemType;
|
|
1946
|
-
title: string;
|
|
1947
|
-
_id: string;
|
|
1948
|
-
};
|
|
1949
|
-
items: {
|
|
1950
|
-
image?: {
|
|
1951
|
-
url: string;
|
|
1952
|
-
width: number;
|
|
1953
|
-
height: number;
|
|
1954
|
-
};
|
|
1955
|
-
video?: {
|
|
1956
|
-
files: {
|
|
1957
|
-
url: string;
|
|
1958
|
-
width: number;
|
|
1959
|
-
height: number;
|
|
1960
|
-
}[];
|
|
1961
|
-
stillFrameMediaId: string;
|
|
1962
|
-
};
|
|
1963
|
-
thumbnail?: {
|
|
1964
|
-
url: string;
|
|
1965
|
-
width: number;
|
|
1966
|
-
height: number;
|
|
1967
|
-
};
|
|
1968
|
-
mediaType: MediaItemType;
|
|
1969
|
-
title: string;
|
|
1970
|
-
_id: string;
|
|
1971
|
-
}[];
|
|
1972
|
-
};
|
|
1973
|
-
numberOfProducts: number;
|
|
1974
|
-
};
|
|
1975
|
-
}
|
|
1976
|
-
interface BulkUpdateProductsResponseNonNullableFields {
|
|
1977
|
-
results: {
|
|
1978
|
-
itemMetadata?: {
|
|
1979
|
-
originalIndex: number;
|
|
1980
|
-
success: boolean;
|
|
1981
|
-
error?: {
|
|
1982
|
-
code: string;
|
|
1983
|
-
description: string;
|
|
1984
|
-
};
|
|
1985
|
-
};
|
|
1986
|
-
}[];
|
|
1987
|
-
bulkActionMetadata?: {
|
|
1988
|
-
totalSuccesses: number;
|
|
1989
|
-
totalFailures: number;
|
|
1990
|
-
undetailedFailures: number;
|
|
1991
|
-
};
|
|
1992
|
-
}
|
|
1993
|
-
interface BulkAdjustProductPropertiesResponseNonNullableFields {
|
|
1994
|
-
results: {
|
|
1995
|
-
itemMetadata?: {
|
|
1996
|
-
originalIndex: number;
|
|
1997
|
-
success: boolean;
|
|
1998
|
-
error?: {
|
|
1999
|
-
code: string;
|
|
2000
|
-
description: string;
|
|
2001
|
-
};
|
|
2002
|
-
};
|
|
2003
|
-
}[];
|
|
2004
|
-
bulkActionMetadata?: {
|
|
2005
|
-
totalSuccesses: number;
|
|
2006
|
-
totalFailures: number;
|
|
2007
|
-
undetailedFailures: number;
|
|
2008
|
-
};
|
|
2009
|
-
}
|
|
2010
|
-
interface GetProductResponseNonNullableFields {
|
|
2011
|
-
product?: {
|
|
2012
|
-
_id: string;
|
|
2013
|
-
slug: string;
|
|
2014
|
-
productType: ProductType;
|
|
2015
|
-
weightRange?: {
|
|
2016
|
-
minValue: number;
|
|
2017
|
-
maxValue: number;
|
|
2018
|
-
};
|
|
2019
|
-
stock?: {
|
|
2020
|
-
trackInventory: boolean;
|
|
2021
|
-
inStock: boolean;
|
|
2022
|
-
inventoryStatus: InventoryStatus;
|
|
2023
|
-
};
|
|
2024
|
-
price?: {
|
|
2025
|
-
currency: string;
|
|
2026
|
-
discountedPrice: number;
|
|
2027
|
-
formatted?: {
|
|
2028
|
-
price: string;
|
|
2029
|
-
discountedPrice: string;
|
|
2030
|
-
};
|
|
2031
|
-
};
|
|
2032
|
-
priceData?: {
|
|
2033
|
-
currency: string;
|
|
2034
|
-
discountedPrice: number;
|
|
2035
|
-
formatted?: {
|
|
2036
|
-
price: string;
|
|
2037
|
-
discountedPrice: string;
|
|
2038
|
-
};
|
|
2039
|
-
};
|
|
2040
|
-
convertedPriceData?: {
|
|
2041
|
-
currency: string;
|
|
2042
|
-
discountedPrice: number;
|
|
2043
|
-
formatted?: {
|
|
2044
|
-
price: string;
|
|
2045
|
-
discountedPrice: string;
|
|
2046
|
-
};
|
|
2047
|
-
};
|
|
2048
|
-
priceRange?: {
|
|
2049
|
-
minValue: number;
|
|
2050
|
-
maxValue: number;
|
|
2051
|
-
};
|
|
2052
|
-
costAndProfitData?: {
|
|
2053
|
-
formattedItemCost: string;
|
|
2054
|
-
profit: number;
|
|
2055
|
-
formattedProfit: string;
|
|
2056
|
-
profitMargin: number;
|
|
2057
|
-
};
|
|
2058
|
-
costRange?: {
|
|
2059
|
-
minValue: number;
|
|
2060
|
-
maxValue: number;
|
|
2061
|
-
};
|
|
2062
|
-
pricePerUnitData?: {
|
|
2063
|
-
totalQuantity: number;
|
|
2064
|
-
totalMeasurementUnit: MeasurementUnit;
|
|
2065
|
-
baseQuantity: number;
|
|
2066
|
-
baseMeasurementUnit: MeasurementUnit;
|
|
2067
|
-
};
|
|
2068
|
-
additionalInfoSections: {
|
|
2069
|
-
title: string;
|
|
2070
|
-
description: string;
|
|
2071
|
-
}[];
|
|
2072
|
-
ribbons: {
|
|
2073
|
-
text: string;
|
|
2074
|
-
}[];
|
|
2075
|
-
media?: {
|
|
2076
|
-
mainMedia?: {
|
|
2077
|
-
image?: {
|
|
2078
|
-
url: string;
|
|
2079
|
-
width: number;
|
|
2080
|
-
height: number;
|
|
2081
|
-
};
|
|
2082
|
-
video?: {
|
|
2083
|
-
files: {
|
|
2084
|
-
url: string;
|
|
2085
|
-
width: number;
|
|
2086
|
-
height: number;
|
|
2087
|
-
}[];
|
|
2088
|
-
stillFrameMediaId: string;
|
|
2089
|
-
};
|
|
2090
|
-
thumbnail?: {
|
|
2091
|
-
url: string;
|
|
2092
|
-
width: number;
|
|
2093
|
-
height: number;
|
|
2094
|
-
};
|
|
2095
|
-
mediaType: MediaItemType;
|
|
2096
|
-
title: string;
|
|
2097
|
-
_id: string;
|
|
2098
|
-
};
|
|
2099
|
-
items: {
|
|
2100
|
-
image?: {
|
|
2101
|
-
url: string;
|
|
2102
|
-
width: number;
|
|
2103
|
-
height: number;
|
|
2104
|
-
};
|
|
2105
|
-
video?: {
|
|
2106
|
-
files: {
|
|
2107
|
-
url: string;
|
|
2108
|
-
width: number;
|
|
2109
|
-
height: number;
|
|
2110
|
-
}[];
|
|
2111
|
-
stillFrameMediaId: string;
|
|
2112
|
-
};
|
|
2113
|
-
thumbnail?: {
|
|
2114
|
-
url: string;
|
|
2115
|
-
width: number;
|
|
2116
|
-
height: number;
|
|
2117
|
-
};
|
|
2118
|
-
mediaType: MediaItemType;
|
|
2119
|
-
title: string;
|
|
2120
|
-
_id: string;
|
|
2121
|
-
}[];
|
|
2122
|
-
};
|
|
2123
|
-
customTextFields: {
|
|
2124
|
-
title: string;
|
|
2125
|
-
maxLength: number;
|
|
2126
|
-
mandatory: boolean;
|
|
2127
|
-
}[];
|
|
2128
|
-
productOptions: {
|
|
2129
|
-
optionType: OptionType;
|
|
2130
|
-
name: string;
|
|
2131
|
-
choices: {
|
|
2132
|
-
value: string;
|
|
2133
|
-
description: string;
|
|
2134
|
-
media?: {
|
|
2135
|
-
mainMedia?: {
|
|
2136
|
-
image?: {
|
|
2137
|
-
url: string;
|
|
2138
|
-
width: number;
|
|
2139
|
-
height: number;
|
|
2140
|
-
};
|
|
2141
|
-
video?: {
|
|
2142
|
-
files: {
|
|
2143
|
-
url: string;
|
|
2144
|
-
width: number;
|
|
2145
|
-
height: number;
|
|
2146
|
-
}[];
|
|
2147
|
-
stillFrameMediaId: string;
|
|
2148
|
-
};
|
|
2149
|
-
thumbnail?: {
|
|
2150
|
-
url: string;
|
|
2151
|
-
width: number;
|
|
2152
|
-
height: number;
|
|
2153
|
-
};
|
|
2154
|
-
mediaType: MediaItemType;
|
|
2155
|
-
title: string;
|
|
2156
|
-
_id: string;
|
|
2157
|
-
};
|
|
2158
|
-
items: {
|
|
2159
|
-
image?: {
|
|
2160
|
-
url: string;
|
|
2161
|
-
width: number;
|
|
2162
|
-
height: number;
|
|
2163
|
-
};
|
|
2164
|
-
video?: {
|
|
2165
|
-
files: {
|
|
2166
|
-
url: string;
|
|
2167
|
-
width: number;
|
|
2168
|
-
height: number;
|
|
2169
|
-
}[];
|
|
2170
|
-
stillFrameMediaId: string;
|
|
2171
|
-
};
|
|
2172
|
-
thumbnail?: {
|
|
2173
|
-
url: string;
|
|
2174
|
-
width: number;
|
|
2175
|
-
height: number;
|
|
2176
|
-
};
|
|
2177
|
-
mediaType: MediaItemType;
|
|
2178
|
-
title: string;
|
|
2179
|
-
_id: string;
|
|
2180
|
-
}[];
|
|
2181
|
-
};
|
|
2182
|
-
inStock: boolean;
|
|
2183
|
-
visible: boolean;
|
|
2184
|
-
}[];
|
|
2185
|
-
}[];
|
|
2186
|
-
productPageUrl?: {
|
|
2187
|
-
base: string;
|
|
2188
|
-
path: string;
|
|
2189
|
-
};
|
|
2190
|
-
numericId: string;
|
|
2191
|
-
inventoryItemId: string;
|
|
2192
|
-
discount?: {
|
|
2193
|
-
type: DiscountType$1;
|
|
2194
|
-
value: number;
|
|
2195
|
-
};
|
|
2196
|
-
collectionIds: string[];
|
|
2197
|
-
variants: {
|
|
2198
|
-
_id: string;
|
|
2199
|
-
variant?: {
|
|
2200
|
-
priceData?: {
|
|
2201
|
-
currency: string;
|
|
2202
|
-
discountedPrice: number;
|
|
2203
|
-
formatted?: {
|
|
2204
|
-
price: string;
|
|
2205
|
-
discountedPrice: string;
|
|
2206
|
-
};
|
|
2207
|
-
};
|
|
2208
|
-
convertedPriceData?: {
|
|
2209
|
-
currency: string;
|
|
2210
|
-
discountedPrice: number;
|
|
2211
|
-
formatted?: {
|
|
2212
|
-
price: string;
|
|
2213
|
-
discountedPrice: string;
|
|
2214
|
-
};
|
|
2215
|
-
};
|
|
2216
|
-
costAndProfitData?: {
|
|
2217
|
-
formattedItemCost: string;
|
|
2218
|
-
profit: number;
|
|
2219
|
-
formattedProfit: string;
|
|
2220
|
-
profitMargin: number;
|
|
2221
|
-
};
|
|
2222
|
-
weight: number;
|
|
2223
|
-
sku: string;
|
|
2224
|
-
visible: boolean;
|
|
2225
|
-
};
|
|
2226
|
-
stock?: {
|
|
2227
|
-
trackQuantity: boolean;
|
|
2228
|
-
inStock: boolean;
|
|
2229
|
-
};
|
|
2230
|
-
}[];
|
|
2231
|
-
seoData?: {
|
|
2232
|
-
tags: {
|
|
2233
|
-
type: string;
|
|
2234
|
-
children: string;
|
|
2235
|
-
custom: boolean;
|
|
2236
|
-
disabled: boolean;
|
|
2237
|
-
}[];
|
|
2238
|
-
settings?: {
|
|
2239
|
-
preventAutoRedirect: boolean;
|
|
2240
|
-
keywords: {
|
|
2241
|
-
term: string;
|
|
2242
|
-
isMain: boolean;
|
|
2243
|
-
}[];
|
|
2244
|
-
};
|
|
2245
|
-
};
|
|
2246
|
-
};
|
|
2247
|
-
}
|
|
2248
|
-
interface GetCollectionBySlugResponseNonNullableFields {
|
|
2249
|
-
collection?: {
|
|
2250
|
-
media?: {
|
|
2251
|
-
mainMedia?: {
|
|
2252
|
-
image?: {
|
|
2253
|
-
url: string;
|
|
2254
|
-
width: number;
|
|
2255
|
-
height: number;
|
|
2256
|
-
};
|
|
2257
|
-
video?: {
|
|
2258
|
-
files: {
|
|
2259
|
-
url: string;
|
|
2260
|
-
width: number;
|
|
2261
|
-
height: number;
|
|
2262
|
-
}[];
|
|
2263
|
-
stillFrameMediaId: string;
|
|
2264
|
-
};
|
|
2265
|
-
thumbnail?: {
|
|
2266
|
-
url: string;
|
|
2267
|
-
width: number;
|
|
2268
|
-
height: number;
|
|
2269
|
-
};
|
|
2270
|
-
mediaType: MediaItemType;
|
|
2271
|
-
title: string;
|
|
2272
|
-
_id: string;
|
|
2273
|
-
};
|
|
2274
|
-
items: {
|
|
2275
|
-
image?: {
|
|
2276
|
-
url: string;
|
|
2277
|
-
width: number;
|
|
2278
|
-
height: number;
|
|
2279
|
-
};
|
|
2280
|
-
video?: {
|
|
2281
|
-
files: {
|
|
2282
|
-
url: string;
|
|
2283
|
-
width: number;
|
|
2284
|
-
height: number;
|
|
2285
|
-
}[];
|
|
2286
|
-
stillFrameMediaId: string;
|
|
2287
|
-
};
|
|
2288
|
-
thumbnail?: {
|
|
2289
|
-
url: string;
|
|
2290
|
-
width: number;
|
|
2291
|
-
height: number;
|
|
2292
|
-
};
|
|
2293
|
-
mediaType: MediaItemType;
|
|
2294
|
-
title: string;
|
|
2295
|
-
_id: string;
|
|
2296
|
-
}[];
|
|
2297
|
-
};
|
|
2298
|
-
numberOfProducts: number;
|
|
2299
|
-
};
|
|
2300
|
-
}
|
|
2301
|
-
interface ProductOptionsAvailabilityResponseNonNullableFields {
|
|
2302
|
-
selectedVariant?: {
|
|
2303
|
-
price?: {
|
|
2304
|
-
currency: string;
|
|
2305
|
-
discountedPrice: number;
|
|
2306
|
-
formatted?: {
|
|
2307
|
-
price: string;
|
|
2308
|
-
discountedPrice: string;
|
|
2309
|
-
};
|
|
2310
|
-
};
|
|
2311
|
-
convertedPriceData?: {
|
|
2312
|
-
currency: string;
|
|
2313
|
-
discountedPrice: number;
|
|
2314
|
-
formatted?: {
|
|
2315
|
-
price: string;
|
|
2316
|
-
discountedPrice: string;
|
|
2317
|
-
};
|
|
2318
|
-
};
|
|
2319
|
-
sku: string;
|
|
2320
|
-
inStock: boolean;
|
|
2321
|
-
visible: boolean;
|
|
2322
|
-
};
|
|
2323
|
-
media?: {
|
|
2324
|
-
mainMedia?: {
|
|
2325
|
-
image?: {
|
|
2326
|
-
url: string;
|
|
2327
|
-
width: number;
|
|
2328
|
-
height: number;
|
|
2329
|
-
};
|
|
2330
|
-
video?: {
|
|
2331
|
-
files: {
|
|
2332
|
-
url: string;
|
|
2333
|
-
width: number;
|
|
2334
|
-
height: number;
|
|
2335
|
-
}[];
|
|
2336
|
-
stillFrameMediaId: string;
|
|
2337
|
-
};
|
|
2338
|
-
thumbnail?: {
|
|
2339
|
-
url: string;
|
|
2340
|
-
width: number;
|
|
2341
|
-
height: number;
|
|
2342
|
-
};
|
|
2343
|
-
mediaType: MediaItemType;
|
|
2344
|
-
title: string;
|
|
2345
|
-
_id: string;
|
|
2346
|
-
};
|
|
2347
|
-
items: {
|
|
2348
|
-
image?: {
|
|
2349
|
-
url: string;
|
|
2350
|
-
width: number;
|
|
2351
|
-
height: number;
|
|
2352
|
-
};
|
|
2353
|
-
video?: {
|
|
2354
|
-
files: {
|
|
2355
|
-
url: string;
|
|
2356
|
-
width: number;
|
|
2357
|
-
height: number;
|
|
2358
|
-
}[];
|
|
2359
|
-
stillFrameMediaId: string;
|
|
2360
|
-
};
|
|
2361
|
-
thumbnail?: {
|
|
2362
|
-
url: string;
|
|
2363
|
-
width: number;
|
|
2364
|
-
height: number;
|
|
2365
|
-
};
|
|
2366
|
-
mediaType: MediaItemType;
|
|
2367
|
-
title: string;
|
|
2368
|
-
_id: string;
|
|
2369
|
-
}[];
|
|
2370
|
-
};
|
|
2371
|
-
productOptions: {
|
|
2372
|
-
optionType: OptionType;
|
|
2373
|
-
name: string;
|
|
2374
|
-
choices: {
|
|
2375
|
-
value: string;
|
|
2376
|
-
description: string;
|
|
2377
|
-
media?: {
|
|
2378
|
-
mainMedia?: {
|
|
2379
|
-
image?: {
|
|
2380
|
-
url: string;
|
|
2381
|
-
width: number;
|
|
2382
|
-
height: number;
|
|
2383
|
-
};
|
|
2384
|
-
video?: {
|
|
2385
|
-
files: {
|
|
2386
|
-
url: string;
|
|
2387
|
-
width: number;
|
|
2388
|
-
height: number;
|
|
2389
|
-
}[];
|
|
2390
|
-
stillFrameMediaId: string;
|
|
2391
|
-
};
|
|
2392
|
-
thumbnail?: {
|
|
2393
|
-
url: string;
|
|
2394
|
-
width: number;
|
|
2395
|
-
height: number;
|
|
2396
|
-
};
|
|
2397
|
-
mediaType: MediaItemType;
|
|
2398
|
-
title: string;
|
|
2399
|
-
_id: string;
|
|
2400
|
-
};
|
|
2401
|
-
items: {
|
|
2402
|
-
image?: {
|
|
2403
|
-
url: string;
|
|
2404
|
-
width: number;
|
|
2405
|
-
height: number;
|
|
2406
|
-
};
|
|
2407
|
-
video?: {
|
|
2408
|
-
files: {
|
|
2409
|
-
url: string;
|
|
2410
|
-
width: number;
|
|
2411
|
-
height: number;
|
|
2412
|
-
}[];
|
|
2413
|
-
stillFrameMediaId: string;
|
|
2414
|
-
};
|
|
2415
|
-
thumbnail?: {
|
|
2416
|
-
url: string;
|
|
2417
|
-
width: number;
|
|
2418
|
-
height: number;
|
|
2419
|
-
};
|
|
2420
|
-
mediaType: MediaItemType;
|
|
2421
|
-
title: string;
|
|
2422
|
-
_id: string;
|
|
2423
|
-
}[];
|
|
2424
|
-
};
|
|
2425
|
-
inStock: boolean;
|
|
2426
|
-
visible: boolean;
|
|
2427
|
-
}[];
|
|
2428
|
-
}[];
|
|
2429
|
-
availableForPurchase: boolean;
|
|
2430
|
-
}
|
|
2431
|
-
interface QueryProductVariantsResponseNonNullableFields {
|
|
2432
|
-
variants: {
|
|
2433
|
-
_id: string;
|
|
2434
|
-
variant?: {
|
|
2435
|
-
priceData?: {
|
|
2436
|
-
currency: string;
|
|
2437
|
-
discountedPrice: number;
|
|
2438
|
-
formatted?: {
|
|
2439
|
-
price: string;
|
|
2440
|
-
discountedPrice: string;
|
|
2441
|
-
};
|
|
2442
|
-
};
|
|
2443
|
-
convertedPriceData?: {
|
|
2444
|
-
currency: string;
|
|
2445
|
-
discountedPrice: number;
|
|
2446
|
-
formatted?: {
|
|
2447
|
-
price: string;
|
|
2448
|
-
discountedPrice: string;
|
|
2449
|
-
};
|
|
2450
|
-
};
|
|
2451
|
-
costAndProfitData?: {
|
|
2452
|
-
formattedItemCost: string;
|
|
2453
|
-
profit: number;
|
|
2454
|
-
formattedProfit: string;
|
|
2455
|
-
profitMargin: number;
|
|
2456
|
-
};
|
|
2457
|
-
weight: number;
|
|
2458
|
-
sku: string;
|
|
2459
|
-
visible: boolean;
|
|
2460
|
-
};
|
|
2461
|
-
stock?: {
|
|
2462
|
-
trackQuantity: boolean;
|
|
2463
|
-
inStock: boolean;
|
|
2464
|
-
};
|
|
2465
|
-
}[];
|
|
2466
|
-
metadata?: {
|
|
2467
|
-
items: number;
|
|
2468
|
-
offset: number;
|
|
2469
|
-
};
|
|
2470
|
-
totalResults: number;
|
|
2471
|
-
}
|
|
2472
|
-
interface QueryStoreVariantsResponseNonNullableFields {
|
|
2473
|
-
variants: {
|
|
2474
|
-
_id: string;
|
|
2475
|
-
variantId: string;
|
|
2476
|
-
productId: string;
|
|
2477
|
-
variantName: string;
|
|
2478
|
-
productName: string;
|
|
2479
|
-
managedVariant: boolean;
|
|
2480
|
-
sku: string;
|
|
2481
|
-
stock?: {
|
|
2482
|
-
trackQuantity: boolean;
|
|
2483
|
-
inStock: boolean;
|
|
2484
|
-
};
|
|
2485
|
-
collectionIds: string[];
|
|
2486
|
-
media?: {
|
|
2487
|
-
image: string;
|
|
2488
|
-
video: string;
|
|
2489
|
-
};
|
|
2490
|
-
preorderInfo?: {
|
|
2491
|
-
enabled: boolean;
|
|
2492
|
-
};
|
|
2493
|
-
}[];
|
|
2494
|
-
}
|
|
2495
|
-
interface GetStoreVariantResponseNonNullableFields {
|
|
2496
|
-
variant?: {
|
|
2497
|
-
_id: string;
|
|
2498
|
-
variantId: string;
|
|
2499
|
-
productId: string;
|
|
2500
|
-
variantName: string;
|
|
2501
|
-
productName: string;
|
|
2502
|
-
managedVariant: boolean;
|
|
2503
|
-
sku: string;
|
|
2504
|
-
stock?: {
|
|
2505
|
-
trackQuantity: boolean;
|
|
2506
|
-
inStock: boolean;
|
|
2507
|
-
};
|
|
2508
|
-
collectionIds: string[];
|
|
2509
|
-
media?: {
|
|
2510
|
-
image: string;
|
|
2511
|
-
video: string;
|
|
2512
|
-
};
|
|
2513
|
-
preorderInfo?: {
|
|
2514
|
-
enabled: boolean;
|
|
2515
|
-
};
|
|
2516
|
-
};
|
|
2517
|
-
}
|
|
2518
|
-
interface BaseEventMetadata$1 {
|
|
2519
|
-
/** App instance ID. */
|
|
2520
|
-
instanceId?: string | null;
|
|
2521
|
-
/** Event type. */
|
|
2522
|
-
eventType?: string;
|
|
2523
|
-
/** The identification type and identity data. */
|
|
2524
|
-
identity?: IdentificationData$1;
|
|
2525
|
-
}
|
|
2526
|
-
interface ProductCreatedEnvelope {
|
|
2527
|
-
data: ProductCreated;
|
|
2528
|
-
metadata: BaseEventMetadata$1;
|
|
2529
|
-
}
|
|
2530
|
-
interface ProductChangedEnvelope {
|
|
2531
|
-
data: ProductChanged;
|
|
2532
|
-
metadata: BaseEventMetadata$1;
|
|
2533
|
-
}
|
|
2534
|
-
interface ProductDeletedEnvelope {
|
|
2535
|
-
data: ProductDeleted;
|
|
2536
|
-
metadata: BaseEventMetadata$1;
|
|
2537
|
-
}
|
|
2538
|
-
interface ProductCollectionCreatedEnvelope {
|
|
2539
|
-
data: CollectionCreated;
|
|
2540
|
-
metadata: BaseEventMetadata$1;
|
|
2541
|
-
}
|
|
2542
|
-
interface ProductCollectionChangedEnvelope {
|
|
2543
|
-
data: CollectionChanged;
|
|
2544
|
-
metadata: BaseEventMetadata$1;
|
|
2545
|
-
}
|
|
2546
|
-
interface ProductCollectionDeletedEnvelope {
|
|
2547
|
-
data: CollectionDeleted;
|
|
2548
|
-
metadata: BaseEventMetadata$1;
|
|
2549
|
-
}
|
|
2550
|
-
interface ProductVariantsChangedEnvelope {
|
|
2551
|
-
data: VariantsChanged;
|
|
2552
|
-
metadata: BaseEventMetadata$1;
|
|
2553
|
-
}
|
|
2554
|
-
interface UpdateProduct {
|
|
2555
|
-
/**
|
|
2556
|
-
* Product ID (generated automatically by the catalog).
|
|
2557
|
-
* @readonly
|
|
2558
|
-
*/
|
|
2559
|
-
_id?: string;
|
|
2560
|
-
/**
|
|
2561
|
-
* Product name.
|
|
2562
|
-
*
|
|
2563
|
-
* Min: 1 character
|
|
2564
|
-
* Max: 80 characters
|
|
2565
|
-
*/
|
|
2566
|
-
name?: string | null;
|
|
2567
|
-
/** A friendly URL name (generated automatically by the catalog when a product is created), can be updated. */
|
|
2568
|
-
slug?: string;
|
|
2569
|
-
/** Whether the product is visible to site visitors. */
|
|
2570
|
-
visible?: boolean | null;
|
|
2571
|
-
/** Currently, only creating physical products ( `"productType": "physical"` ) is supported via the API. */
|
|
2572
|
-
productType?: ProductType;
|
|
2573
|
-
/** Product description. */
|
|
2574
|
-
description?: string | null;
|
|
2575
|
-
/** Stock keeping unit. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, SKUs will be set per variant, and this field will be empty. */
|
|
2576
|
-
sku?: string | null;
|
|
2577
|
-
/** Product weight. If [variant management](https://support.wix.com/en/article/wix-stores-adding-and-customizing-product-options#setting-different-prices-for-variants) is enabled, weight will be set per variant, and this field will be empty. */
|
|
2578
|
-
weight?: number | null;
|
|
2579
|
-
/**
|
|
2580
|
-
* Product weight range. The minimum and maximum weights of all the variants.
|
|
2581
|
-
* @readonly
|
|
2582
|
-
*/
|
|
2583
|
-
weightRange?: NumericPropertyRange;
|
|
2584
|
-
/**
|
|
2585
|
-
* Product inventory status (in future this will be writable via Inventory API).
|
|
2586
|
-
* @readonly
|
|
2587
|
-
*/
|
|
2588
|
-
stock?: Stock;
|
|
2589
|
-
/**
|
|
2590
|
-
* Deprecated (use `priceData` instead).
|
|
2591
|
-
* @readonly
|
|
2592
|
-
* @deprecated
|
|
2593
|
-
*/
|
|
2594
|
-
price?: PriceData;
|
|
2595
|
-
/** Price data. */
|
|
2596
|
-
priceData?: PriceData;
|
|
2597
|
-
/**
|
|
2598
|
-
* Price data, converted to the currency specified in request header.
|
|
2599
|
-
* @readonly
|
|
2600
|
-
*/
|
|
2601
|
-
convertedPriceData?: PriceData;
|
|
2602
|
-
/**
|
|
2603
|
-
* Product price range. The minimum and maximum prices of all the variants.
|
|
2604
|
-
* @readonly
|
|
2605
|
-
*/
|
|
2606
|
-
priceRange?: NumericPropertyRange;
|
|
2607
|
-
/** Cost and profit data. */
|
|
2608
|
-
costAndProfitData?: CostAndProfitData;
|
|
2609
|
-
/**
|
|
2610
|
-
* Product cost range. The minimum and maximum costs of all the variants.
|
|
2611
|
-
* @readonly
|
|
2612
|
-
*/
|
|
2613
|
-
costRange?: NumericPropertyRange;
|
|
2614
|
-
/** Price per unit data. */
|
|
2615
|
-
pricePerUnitData?: PricePerUnitData;
|
|
2616
|
-
/** Additional text that the store owner can assign to the product (e.g. shipping details, refund policy, etc.). */
|
|
2617
|
-
additionalInfoSections?: AdditionalInfoSection[];
|
|
2618
|
-
/**
|
|
2619
|
-
* Deprecated (use `ribbon` instead).
|
|
2620
|
-
* @readonly
|
|
2621
|
-
* @deprecated
|
|
2622
|
-
*/
|
|
2623
|
-
ribbons?: Ribbon[];
|
|
2624
|
-
/**
|
|
2625
|
-
* 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).
|
|
2626
|
-
* @readonly
|
|
2627
|
-
*/
|
|
2628
|
-
media?: Media;
|
|
2629
|
-
/**
|
|
2630
|
-
* Text box for the customer to add a message to their order (e.g., customization request). Currently writable only from the UI.
|
|
2631
|
-
* @readonly
|
|
2632
|
-
*/
|
|
2633
|
-
customTextFields?: CustomTextField[];
|
|
2634
|
-
/** Whether variants are being managed for this product - enables unique SKU, price and weight per variant. Also affects inventory data. Once set to `true`, can be reset to `false` only if no variants exist. You cannot set `manageVariants` to `true` if more than 300 variants are defined. */
|
|
2635
|
-
manageVariants?: boolean | null;
|
|
2636
|
-
/** Options for this product. */
|
|
2637
|
-
productOptions?: ProductOption[];
|
|
2638
|
-
/**
|
|
2639
|
-
* Product page URL for this product (generated automatically by the server).
|
|
2640
|
-
* @readonly
|
|
2641
|
-
*/
|
|
2642
|
-
productPageUrl?: PageUrl;
|
|
2643
|
-
/**
|
|
2644
|
-
* Product’s unique numeric ID (assigned in ascending order).
|
|
2645
|
-
* Primarily used for sorting and filtering when crawling all products.
|
|
2646
|
-
* @readonly
|
|
2647
|
-
*/
|
|
2648
|
-
numericId?: string;
|
|
2649
|
-
/**
|
|
2650
|
-
* Inventory item ID - ID referencing the inventory system.
|
|
2651
|
-
* @readonly
|
|
2652
|
-
*/
|
|
2653
|
-
inventoryItemId?: string;
|
|
2654
|
-
/** Discount deducted from the product's original price. */
|
|
2655
|
-
discount?: Discount$1;
|
|
2656
|
-
/**
|
|
2657
|
-
* A list of all collection IDs that this product is included in (writable via the Catalog > Collection APIs).
|
|
2658
|
-
* @readonly
|
|
2659
|
-
*/
|
|
2660
|
-
collectionIds?: string[];
|
|
2661
|
-
/**
|
|
2662
|
-
* Product variants, will be provided if the the request was sent with the `includeVariants: true`.
|
|
2663
|
-
*
|
|
2664
|
-
* Max: 1,000 variants
|
|
2665
|
-
* @readonly
|
|
2666
|
-
*/
|
|
2667
|
-
variants?: Variant[];
|
|
2668
|
-
/**
|
|
2669
|
-
* Date and time the product was last updated.
|
|
2670
|
-
* @readonly
|
|
2671
|
-
*/
|
|
2672
|
-
lastUpdated?: Date;
|
|
2673
|
-
/**
|
|
2674
|
-
* Date and time the product was created.
|
|
2675
|
-
* @readonly
|
|
2676
|
-
*/
|
|
2677
|
-
_createdDate?: Date;
|
|
2678
|
-
/** Custom SEO data for the product. */
|
|
2679
|
-
seoData?: SeoSchema;
|
|
2680
|
-
/** Product ribbon. Used to highlight relevant information about a product. For example, "Sale", "New Arrival", "Sold Out". */
|
|
2681
|
-
ribbon?: string | null;
|
|
2682
|
-
/** 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). */
|
|
2683
|
-
brand?: string | null;
|
|
2684
|
-
}
|
|
2685
|
-
interface UpdateCollection {
|
|
2686
|
-
/**
|
|
2687
|
-
* Collection ID (generated automatically by the catalog).
|
|
2688
|
-
* @readonly
|
|
2689
|
-
*/
|
|
2690
|
-
_id?: string | null;
|
|
2691
|
-
/** Collection name. */
|
|
2692
|
-
name?: string | null;
|
|
2693
|
-
/**
|
|
2694
|
-
* Media items (images, videos etc) associated with this collection. Read only.
|
|
2695
|
-
* @readonly
|
|
2696
|
-
*/
|
|
2697
|
-
media?: Media;
|
|
2698
|
-
/**
|
|
2699
|
-
* Number of products in the collection. Read only.
|
|
2700
|
-
* @readonly
|
|
2701
|
-
*/
|
|
2702
|
-
numberOfProducts?: number;
|
|
2703
|
-
/** Collection description. */
|
|
2704
|
-
description?: string | null;
|
|
2705
|
-
/** Collection slug. */
|
|
2706
|
-
slug?: string | null;
|
|
2707
|
-
/** Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`. */
|
|
2708
|
-
visible?: boolean | null;
|
|
2709
|
-
}
|
|
2710
|
-
interface QueryOffsetResult {
|
|
2711
|
-
currentPage: number | undefined;
|
|
2712
|
-
totalPages: number | undefined;
|
|
2713
|
-
totalCount: number | undefined;
|
|
2714
|
-
hasNext: () => boolean;
|
|
2715
|
-
hasPrev: () => boolean;
|
|
2716
|
-
length: number;
|
|
2717
|
-
pageSize: number;
|
|
2718
|
-
}
|
|
2719
|
-
interface ProductsQueryResult extends QueryOffsetResult {
|
|
2720
|
-
items: Product[];
|
|
2721
|
-
query: ProductsQueryBuilder;
|
|
2722
|
-
next: () => Promise<ProductsQueryResult>;
|
|
2723
|
-
prev: () => Promise<ProductsQueryResult>;
|
|
2724
|
-
}
|
|
2725
|
-
interface ProductsQueryBuilder {
|
|
2726
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2727
|
-
* @param value - Value to compare against.
|
|
2728
|
-
* @documentationMaturity preview
|
|
2729
|
-
*/
|
|
2730
|
-
eq: (propertyName: '_id' | 'name' | 'slug' | 'productType' | 'description' | 'sku' | 'price' | 'priceData.price' | 'numericId' | 'collectionIds' | 'lastUpdated' | '_createdDate', value: any) => ProductsQueryBuilder;
|
|
2731
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2732
|
-
* @param value - Value to compare against.
|
|
2733
|
-
* @documentationMaturity preview
|
|
2734
|
-
*/
|
|
2735
|
-
ne: (propertyName: '_id' | 'name' | 'slug' | 'productType' | 'description' | 'sku' | 'price' | 'priceData.price' | 'numericId' | 'collectionIds' | 'lastUpdated' | '_createdDate', value: any) => ProductsQueryBuilder;
|
|
2736
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2737
|
-
* @param value - Value to compare against.
|
|
2738
|
-
* @documentationMaturity preview
|
|
2739
|
-
*/
|
|
2740
|
-
ge: (propertyName: 'priceData.price' | 'numericId' | 'lastUpdated' | '_createdDate', value: any) => ProductsQueryBuilder;
|
|
2741
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2742
|
-
* @param value - Value to compare against.
|
|
2743
|
-
* @documentationMaturity preview
|
|
2744
|
-
*/
|
|
2745
|
-
gt: (propertyName: 'priceData.price' | 'numericId' | 'lastUpdated' | '_createdDate', value: any) => ProductsQueryBuilder;
|
|
2746
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2747
|
-
* @param value - Value to compare against.
|
|
2748
|
-
* @documentationMaturity preview
|
|
2749
|
-
*/
|
|
2750
|
-
le: (propertyName: 'priceData.price' | 'numericId' | 'lastUpdated' | '_createdDate', value: any) => ProductsQueryBuilder;
|
|
2751
|
-
/** @param propertyName - Property whose value is compared with `value`.
|
|
2752
|
-
* @param value - Value to compare against.
|
|
2753
|
-
* @documentationMaturity preview
|
|
2754
|
-
*/
|
|
2755
|
-
lt: (propertyName: 'priceData.price' | 'numericId' | 'lastUpdated' | '_createdDate', value: any) => ProductsQueryBuilder;
|
|
2756
|
-
/** @param propertyName - Property whose value is compared with `string`.
|
|
2757
|
-
* @param string - String to compare against. Case-insensitive.
|
|
2758
|
-
* @documentationMaturity preview
|
|
2759
|
-
*/
|
|
2760
|
-
startsWith: (propertyName: '_id' | 'name' | 'slug' | 'description' | 'sku', value: string) => ProductsQueryBuilder;
|
|
2761
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
2762
|
-
* @param values - List of values to compare against.
|
|
2763
|
-
* @documentationMaturity preview
|
|
2764
|
-
*/
|
|
2765
|
-
hasSome: (propertyName: '_id' | 'name' | 'slug' | 'productType' | 'description' | 'sku' | 'price' | 'priceData.price' | 'numericId' | 'collectionIds' | 'lastUpdated' | '_createdDate', value: any[]) => ProductsQueryBuilder;
|
|
2766
|
-
/** @param propertyName - Property whose value is compared with `values`.
|
|
2767
|
-
* @param values - List of values to compare against.
|
|
2768
|
-
* @documentationMaturity preview
|
|
2769
|
-
*/
|
|
2770
|
-
hasAll: (propertyName: 'collectionIds', value: any[]) => ProductsQueryBuilder;
|
|
2771
|
-
/** @documentationMaturity preview */
|
|
2772
|
-
in: (propertyName: '_id' | 'name' | 'slug' | 'productType' | 'description' | 'sku' | 'price' | 'priceData.price' | 'numericId' | 'collectionIds' | 'lastUpdated' | '_createdDate', value: any) => ProductsQueryBuilder;
|
|
2773
|
-
/** @documentationMaturity preview */
|
|
2774
|
-
exists: (propertyName: '_id' | 'name' | 'slug' | 'productType' | 'description' | 'sku' | 'price' | 'priceData.price' | 'numericId' | 'collectionIds' | 'lastUpdated' | '_createdDate', value: boolean) => ProductsQueryBuilder;
|
|
2775
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
2776
|
-
* @documentationMaturity preview
|
|
2777
|
-
*/
|
|
2778
|
-
ascending: (...propertyNames: Array<'_id' | 'name' | 'slug' | 'productType' | 'sku' | 'price' | 'priceData.price' | 'numericId' | 'lastUpdated'>) => ProductsQueryBuilder;
|
|
2779
|
-
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
2780
|
-
* @documentationMaturity preview
|
|
2781
|
-
*/
|
|
2782
|
-
descending: (...propertyNames: Array<'_id' | 'name' | 'slug' | 'productType' | 'sku' | 'price' | 'priceData.price' | 'numericId' | 'lastUpdated'>) => ProductsQueryBuilder;
|
|
2783
|
-
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
2784
|
-
* @documentationMaturity preview
|
|
2785
|
-
*/
|
|
2786
|
-
limit: (limit: number) => ProductsQueryBuilder;
|
|
2787
|
-
/** @param skip - Number of items to skip in the query results before returning the results.
|
|
2788
|
-
* @documentationMaturity preview
|
|
2789
|
-
*/
|
|
2790
|
-
skip: (skip: number) => ProductsQueryBuilder;
|
|
2791
|
-
/** @documentationMaturity preview */
|
|
2792
|
-
find: () => Promise<ProductsQueryResult>;
|
|
2793
|
-
}
|
|
2794
|
-
interface GetProductOptions {
|
|
2795
|
-
/** Whether merchant specific data, such as cost and profit data, should be included in the response. Requires permissions to manage products. */
|
|
2796
|
-
includeMerchantSpecificData?: boolean;
|
|
2797
|
-
}
|
|
2798
|
-
interface QueryProductVariantsOptions {
|
|
2799
|
-
/**
|
|
2800
|
-
* The specific choices available or chosen from within a selection (e.g., choosing the red Selection triggers the red Choice).
|
|
2801
|
-
* You may specify all the relevant choices for a specific variant, or only some of the options, which will return all corresponding variants (not relevant when passing variant IDs).
|
|
2802
|
-
*/
|
|
2803
|
-
choices?: Record<string, string>;
|
|
2804
|
-
/** List of variant IDs (not relevant when passing choices). */
|
|
2805
|
-
variantIds?: string[];
|
|
2806
|
-
paging?: Paging$1;
|
|
2807
|
-
/** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
|
|
2808
|
-
includeMerchantSpecificData?: boolean;
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
declare function createProduct$1(httpClient: HttpClient): (product: Product) => Promise<CreateProductResponse & CreateProductResponseNonNullableFields>;
|
|
2812
|
-
declare function updateProduct$1(httpClient: HttpClient): (_id: string, product: UpdateProduct) => Promise<UpdateProductResponse & UpdateProductResponseNonNullableFields>;
|
|
2813
|
-
declare function deleteProduct$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2814
|
-
declare function updateProductVariants$1(httpClient: HttpClient): (_id: string, variants: VariantOverride[]) => Promise<UpdateVariantsResponse & UpdateVariantsResponseNonNullableFields>;
|
|
2815
|
-
declare function resetAllProductVariantData$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2816
|
-
declare function addProductsToCollection$1(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
|
|
2817
|
-
declare function removeProductsFromCollection$1(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
|
|
2818
|
-
declare function addProductMedia$1(httpClient: HttpClient): (_id: string, media: MediaDataForWrite[]) => Promise<void>;
|
|
2819
|
-
declare function removeProductMedia$1(httpClient: HttpClient): (_id: string, mediaIds: string[]) => Promise<void>;
|
|
2820
|
-
declare function addProductMediaToChoices$1(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
|
|
2821
|
-
declare function removeProductMediaFromChoices$1(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
|
|
2822
|
-
declare function deleteProductOptions$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2823
|
-
declare function removeBrand$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2824
|
-
declare function createCollection$1(httpClient: HttpClient): (collection: Collection) => Promise<CreateCollectionResponse & CreateCollectionResponseNonNullableFields>;
|
|
2825
|
-
declare function updateCollection$1(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<UpdateCollectionResponse & UpdateCollectionResponseNonNullableFields>;
|
|
2826
|
-
declare function deleteCollection$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2827
|
-
declare function removeRibbon$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2828
|
-
declare function bulkUpdateProductsProperty$1(httpClient: HttpClient): (ids: string[], set: SetValue) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
|
|
2829
|
-
declare function bulkAdjustProductProperty$1(httpClient: HttpClient): (adjust: AdjustValue, ids: string[]) => Promise<BulkAdjustProductPropertiesResponse & BulkAdjustProductPropertiesResponseNonNullableFields>;
|
|
2830
|
-
declare function queryProducts$1(httpClient: HttpClient): () => ProductsQueryBuilder;
|
|
2831
|
-
declare function getProduct$1(httpClient: HttpClient): (_id: string, options?: GetProductOptions) => Promise<GetProductResponse & GetProductResponseNonNullableFields>;
|
|
2832
|
-
declare function getCollectionBySlug$1(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
|
|
2833
|
-
declare function getProductOptionsAvailability$1(httpClient: HttpClient): (_id: string, options: Record<string, string>) => Promise<ProductOptionsAvailabilityResponse & ProductOptionsAvailabilityResponseNonNullableFields>;
|
|
2834
|
-
declare function queryProductVariants$1(httpClient: HttpClient): (_id: string, options?: QueryProductVariantsOptions) => Promise<QueryProductVariantsResponse & QueryProductVariantsResponseNonNullableFields>;
|
|
2835
|
-
declare function queryStoreVariants$1(httpClient: HttpClient): (query: PlatformQuery) => Promise<QueryStoreVariantsResponse & QueryStoreVariantsResponseNonNullableFields>;
|
|
2836
|
-
declare function getStoreVariant$1(httpClient: HttpClient): (_id: string) => Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
|
|
2837
|
-
declare const onProductCreated$1: EventDefinition<ProductCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
|
|
2838
|
-
declare const onProductChanged$1: EventDefinition<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
|
|
2839
|
-
declare const onProductDeleted$1: EventDefinition<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
|
|
2840
|
-
declare const onProductCollectionCreated$1: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
|
|
2841
|
-
declare const onProductCollectionChanged$1: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
|
|
2842
|
-
declare const onProductCollectionDeleted$1: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
|
|
2843
|
-
declare const onProductVariantsChanged$1: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
|
|
2844
|
-
|
|
2845
|
-
declare const createProduct: BuildRESTFunction<typeof createProduct$1>;
|
|
2846
|
-
declare const updateProduct: BuildRESTFunction<typeof updateProduct$1>;
|
|
2847
|
-
declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1>;
|
|
2848
|
-
declare const updateProductVariants: BuildRESTFunction<typeof updateProductVariants$1>;
|
|
2849
|
-
declare const resetAllProductVariantData: BuildRESTFunction<typeof resetAllProductVariantData$1>;
|
|
2850
|
-
declare const addProductsToCollection: BuildRESTFunction<typeof addProductsToCollection$1>;
|
|
2851
|
-
declare const removeProductsFromCollection: BuildRESTFunction<typeof removeProductsFromCollection$1>;
|
|
2852
|
-
declare const addProductMedia: BuildRESTFunction<typeof addProductMedia$1>;
|
|
2853
|
-
declare const removeProductMedia: BuildRESTFunction<typeof removeProductMedia$1>;
|
|
2854
|
-
declare const addProductMediaToChoices: BuildRESTFunction<typeof addProductMediaToChoices$1>;
|
|
2855
|
-
declare const removeProductMediaFromChoices: BuildRESTFunction<typeof removeProductMediaFromChoices$1>;
|
|
2856
|
-
declare const deleteProductOptions: BuildRESTFunction<typeof deleteProductOptions$1>;
|
|
2857
|
-
declare const removeBrand: BuildRESTFunction<typeof removeBrand$1>;
|
|
2858
|
-
declare const createCollection: BuildRESTFunction<typeof createCollection$1>;
|
|
2859
|
-
declare const updateCollection: BuildRESTFunction<typeof updateCollection$1>;
|
|
2860
|
-
declare const deleteCollection: BuildRESTFunction<typeof deleteCollection$1>;
|
|
2861
|
-
declare const removeRibbon: BuildRESTFunction<typeof removeRibbon$1>;
|
|
2862
|
-
declare const bulkUpdateProductsProperty: BuildRESTFunction<typeof bulkUpdateProductsProperty$1>;
|
|
2863
|
-
declare const bulkAdjustProductProperty: BuildRESTFunction<typeof bulkAdjustProductProperty$1>;
|
|
2864
|
-
declare const queryProducts: BuildRESTFunction<typeof queryProducts$1>;
|
|
2865
|
-
declare const getProduct: BuildRESTFunction<typeof getProduct$1>;
|
|
2866
|
-
declare const getCollectionBySlug: BuildRESTFunction<typeof getCollectionBySlug$1>;
|
|
2867
|
-
declare const getProductOptionsAvailability: BuildRESTFunction<typeof getProductOptionsAvailability$1>;
|
|
2868
|
-
declare const queryProductVariants: BuildRESTFunction<typeof queryProductVariants$1>;
|
|
2869
|
-
declare const queryStoreVariants: BuildRESTFunction<typeof queryStoreVariants$1>;
|
|
2870
|
-
declare const getStoreVariant: BuildRESTFunction<typeof getStoreVariant$1>;
|
|
2871
|
-
declare const onProductCreated: BuildEventDefinition<typeof onProductCreated$1>;
|
|
2872
|
-
declare const onProductChanged: BuildEventDefinition<typeof onProductChanged$1>;
|
|
2873
|
-
declare const onProductDeleted: BuildEventDefinition<typeof onProductDeleted$1>;
|
|
2874
|
-
declare const onProductCollectionCreated: BuildEventDefinition<typeof onProductCollectionCreated$1>;
|
|
2875
|
-
declare const onProductCollectionChanged: BuildEventDefinition<typeof onProductCollectionChanged$1>;
|
|
2876
|
-
declare const onProductCollectionDeleted: BuildEventDefinition<typeof onProductCollectionDeleted$1>;
|
|
2877
|
-
declare const onProductVariantsChanged: BuildEventDefinition<typeof onProductVariantsChanged$1>;
|
|
63
|
+
export { context$3_getCollection as getCollection, getCollectionBySlug$1 as getCollectionBySlug, context$3_queryCollections as queryCollections };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare function createRESTModule$2<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
67
|
+
|
|
68
|
+
declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
69
|
+
|
|
70
|
+
declare const createProduct: ReturnType<typeof createRESTModule$2<typeof publicCreateProduct>>;
|
|
71
|
+
declare const updateProduct: ReturnType<typeof createRESTModule$2<typeof publicUpdateProduct>>;
|
|
72
|
+
declare const deleteProduct: ReturnType<typeof createRESTModule$2<typeof publicDeleteProduct>>;
|
|
73
|
+
declare const updateProductVariants: ReturnType<typeof createRESTModule$2<typeof publicUpdateProductVariants>>;
|
|
74
|
+
declare const resetAllProductVariantData: ReturnType<typeof createRESTModule$2<typeof publicResetAllProductVariantData>>;
|
|
75
|
+
declare const addProductsToCollection: ReturnType<typeof createRESTModule$2<typeof publicAddProductsToCollection>>;
|
|
76
|
+
declare const removeProductsFromCollection: ReturnType<typeof createRESTModule$2<typeof publicRemoveProductsFromCollection>>;
|
|
77
|
+
declare const addProductMedia: ReturnType<typeof createRESTModule$2<typeof publicAddProductMedia>>;
|
|
78
|
+
declare const removeProductMedia: ReturnType<typeof createRESTModule$2<typeof publicRemoveProductMedia>>;
|
|
79
|
+
declare const addProductMediaToChoices: ReturnType<typeof createRESTModule$2<typeof publicAddProductMediaToChoices>>;
|
|
80
|
+
declare const removeProductMediaFromChoices: ReturnType<typeof createRESTModule$2<typeof publicRemoveProductMediaFromChoices>>;
|
|
81
|
+
declare const deleteProductOptions: ReturnType<typeof createRESTModule$2<typeof publicDeleteProductOptions>>;
|
|
82
|
+
declare const removeBrand: ReturnType<typeof createRESTModule$2<typeof publicRemoveBrand>>;
|
|
83
|
+
declare const createCollection: ReturnType<typeof createRESTModule$2<typeof publicCreateCollection>>;
|
|
84
|
+
declare const updateCollection: ReturnType<typeof createRESTModule$2<typeof publicUpdateCollection>>;
|
|
85
|
+
declare const deleteCollection: ReturnType<typeof createRESTModule$2<typeof publicDeleteCollection>>;
|
|
86
|
+
declare const removeRibbon: ReturnType<typeof createRESTModule$2<typeof publicRemoveRibbon>>;
|
|
87
|
+
declare const bulkUpdateProductsProperty: ReturnType<typeof createRESTModule$2<typeof publicBulkUpdateProductsProperty>>;
|
|
88
|
+
declare const bulkAdjustProductProperty: ReturnType<typeof createRESTModule$2<typeof publicBulkAdjustProductProperty>>;
|
|
89
|
+
declare const queryProducts: ReturnType<typeof createRESTModule$2<typeof publicQueryProducts>>;
|
|
90
|
+
declare const getProduct: ReturnType<typeof createRESTModule$2<typeof publicGetProduct>>;
|
|
91
|
+
declare const getCollectionBySlug: ReturnType<typeof createRESTModule$2<typeof publicGetCollectionBySlug>>;
|
|
92
|
+
declare const getProductOptionsAvailability: ReturnType<typeof createRESTModule$2<typeof publicGetProductOptionsAvailability>>;
|
|
93
|
+
declare const queryProductVariants: ReturnType<typeof createRESTModule$2<typeof publicQueryProductVariants>>;
|
|
94
|
+
declare const queryStoreVariants: ReturnType<typeof createRESTModule$2<typeof publicQueryStoreVariants>>;
|
|
95
|
+
declare const getStoreVariant: ReturnType<typeof createRESTModule$2<typeof publicGetStoreVariant>>;
|
|
96
|
+
declare const onProductCreated: ReturnType<typeof createEventModule$1<typeof publicOnProductCreated>>;
|
|
97
|
+
declare const onProductChanged: ReturnType<typeof createEventModule$1<typeof publicOnProductChanged>>;
|
|
98
|
+
declare const onProductDeleted: ReturnType<typeof createEventModule$1<typeof publicOnProductDeleted>>;
|
|
99
|
+
declare const onProductCollectionCreated: ReturnType<typeof createEventModule$1<typeof publicOnProductCollectionCreated>>;
|
|
100
|
+
declare const onProductCollectionChanged: ReturnType<typeof createEventModule$1<typeof publicOnProductCollectionChanged>>;
|
|
101
|
+
declare const onProductCollectionDeleted: ReturnType<typeof createEventModule$1<typeof publicOnProductCollectionDeleted>>;
|
|
102
|
+
declare const onProductVariantsChanged: ReturnType<typeof createEventModule$1<typeof publicOnProductVariantsChanged>>;
|
|
2878
103
|
|
|
2879
104
|
declare const context$2_addProductMedia: typeof addProductMedia;
|
|
2880
105
|
declare const context$2_addProductMediaToChoices: typeof addProductMediaToChoices;
|
|
@@ -2913,162 +138,16 @@ declare namespace context$2 {
|
|
|
2913
138
|
export { context$2_addProductMedia as addProductMedia, context$2_addProductMediaToChoices as addProductMediaToChoices, context$2_addProductsToCollection as addProductsToCollection, context$2_bulkAdjustProductProperty as bulkAdjustProductProperty, context$2_bulkUpdateProductsProperty as bulkUpdateProductsProperty, context$2_createCollection as createCollection, context$2_createProduct as createProduct, context$2_deleteCollection as deleteCollection, context$2_deleteProduct as deleteProduct, context$2_deleteProductOptions as deleteProductOptions, context$2_getCollectionBySlug as getCollectionBySlug, context$2_getProduct as getProduct, context$2_getProductOptionsAvailability as getProductOptionsAvailability, context$2_getStoreVariant as getStoreVariant, context$2_onProductChanged as onProductChanged, context$2_onProductCollectionChanged as onProductCollectionChanged, context$2_onProductCollectionCreated as onProductCollectionCreated, context$2_onProductCollectionDeleted as onProductCollectionDeleted, context$2_onProductCreated as onProductCreated, context$2_onProductDeleted as onProductDeleted, context$2_onProductVariantsChanged as onProductVariantsChanged, context$2_queryProductVariants as queryProductVariants, context$2_queryProducts as queryProducts, context$2_queryStoreVariants as queryStoreVariants, context$2_removeBrand as removeBrand, context$2_removeProductMedia as removeProductMedia, context$2_removeProductMediaFromChoices as removeProductMediaFromChoices, context$2_removeProductsFromCollection as removeProductsFromCollection, context$2_removeRibbon as removeRibbon, context$2_resetAllProductVariantData as resetAllProductVariantData, context$2_updateCollection as updateCollection, context$2_updateProduct as updateProduct, context$2_updateProductVariants as updateProductVariants };
|
|
2914
139
|
}
|
|
2915
140
|
|
|
2916
|
-
|
|
2917
|
-
/** Subscription option ID (auto-generated upon subscription option creation). */
|
|
2918
|
-
_id?: string | null;
|
|
2919
|
-
/** Subscription option title. */
|
|
2920
|
-
title?: string | null;
|
|
2921
|
-
/** Subscription option description (optional). */
|
|
2922
|
-
description?: string | null;
|
|
2923
|
-
/** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */
|
|
2924
|
-
subscriptionSettings?: SubscriptionSettings;
|
|
2925
|
-
/**
|
|
2926
|
-
* Discount info (optional).
|
|
2927
|
-
* For example, a $20 discount would be `value: 20`, `type: AMOUNT`.
|
|
2928
|
-
*/
|
|
2929
|
-
discount?: Discount;
|
|
2930
|
-
}
|
|
2931
|
-
interface SubscriptionSettings {
|
|
2932
|
-
/** Frequency of recurring payment. */
|
|
2933
|
-
frequency?: SubscriptionFrequency;
|
|
2934
|
-
/** Whether subscription is renewed automatically at the end of each period. */
|
|
2935
|
-
autoRenewal?: boolean;
|
|
2936
|
-
/** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */
|
|
2937
|
-
billingCycles?: number | null;
|
|
2938
|
-
}
|
|
2939
|
-
/** Frequency unit of recurring payment */
|
|
2940
|
-
declare enum SubscriptionFrequency {
|
|
2941
|
-
UNDEFINED = "UNDEFINED",
|
|
2942
|
-
DAY = "DAY",
|
|
2943
|
-
WEEK = "WEEK",
|
|
2944
|
-
MONTH = "MONTH",
|
|
2945
|
-
YEAR = "YEAR"
|
|
2946
|
-
}
|
|
2947
|
-
interface Discount {
|
|
2948
|
-
/** Discount type. */
|
|
2949
|
-
type?: DiscountType;
|
|
2950
|
-
/** Discount value. */
|
|
2951
|
-
value?: number;
|
|
2952
|
-
}
|
|
2953
|
-
declare enum DiscountType {
|
|
2954
|
-
UNDEFINED = "UNDEFINED",
|
|
2955
|
-
/** No discount */
|
|
2956
|
-
AMOUNT = "AMOUNT",
|
|
2957
|
-
PERCENT = "PERCENT"
|
|
2958
|
-
}
|
|
2959
|
-
interface BulkCreateSubscriptionOptionsResponse {
|
|
2960
|
-
/** Newly created subscription options. */
|
|
2961
|
-
subscriptionOptions?: SubscriptionOption[];
|
|
2962
|
-
}
|
|
2963
|
-
interface BulkUpdateSubscriptionOptionsResponse {
|
|
2964
|
-
/** Updated subscription options. */
|
|
2965
|
-
subscriptionOptions?: SubscriptionOption[];
|
|
2966
|
-
}
|
|
2967
|
-
interface SubscriptionOptionInProduct {
|
|
2968
|
-
/** Subscription option ID. */
|
|
2969
|
-
_id?: string;
|
|
2970
|
-
/** Whether the subscription option is hidden for the product (the default is false). */
|
|
2971
|
-
hidden?: boolean;
|
|
2972
|
-
/**
|
|
2973
|
-
* Subscription option title.
|
|
2974
|
-
* @readonly
|
|
2975
|
-
*/
|
|
2976
|
-
title?: string | null;
|
|
2977
|
-
/**
|
|
2978
|
-
* Subscription option description (optional).
|
|
2979
|
-
* @readonly
|
|
2980
|
-
*/
|
|
2981
|
-
description?: string | null;
|
|
2982
|
-
/**
|
|
2983
|
-
* Subscription payment settings. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months.
|
|
2984
|
-
* @readonly
|
|
2985
|
-
*/
|
|
2986
|
-
subscriptionSettings?: SubscriptionSettings;
|
|
2987
|
-
/**
|
|
2988
|
-
* Discount info (optional).
|
|
2989
|
-
* @readonly
|
|
2990
|
-
*/
|
|
2991
|
-
discount?: Discount;
|
|
2992
|
-
}
|
|
2993
|
-
interface BulkCreateSubscriptionOptionsResponseNonNullableFields {
|
|
2994
|
-
subscriptionOptions: {
|
|
2995
|
-
subscriptionSettings?: {
|
|
2996
|
-
frequency: SubscriptionFrequency;
|
|
2997
|
-
autoRenewal: boolean;
|
|
2998
|
-
};
|
|
2999
|
-
discount?: {
|
|
3000
|
-
type: DiscountType;
|
|
3001
|
-
value: number;
|
|
3002
|
-
};
|
|
3003
|
-
}[];
|
|
3004
|
-
}
|
|
3005
|
-
interface BulkUpdateSubscriptionOptionsResponseNonNullableFields {
|
|
3006
|
-
subscriptionOptions: {
|
|
3007
|
-
subscriptionSettings?: {
|
|
3008
|
-
frequency: SubscriptionFrequency;
|
|
3009
|
-
autoRenewal: boolean;
|
|
3010
|
-
};
|
|
3011
|
-
discount?: {
|
|
3012
|
-
type: DiscountType;
|
|
3013
|
-
value: number;
|
|
3014
|
-
};
|
|
3015
|
-
}[];
|
|
3016
|
-
}
|
|
3017
|
-
interface UpdateSubscriptionOption {
|
|
3018
|
-
/** Subscription option ID (auto-generated upon subscription option creation). */
|
|
3019
|
-
_id?: string | null;
|
|
3020
|
-
/** Subscription option title. */
|
|
3021
|
-
title?: string | null;
|
|
3022
|
-
/** Subscription option description (optional). */
|
|
3023
|
-
description?: string | null;
|
|
3024
|
-
/** Subscription charge times. For example, if `frequency: MONTH` and `billingCycles: 6`; payment will be made monthly for 6 months. */
|
|
3025
|
-
subscriptionSettings?: SubscriptionSettings;
|
|
3026
|
-
/**
|
|
3027
|
-
* Discount info (optional).
|
|
3028
|
-
* For example, a $20 discount would be `value: 20`, `type: AMOUNT`.
|
|
3029
|
-
*/
|
|
3030
|
-
discount?: Discount;
|
|
3031
|
-
}
|
|
3032
|
-
interface AssignSubscriptionOptionsToProductOptions {
|
|
3033
|
-
/** Ordered array of subscription options that will be assigned to the product. Pass an empty array to remove all subscription options from the product. */
|
|
3034
|
-
assignedSubscriptionOptions?: SubscriptionOptionInProduct[];
|
|
3035
|
-
}
|
|
3036
|
-
|
|
3037
|
-
declare function createSubscriptionOption$1(httpClient: HttpClient): (subscriptionOption: SubscriptionOption) => Promise<SubscriptionOption & {
|
|
3038
|
-
subscriptionSettings?: {
|
|
3039
|
-
frequency: SubscriptionFrequency;
|
|
3040
|
-
autoRenewal: boolean;
|
|
3041
|
-
} | undefined;
|
|
3042
|
-
discount?: {
|
|
3043
|
-
type: DiscountType;
|
|
3044
|
-
value: number;
|
|
3045
|
-
} | undefined;
|
|
3046
|
-
}>;
|
|
3047
|
-
declare function updateSubscriptionOption$1(httpClient: HttpClient): (_id: string | null, subscriptionOption: UpdateSubscriptionOption) => Promise<SubscriptionOption & {
|
|
3048
|
-
subscriptionSettings?: {
|
|
3049
|
-
frequency: SubscriptionFrequency;
|
|
3050
|
-
autoRenewal: boolean;
|
|
3051
|
-
} | undefined;
|
|
3052
|
-
discount?: {
|
|
3053
|
-
type: DiscountType;
|
|
3054
|
-
value: number;
|
|
3055
|
-
} | undefined;
|
|
3056
|
-
}>;
|
|
3057
|
-
declare function deleteSubscriptionOption$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3058
|
-
declare function bulkCreateSubscriptionOptions$1(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkCreateSubscriptionOptionsResponse & BulkCreateSubscriptionOptionsResponseNonNullableFields>;
|
|
3059
|
-
declare function bulkUpdateSubscriptionOptions$1(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkUpdateSubscriptionOptionsResponse & BulkUpdateSubscriptionOptionsResponseNonNullableFields>;
|
|
3060
|
-
declare function bulkDeleteSubscriptionOptions$1(httpClient: HttpClient): (ids: string[]) => Promise<void>;
|
|
3061
|
-
declare function assignSubscriptionOptionsToProduct$1(httpClient: HttpClient): (productId: string, options?: AssignSubscriptionOptionsToProductOptions) => Promise<void>;
|
|
3062
|
-
declare function allowOneTimePurchases$1(httpClient: HttpClient): (productId: string, allowed: boolean | null) => Promise<void>;
|
|
141
|
+
declare function createRESTModule$1<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
3063
142
|
|
|
3064
|
-
declare const createSubscriptionOption:
|
|
3065
|
-
declare const updateSubscriptionOption:
|
|
3066
|
-
declare const deleteSubscriptionOption:
|
|
3067
|
-
declare const bulkCreateSubscriptionOptions:
|
|
3068
|
-
declare const bulkUpdateSubscriptionOptions:
|
|
3069
|
-
declare const bulkDeleteSubscriptionOptions:
|
|
3070
|
-
declare const assignSubscriptionOptionsToProduct:
|
|
3071
|
-
declare const allowOneTimePurchases:
|
|
143
|
+
declare const createSubscriptionOption: ReturnType<typeof createRESTModule$1<typeof publicCreateSubscriptionOption>>;
|
|
144
|
+
declare const updateSubscriptionOption: ReturnType<typeof createRESTModule$1<typeof publicUpdateSubscriptionOption>>;
|
|
145
|
+
declare const deleteSubscriptionOption: ReturnType<typeof createRESTModule$1<typeof publicDeleteSubscriptionOption>>;
|
|
146
|
+
declare const bulkCreateSubscriptionOptions: ReturnType<typeof createRESTModule$1<typeof publicBulkCreateSubscriptionOptions>>;
|
|
147
|
+
declare const bulkUpdateSubscriptionOptions: ReturnType<typeof createRESTModule$1<typeof publicBulkUpdateSubscriptionOptions>>;
|
|
148
|
+
declare const bulkDeleteSubscriptionOptions: ReturnType<typeof createRESTModule$1<typeof publicBulkDeleteSubscriptionOptions>>;
|
|
149
|
+
declare const assignSubscriptionOptionsToProduct: ReturnType<typeof createRESTModule$1<typeof publicAssignSubscriptionOptionsToProduct>>;
|
|
150
|
+
declare const allowOneTimePurchases: ReturnType<typeof createRESTModule$1<typeof publicAllowOneTimePurchases>>;
|
|
3072
151
|
|
|
3073
152
|
declare const context$1_allowOneTimePurchases: typeof allowOneTimePurchases;
|
|
3074
153
|
declare const context$1_assignSubscriptionOptionsToProduct: typeof assignSubscriptionOptionsToProduct;
|
|
@@ -3082,358 +161,17 @@ declare namespace context$1 {
|
|
|
3082
161
|
export { context$1_allowOneTimePurchases as allowOneTimePurchases, context$1_assignSubscriptionOptionsToProduct as assignSubscriptionOptionsToProduct, context$1_bulkCreateSubscriptionOptions as bulkCreateSubscriptionOptions, context$1_bulkDeleteSubscriptionOptions as bulkDeleteSubscriptionOptions, context$1_bulkUpdateSubscriptionOptions as bulkUpdateSubscriptionOptions, context$1_createSubscriptionOption as createSubscriptionOption, context$1_deleteSubscriptionOption as deleteSubscriptionOption, context$1_updateSubscriptionOption as updateSubscriptionOption };
|
|
3083
162
|
}
|
|
3084
163
|
|
|
3085
|
-
|
|
3086
|
-
/** Inventory item ID. */
|
|
3087
|
-
_id?: string | null;
|
|
3088
|
-
/**
|
|
3089
|
-
* @internal
|
|
3090
|
-
* @internal
|
|
3091
|
-
* @readonly
|
|
3092
|
-
* @deprecated Deprecated: use productId.
|
|
3093
|
-
* @replacedBy product_id
|
|
3094
|
-
* @targetRemovalDate 2024-12-31
|
|
3095
|
-
*/
|
|
3096
|
-
externalId?: string | null;
|
|
3097
|
-
/**
|
|
3098
|
-
* Product ID.
|
|
3099
|
-
* @readonly
|
|
3100
|
-
*/
|
|
3101
|
-
productId?: string | null;
|
|
3102
|
-
/** Whether quantity is being tracked. */
|
|
3103
|
-
trackQuantity?: boolean | null;
|
|
3104
|
-
/** Variants associated with this inventory item. */
|
|
3105
|
-
variants?: InventoryVariantV2[];
|
|
3106
|
-
/**
|
|
3107
|
-
* Last updated timestamp.
|
|
3108
|
-
* @readonly
|
|
3109
|
-
*/
|
|
3110
|
-
lastUpdated?: Date;
|
|
3111
|
-
/**
|
|
3112
|
-
* Inventory’s unique numeric ID (assigned in ascending order).
|
|
3113
|
-
* Primarily for sorting and filtering when crawling all inventories.
|
|
3114
|
-
* @readonly
|
|
3115
|
-
*/
|
|
3116
|
-
numericId?: string;
|
|
3117
|
-
/** Preorder information. */
|
|
3118
|
-
preorderInfo?: PreorderInfo;
|
|
3119
|
-
}
|
|
3120
|
-
interface InventoryVariantV2 {
|
|
3121
|
-
/** Variant ID. */
|
|
3122
|
-
variantId?: string;
|
|
3123
|
-
/** Whether the product is listed as in stock. */
|
|
3124
|
-
inStock?: boolean | null;
|
|
3125
|
-
/** Quantity currently left in inventory. */
|
|
3126
|
-
quantity?: number | null;
|
|
3127
|
-
/**
|
|
3128
|
-
* Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level.
|
|
3129
|
-
* @readonly
|
|
3130
|
-
*/
|
|
3131
|
-
availableForPreorder?: boolean;
|
|
3132
|
-
}
|
|
3133
|
-
interface PreorderInfo {
|
|
3134
|
-
/** Whether the item is available for preorder. */
|
|
3135
|
-
enabled?: boolean;
|
|
3136
|
-
/** A message the buyer will see when the item is out of stock and preorder is enabled. */
|
|
3137
|
-
message?: string | null;
|
|
3138
|
-
/** Number of products that can be preordered after stock reaches zero. */
|
|
3139
|
-
limit?: number | null;
|
|
3140
|
-
}
|
|
3141
|
-
interface InventoryItemChanged {
|
|
3142
|
-
/** Inventory item ID. */
|
|
3143
|
-
inventoryItemId?: string;
|
|
3144
|
-
/**
|
|
3145
|
-
* @internal
|
|
3146
|
-
* @internal
|
|
3147
|
-
* @deprecated Deprecated: use productId.
|
|
3148
|
-
* @replacedBy product_id
|
|
3149
|
-
* @targetRemovalDate 2024-12-31
|
|
3150
|
-
*/
|
|
3151
|
-
externalId?: string;
|
|
3152
|
-
/** Product ID. */
|
|
3153
|
-
productId?: string;
|
|
3154
|
-
/** Whether inventory is being tracked. */
|
|
3155
|
-
trackInventory?: boolean;
|
|
3156
|
-
/** Preorder information. */
|
|
3157
|
-
preorderInfo?: PreorderInfo;
|
|
3158
|
-
/** Date and time the inventory item was last updated. */
|
|
3159
|
-
_updatedDate?: Date;
|
|
3160
|
-
}
|
|
3161
|
-
interface InventoryVariantsChanged {
|
|
3162
|
-
/** Inventory item ID. */
|
|
3163
|
-
inventoryItemId?: string;
|
|
3164
|
-
/**
|
|
3165
|
-
* @internal
|
|
3166
|
-
* @internal
|
|
3167
|
-
* @deprecated Deprecated: use productId.
|
|
3168
|
-
* @replacedBy product_id
|
|
3169
|
-
* @targetRemovalDate 2024-12-31
|
|
3170
|
-
*/
|
|
3171
|
-
externalId?: string;
|
|
3172
|
-
/** Product ID. */
|
|
3173
|
-
productId?: string;
|
|
3174
|
-
/** Information about changed variants. */
|
|
3175
|
-
variants?: ChangedInventoryVariant[];
|
|
3176
|
-
/** Date and time the inventory variant item was last updated. */
|
|
3177
|
-
_updatedDate?: Date;
|
|
3178
|
-
}
|
|
3179
|
-
interface ChangedInventoryVariant {
|
|
3180
|
-
/** Variant ID. */
|
|
3181
|
-
_id?: string;
|
|
3182
|
-
/** Previous inventory variant data. */
|
|
3183
|
-
oldValue?: ChangedInventoryVariantData;
|
|
3184
|
-
/** Current inventory variant data. */
|
|
3185
|
-
newValue?: ChangedInventoryVariantData;
|
|
3186
|
-
}
|
|
3187
|
-
interface ChangedInventoryVariantData {
|
|
3188
|
-
/** Inventory variant quantity. */
|
|
3189
|
-
quantity?: number | null;
|
|
3190
|
-
/** Whether the product variant is in stock. */
|
|
3191
|
-
inStock?: boolean;
|
|
3192
|
-
/** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
|
|
3193
|
-
availableForPreorder?: boolean;
|
|
3194
|
-
}
|
|
3195
|
-
/** @oneof */
|
|
3196
|
-
interface GetInventoryVariantsRequestIdOneOf {
|
|
3197
|
-
/** Inventory item ID. */
|
|
3198
|
-
inventoryId?: string;
|
|
3199
|
-
/**
|
|
3200
|
-
* @internal
|
|
3201
|
-
* @internal
|
|
3202
|
-
* @deprecated Deprecated (use productID instead).
|
|
3203
|
-
* @replacedBy product_id
|
|
3204
|
-
* @targetRemovalDate 2024-12-31
|
|
3205
|
-
*/
|
|
3206
|
-
externalId?: string;
|
|
3207
|
-
/** Product ID. */
|
|
3208
|
-
productId?: string;
|
|
3209
|
-
}
|
|
3210
|
-
interface GetInventoryVariantsResponse {
|
|
3211
|
-
/** Inventory item. */
|
|
3212
|
-
inventoryItem?: InventoryItemV2;
|
|
3213
|
-
}
|
|
3214
|
-
interface Query {
|
|
3215
|
-
/** Paging options to limit and skip the number of items. */
|
|
3216
|
-
paging?: Paging;
|
|
3217
|
-
/** Filter string */
|
|
3218
|
-
filter?: string | null;
|
|
3219
|
-
/** Sort string */
|
|
3220
|
-
sort?: string | null;
|
|
3221
|
-
}
|
|
3222
|
-
interface Paging {
|
|
3223
|
-
/** Amount of items to load per page */
|
|
3224
|
-
limit?: number | null;
|
|
3225
|
-
/** Number of items to skip in the display (relevant for all pages after the first) */
|
|
3226
|
-
offset?: number | null;
|
|
3227
|
-
}
|
|
3228
|
-
interface QueryInventoryResponse {
|
|
3229
|
-
/** Inventory items. */
|
|
3230
|
-
inventoryItems?: InventoryItemV2[];
|
|
3231
|
-
/** Display metadata. */
|
|
3232
|
-
metadata?: PagingMetadata;
|
|
3233
|
-
/** Number of total results. */
|
|
3234
|
-
totalResults?: number;
|
|
3235
|
-
}
|
|
3236
|
-
interface PagingMetadata {
|
|
3237
|
-
/** Amount of items to load per page */
|
|
3238
|
-
items?: number;
|
|
3239
|
-
/** Number of items to skip in the display (relevant for all pages after the first) */
|
|
3240
|
-
offset?: number;
|
|
3241
|
-
}
|
|
3242
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
3243
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
3244
|
-
anonymousVisitorId?: string;
|
|
3245
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
3246
|
-
memberId?: string;
|
|
3247
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3248
|
-
wixUserId?: string;
|
|
3249
|
-
/** ID of an app. */
|
|
3250
|
-
appId?: string;
|
|
3251
|
-
/** @readonly */
|
|
3252
|
-
identityType?: WebhookIdentityType;
|
|
3253
|
-
}
|
|
3254
|
-
/** @oneof */
|
|
3255
|
-
interface IdentificationDataIdOneOf {
|
|
3256
|
-
/** ID of a site visitor that has not logged in to the site. */
|
|
3257
|
-
anonymousVisitorId?: string;
|
|
3258
|
-
/** ID of a site visitor that has logged in to the site. */
|
|
3259
|
-
memberId?: string;
|
|
3260
|
-
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
3261
|
-
wixUserId?: string;
|
|
3262
|
-
/** ID of an app. */
|
|
3263
|
-
appId?: string;
|
|
3264
|
-
}
|
|
3265
|
-
declare enum WebhookIdentityType {
|
|
3266
|
-
UNKNOWN = "UNKNOWN",
|
|
3267
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
3268
|
-
MEMBER = "MEMBER",
|
|
3269
|
-
WIX_USER = "WIX_USER",
|
|
3270
|
-
APP = "APP"
|
|
3271
|
-
}
|
|
3272
|
-
interface DecrementData extends DecrementDataIdOneOf {
|
|
3273
|
-
/** Inventory item ID. */
|
|
3274
|
-
inventoryId?: string;
|
|
3275
|
-
/**
|
|
3276
|
-
* @internal
|
|
3277
|
-
* @internal
|
|
3278
|
-
* @deprecated Deprecated: use productId.
|
|
3279
|
-
* @replacedBy product_id
|
|
3280
|
-
* @targetRemovalDate 2024-12-31
|
|
3281
|
-
*/
|
|
3282
|
-
externalId?: string;
|
|
3283
|
-
/** Product ID. */
|
|
3284
|
-
productId?: string;
|
|
3285
|
-
/** Variant ID. */
|
|
3286
|
-
variantId?: string;
|
|
3287
|
-
/** Number to decrement inventory by. */
|
|
3288
|
-
decrementBy?: number;
|
|
3289
|
-
/**
|
|
3290
|
-
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
3291
|
-
* If true and the item is available for preorder, we allow negative inventory.
|
|
3292
|
-
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
3293
|
-
*/
|
|
3294
|
-
preorderRequest?: boolean;
|
|
3295
|
-
}
|
|
3296
|
-
/** @oneof */
|
|
3297
|
-
interface DecrementDataIdOneOf {
|
|
3298
|
-
/** Inventory item ID. */
|
|
3299
|
-
inventoryId?: string;
|
|
3300
|
-
/**
|
|
3301
|
-
* @internal
|
|
3302
|
-
* @internal
|
|
3303
|
-
* @deprecated Deprecated: use productId.
|
|
3304
|
-
* @replacedBy product_id
|
|
3305
|
-
* @targetRemovalDate 2024-12-31
|
|
3306
|
-
*/
|
|
3307
|
-
externalId?: string;
|
|
3308
|
-
/** Product ID. */
|
|
3309
|
-
productId?: string;
|
|
3310
|
-
}
|
|
3311
|
-
interface IncrementData extends IncrementDataIdOneOf {
|
|
3312
|
-
/** Inventory item ID. */
|
|
3313
|
-
inventoryId?: string;
|
|
3314
|
-
/** Product ID. */
|
|
3315
|
-
productId?: string;
|
|
3316
|
-
/** Variant ID. */
|
|
3317
|
-
variantId?: string;
|
|
3318
|
-
/** Number to increment inventory by. */
|
|
3319
|
-
incrementBy?: number;
|
|
3320
|
-
}
|
|
3321
|
-
/** @oneof */
|
|
3322
|
-
interface IncrementDataIdOneOf {
|
|
3323
|
-
/** Inventory item ID. */
|
|
3324
|
-
inventoryId?: string;
|
|
3325
|
-
/** Product ID. */
|
|
3326
|
-
productId?: string;
|
|
3327
|
-
}
|
|
3328
|
-
interface GetInventoryVariantsResponseNonNullableFields {
|
|
3329
|
-
inventoryItem?: {
|
|
3330
|
-
variants: {
|
|
3331
|
-
variantId: string;
|
|
3332
|
-
availableForPreorder: boolean;
|
|
3333
|
-
}[];
|
|
3334
|
-
numericId: string;
|
|
3335
|
-
preorderInfo?: {
|
|
3336
|
-
enabled: boolean;
|
|
3337
|
-
};
|
|
3338
|
-
};
|
|
3339
|
-
}
|
|
3340
|
-
interface QueryInventoryResponseNonNullableFields {
|
|
3341
|
-
inventoryItems: {
|
|
3342
|
-
variants: {
|
|
3343
|
-
variantId: string;
|
|
3344
|
-
availableForPreorder: boolean;
|
|
3345
|
-
}[];
|
|
3346
|
-
numericId: string;
|
|
3347
|
-
preorderInfo?: {
|
|
3348
|
-
enabled: boolean;
|
|
3349
|
-
};
|
|
3350
|
-
}[];
|
|
3351
|
-
metadata?: {
|
|
3352
|
-
items: number;
|
|
3353
|
-
offset: number;
|
|
3354
|
-
};
|
|
3355
|
-
totalResults: number;
|
|
3356
|
-
}
|
|
3357
|
-
interface BaseEventMetadata {
|
|
3358
|
-
/** App instance ID. */
|
|
3359
|
-
instanceId?: string | null;
|
|
3360
|
-
/** Event type. */
|
|
3361
|
-
eventType?: string;
|
|
3362
|
-
/** The identification type and identity data. */
|
|
3363
|
-
identity?: IdentificationData;
|
|
3364
|
-
}
|
|
3365
|
-
interface InventoryItemChangedEnvelope {
|
|
3366
|
-
data: InventoryItemChanged;
|
|
3367
|
-
metadata: BaseEventMetadata;
|
|
3368
|
-
}
|
|
3369
|
-
interface InventoryVariantsChangedEnvelope {
|
|
3370
|
-
data: InventoryVariantsChanged;
|
|
3371
|
-
metadata: BaseEventMetadata;
|
|
3372
|
-
}
|
|
3373
|
-
interface GetInventoryVariantsOptions extends GetInventoryVariantsRequestIdOneOf {
|
|
3374
|
-
/**
|
|
3375
|
-
* @internal
|
|
3376
|
-
* @internal
|
|
3377
|
-
* @deprecated Deprecated (use productID instead).
|
|
3378
|
-
* @replacedBy product_id
|
|
3379
|
-
* @targetRemovalDate 2024-12-31
|
|
3380
|
-
*/
|
|
3381
|
-
externalId?: string;
|
|
3382
|
-
/** Product ID. */
|
|
3383
|
-
productId?: string;
|
|
3384
|
-
/** Variant IDs to query for this inventory item (optional). */
|
|
3385
|
-
variantIds?: string[];
|
|
3386
|
-
}
|
|
3387
|
-
interface QueryInventoryOptions {
|
|
3388
|
-
/** Information about paging, filters, sorting. */
|
|
3389
|
-
query?: Query;
|
|
3390
|
-
}
|
|
3391
|
-
interface UpdateInventoryVariantsInventoryItem {
|
|
3392
|
-
/** Inventory item ID. */
|
|
3393
|
-
_id?: string | null;
|
|
3394
|
-
/**
|
|
3395
|
-
* @internal
|
|
3396
|
-
* @internal
|
|
3397
|
-
* @readonly
|
|
3398
|
-
* @deprecated Deprecated: use productId.
|
|
3399
|
-
* @replacedBy product_id
|
|
3400
|
-
* @targetRemovalDate 2024-12-31
|
|
3401
|
-
*/
|
|
3402
|
-
externalId?: string | null;
|
|
3403
|
-
/** Whether quantity is being tracked. */
|
|
3404
|
-
trackQuantity?: boolean | null;
|
|
3405
|
-
/** Variants associated with this inventory item. */
|
|
3406
|
-
variants?: InventoryVariantV2[];
|
|
3407
|
-
/**
|
|
3408
|
-
* Last updated timestamp.
|
|
3409
|
-
* @readonly
|
|
3410
|
-
*/
|
|
3411
|
-
lastUpdated?: Date;
|
|
3412
|
-
/**
|
|
3413
|
-
* Inventory’s unique numeric ID (assigned in ascending order).
|
|
3414
|
-
* Primarily for sorting and filtering when crawling all inventories.
|
|
3415
|
-
* @readonly
|
|
3416
|
-
*/
|
|
3417
|
-
numericId?: string;
|
|
3418
|
-
/** Preorder information. */
|
|
3419
|
-
preorderInfo?: PreorderInfo;
|
|
3420
|
-
}
|
|
164
|
+
declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
|
|
3421
165
|
|
|
3422
|
-
declare function
|
|
3423
|
-
declare function queryInventory$1(httpClient: HttpClient): (options?: QueryInventoryOptions) => Promise<QueryInventoryResponse & QueryInventoryResponseNonNullableFields>;
|
|
3424
|
-
declare function updateInventoryVariants$1(httpClient: HttpClient): (productId: string | null, inventoryItem: UpdateInventoryVariantsInventoryItem) => Promise<void>;
|
|
3425
|
-
declare function decrementInventory$1(httpClient: HttpClient): (decrementData: DecrementData[]) => Promise<void>;
|
|
3426
|
-
declare function incrementInventory$1(httpClient: HttpClient): (incrementData: IncrementData[]) => Promise<void>;
|
|
3427
|
-
declare const onInventoryItemChanged$1: EventDefinition<InventoryItemChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryItemChanged">;
|
|
3428
|
-
declare const onInventoryVariantsChanged$1: EventDefinition<InventoryVariantsChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged">;
|
|
166
|
+
declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
|
|
3429
167
|
|
|
3430
|
-
declare const getInventoryVariants:
|
|
3431
|
-
declare const queryInventory:
|
|
3432
|
-
declare const updateInventoryVariants:
|
|
3433
|
-
declare const decrementInventory:
|
|
3434
|
-
declare const incrementInventory:
|
|
3435
|
-
declare const onInventoryItemChanged:
|
|
3436
|
-
declare const onInventoryVariantsChanged:
|
|
168
|
+
declare const getInventoryVariants: ReturnType<typeof createRESTModule<typeof publicGetInventoryVariants>>;
|
|
169
|
+
declare const queryInventory: ReturnType<typeof createRESTModule<typeof publicQueryInventory>>;
|
|
170
|
+
declare const updateInventoryVariants: ReturnType<typeof createRESTModule<typeof publicUpdateInventoryVariants>>;
|
|
171
|
+
declare const decrementInventory: ReturnType<typeof createRESTModule<typeof publicDecrementInventory>>;
|
|
172
|
+
declare const incrementInventory: ReturnType<typeof createRESTModule<typeof publicIncrementInventory>>;
|
|
173
|
+
declare const onInventoryItemChanged: ReturnType<typeof createEventModule<typeof publicOnInventoryItemChanged>>;
|
|
174
|
+
declare const onInventoryVariantsChanged: ReturnType<typeof createEventModule<typeof publicOnInventoryVariantsChanged>>;
|
|
3437
175
|
|
|
3438
176
|
declare const context_decrementInventory: typeof decrementInventory;
|
|
3439
177
|
declare const context_getInventoryVariants: typeof getInventoryVariants;
|