@wix/auto_sdk_stores_inventory 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +21 -21
- package/build/cjs/index.js +171 -171
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +197 -197
- package/build/cjs/index.typings.js +154 -154
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +178 -178
- package/build/cjs/meta.js +140 -140
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +21 -21
- package/build/es/index.mjs +171 -171
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +197 -197
- package/build/es/index.typings.mjs +154 -154
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +178 -178
- package/build/es/meta.mjs +140 -140
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +21 -21
- package/build/internal/cjs/index.js +171 -171
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +230 -230
- package/build/internal/cjs/index.typings.js +154 -154
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +178 -178
- package/build/internal/cjs/meta.js +140 -140
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +21 -21
- package/build/internal/es/index.mjs +171 -171
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +230 -230
- package/build/internal/es/index.typings.mjs +154 -154
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +178 -178
- package/build/internal/es/meta.mjs +140 -140
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -63,183 +63,6 @@ interface PreorderInfo {
|
|
|
63
63
|
*/
|
|
64
64
|
limit?: number | null;
|
|
65
65
|
}
|
|
66
|
-
interface UpdateInventoryVariantsRequest {
|
|
67
|
-
/** Inventory item. */
|
|
68
|
-
inventoryItem: InventoryItemV2;
|
|
69
|
-
}
|
|
70
|
-
declare enum ReasonType {
|
|
71
|
-
/** Unknown reason. */
|
|
72
|
-
UNKNOWN = "UNKNOWN",
|
|
73
|
-
/** Order related. */
|
|
74
|
-
ORDER = "ORDER",
|
|
75
|
-
/** Manual adjustment. */
|
|
76
|
-
MANUAL = "MANUAL",
|
|
77
|
-
/** Reverting an inventory change. */
|
|
78
|
-
REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
|
|
79
|
-
}
|
|
80
|
-
/** @enumType */
|
|
81
|
-
type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
|
|
82
|
-
interface UpdateInventoryVariantsResponse {
|
|
83
|
-
}
|
|
84
|
-
interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
85
|
-
/** Change availability. */
|
|
86
|
-
setInStock?: boolean | null;
|
|
87
|
-
/** Set new quantity. */
|
|
88
|
-
setQuantity?: number | null;
|
|
89
|
-
/**
|
|
90
|
-
* Number to increment inventory by.
|
|
91
|
-
* @min 1
|
|
92
|
-
*/
|
|
93
|
-
incrementBy?: number | null;
|
|
94
|
-
/**
|
|
95
|
-
* Number to decrement inventory by.
|
|
96
|
-
* @min 1
|
|
97
|
-
*/
|
|
98
|
-
decrementBy?: number | null;
|
|
99
|
-
/** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
100
|
-
filter?: Record<string, any> | null;
|
|
101
|
-
}
|
|
102
|
-
/** @oneof */
|
|
103
|
-
interface BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
104
|
-
/** Change availability. */
|
|
105
|
-
setInStock?: boolean | null;
|
|
106
|
-
/** Set new quantity. */
|
|
107
|
-
setQuantity?: number | null;
|
|
108
|
-
/**
|
|
109
|
-
* Number to increment inventory by.
|
|
110
|
-
* @min 1
|
|
111
|
-
*/
|
|
112
|
-
incrementBy?: number | null;
|
|
113
|
-
/**
|
|
114
|
-
* Number to decrement inventory by.
|
|
115
|
-
* @min 1
|
|
116
|
-
*/
|
|
117
|
-
decrementBy?: number | null;
|
|
118
|
-
}
|
|
119
|
-
interface BulkUpdateInventoryVariantsResponse {
|
|
120
|
-
}
|
|
121
|
-
interface BulkUpdateInventoryItemsRequest {
|
|
122
|
-
/** Variants filter */
|
|
123
|
-
variantsFilter?: Record<string, any> | null;
|
|
124
|
-
/** Whether inventory is being tracked. */
|
|
125
|
-
trackInventory?: boolean | null;
|
|
126
|
-
}
|
|
127
|
-
interface BulkUpdateInventoryItemsResponse {
|
|
128
|
-
}
|
|
129
|
-
interface DecrementInventoryRequest {
|
|
130
|
-
/**
|
|
131
|
-
* Item or product to decrement.
|
|
132
|
-
* @minSize 1
|
|
133
|
-
* @maxSize 300
|
|
134
|
-
*/
|
|
135
|
-
decrementData?: DecrementData[];
|
|
136
|
-
}
|
|
137
|
-
interface DecrementData extends DecrementDataIdOneOf {
|
|
138
|
-
/**
|
|
139
|
-
* Inventory item ID.
|
|
140
|
-
* @maxLength 36
|
|
141
|
-
*/
|
|
142
|
-
inventoryId?: string;
|
|
143
|
-
/**
|
|
144
|
-
* @internal
|
|
145
|
-
* @internal
|
|
146
|
-
* @maxLength 36
|
|
147
|
-
* @deprecated Deprecated: use productId.
|
|
148
|
-
* @replacedBy product_id
|
|
149
|
-
* @targetRemovalDate 2024-12-31
|
|
150
|
-
*/
|
|
151
|
-
externalId?: string;
|
|
152
|
-
/**
|
|
153
|
-
* Product ID.
|
|
154
|
-
* @maxLength 36
|
|
155
|
-
*/
|
|
156
|
-
productId?: string;
|
|
157
|
-
/**
|
|
158
|
-
* Variant ID.
|
|
159
|
-
* @format GUID
|
|
160
|
-
*/
|
|
161
|
-
variantId?: string;
|
|
162
|
-
/**
|
|
163
|
-
* Number to decrement inventory by.
|
|
164
|
-
* @min 1
|
|
165
|
-
*/
|
|
166
|
-
decrementBy?: number;
|
|
167
|
-
/**
|
|
168
|
-
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
169
|
-
* If true and the item is available for preorder, we allow negative inventory.
|
|
170
|
-
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
171
|
-
*/
|
|
172
|
-
preorderRequest?: boolean;
|
|
173
|
-
}
|
|
174
|
-
/** @oneof */
|
|
175
|
-
interface DecrementDataIdOneOf {
|
|
176
|
-
/**
|
|
177
|
-
* Inventory item ID.
|
|
178
|
-
* @maxLength 36
|
|
179
|
-
*/
|
|
180
|
-
inventoryId?: string;
|
|
181
|
-
/**
|
|
182
|
-
* @internal
|
|
183
|
-
* @internal
|
|
184
|
-
* @maxLength 36
|
|
185
|
-
* @deprecated Deprecated: use productId.
|
|
186
|
-
* @replacedBy product_id
|
|
187
|
-
* @targetRemovalDate 2024-12-31
|
|
188
|
-
*/
|
|
189
|
-
externalId?: string;
|
|
190
|
-
/**
|
|
191
|
-
* Product ID.
|
|
192
|
-
* @maxLength 36
|
|
193
|
-
*/
|
|
194
|
-
productId?: string;
|
|
195
|
-
}
|
|
196
|
-
interface DecrementInventoryResponse {
|
|
197
|
-
}
|
|
198
|
-
interface IncrementInventoryRequest {
|
|
199
|
-
/**
|
|
200
|
-
* Item or product to increment.
|
|
201
|
-
* @minSize 1
|
|
202
|
-
* @maxSize 300
|
|
203
|
-
*/
|
|
204
|
-
incrementData?: IncrementData[];
|
|
205
|
-
}
|
|
206
|
-
interface IncrementData extends IncrementDataIdOneOf {
|
|
207
|
-
/**
|
|
208
|
-
* Inventory item ID.
|
|
209
|
-
* @maxLength 36
|
|
210
|
-
*/
|
|
211
|
-
inventoryId?: string;
|
|
212
|
-
/**
|
|
213
|
-
* Product ID.
|
|
214
|
-
* @maxLength 36
|
|
215
|
-
*/
|
|
216
|
-
productId?: string;
|
|
217
|
-
/**
|
|
218
|
-
* Variant ID.
|
|
219
|
-
* @format GUID
|
|
220
|
-
*/
|
|
221
|
-
variantId?: string;
|
|
222
|
-
/**
|
|
223
|
-
* Number to increment inventory by.
|
|
224
|
-
* @min 1
|
|
225
|
-
*/
|
|
226
|
-
incrementBy?: number;
|
|
227
|
-
}
|
|
228
|
-
/** @oneof */
|
|
229
|
-
interface IncrementDataIdOneOf {
|
|
230
|
-
/**
|
|
231
|
-
* Inventory item ID.
|
|
232
|
-
* @maxLength 36
|
|
233
|
-
*/
|
|
234
|
-
inventoryId?: string;
|
|
235
|
-
/**
|
|
236
|
-
* Product ID.
|
|
237
|
-
* @maxLength 36
|
|
238
|
-
*/
|
|
239
|
-
productId?: string;
|
|
240
|
-
}
|
|
241
|
-
interface IncrementInventoryResponse {
|
|
242
|
-
}
|
|
243
66
|
interface InventoryItemChanged {
|
|
244
67
|
/** Inventory item ID. */
|
|
245
68
|
inventoryItemId?: string;
|
|
@@ -296,6 +119,18 @@ interface ChangedInventoryVariantData {
|
|
|
296
119
|
/** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
|
|
297
120
|
availableForPreorder?: boolean;
|
|
298
121
|
}
|
|
122
|
+
declare enum ReasonType {
|
|
123
|
+
/** Unknown reason. */
|
|
124
|
+
UNKNOWN = "UNKNOWN",
|
|
125
|
+
/** Order related. */
|
|
126
|
+
ORDER = "ORDER",
|
|
127
|
+
/** Manual adjustment. */
|
|
128
|
+
MANUAL = "MANUAL",
|
|
129
|
+
/** Reverting an inventory change. */
|
|
130
|
+
REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
|
|
131
|
+
}
|
|
132
|
+
/** @enumType */
|
|
133
|
+
type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
|
|
299
134
|
interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
|
|
300
135
|
/** Inventory item ID. */
|
|
301
136
|
inventoryId: string;
|
|
@@ -465,6 +300,171 @@ interface AccountInfo {
|
|
|
465
300
|
*/
|
|
466
301
|
siteId?: string | null;
|
|
467
302
|
}
|
|
303
|
+
interface UpdateInventoryVariantsRequest {
|
|
304
|
+
/** Inventory item. */
|
|
305
|
+
inventoryItem: InventoryItemV2;
|
|
306
|
+
}
|
|
307
|
+
interface UpdateInventoryVariantsResponse {
|
|
308
|
+
}
|
|
309
|
+
interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
310
|
+
/** Change availability. */
|
|
311
|
+
setInStock?: boolean | null;
|
|
312
|
+
/** Set new quantity. */
|
|
313
|
+
setQuantity?: number | null;
|
|
314
|
+
/**
|
|
315
|
+
* Number to increment inventory by.
|
|
316
|
+
* @min 1
|
|
317
|
+
*/
|
|
318
|
+
incrementBy?: number | null;
|
|
319
|
+
/**
|
|
320
|
+
* Number to decrement inventory by.
|
|
321
|
+
* @min 1
|
|
322
|
+
*/
|
|
323
|
+
decrementBy?: number | null;
|
|
324
|
+
/** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
325
|
+
filter?: Record<string, any> | null;
|
|
326
|
+
}
|
|
327
|
+
/** @oneof */
|
|
328
|
+
interface BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
329
|
+
/** Change availability. */
|
|
330
|
+
setInStock?: boolean | null;
|
|
331
|
+
/** Set new quantity. */
|
|
332
|
+
setQuantity?: number | null;
|
|
333
|
+
/**
|
|
334
|
+
* Number to increment inventory by.
|
|
335
|
+
* @min 1
|
|
336
|
+
*/
|
|
337
|
+
incrementBy?: number | null;
|
|
338
|
+
/**
|
|
339
|
+
* Number to decrement inventory by.
|
|
340
|
+
* @min 1
|
|
341
|
+
*/
|
|
342
|
+
decrementBy?: number | null;
|
|
343
|
+
}
|
|
344
|
+
interface BulkUpdateInventoryVariantsResponse {
|
|
345
|
+
}
|
|
346
|
+
interface BulkUpdateInventoryItemsRequest {
|
|
347
|
+
/** Variants filter */
|
|
348
|
+
variantsFilter?: Record<string, any> | null;
|
|
349
|
+
/** Whether inventory is being tracked. */
|
|
350
|
+
trackInventory?: boolean | null;
|
|
351
|
+
}
|
|
352
|
+
interface BulkUpdateInventoryItemsResponse {
|
|
353
|
+
}
|
|
354
|
+
interface DecrementInventoryRequest {
|
|
355
|
+
/**
|
|
356
|
+
* Item or product to decrement.
|
|
357
|
+
* @minSize 1
|
|
358
|
+
* @maxSize 300
|
|
359
|
+
*/
|
|
360
|
+
decrementData?: DecrementData[];
|
|
361
|
+
}
|
|
362
|
+
interface DecrementData extends DecrementDataIdOneOf {
|
|
363
|
+
/**
|
|
364
|
+
* Inventory item ID.
|
|
365
|
+
* @maxLength 36
|
|
366
|
+
*/
|
|
367
|
+
inventoryId?: string;
|
|
368
|
+
/**
|
|
369
|
+
* @internal
|
|
370
|
+
* @internal
|
|
371
|
+
* @maxLength 36
|
|
372
|
+
* @deprecated Deprecated: use productId.
|
|
373
|
+
* @replacedBy product_id
|
|
374
|
+
* @targetRemovalDate 2024-12-31
|
|
375
|
+
*/
|
|
376
|
+
externalId?: string;
|
|
377
|
+
/**
|
|
378
|
+
* Product ID.
|
|
379
|
+
* @maxLength 36
|
|
380
|
+
*/
|
|
381
|
+
productId?: string;
|
|
382
|
+
/**
|
|
383
|
+
* Variant ID.
|
|
384
|
+
* @format GUID
|
|
385
|
+
*/
|
|
386
|
+
variantId?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Number to decrement inventory by.
|
|
389
|
+
* @min 1
|
|
390
|
+
*/
|
|
391
|
+
decrementBy?: number;
|
|
392
|
+
/**
|
|
393
|
+
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
394
|
+
* If true and the item is available for preorder, we allow negative inventory.
|
|
395
|
+
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
396
|
+
*/
|
|
397
|
+
preorderRequest?: boolean;
|
|
398
|
+
}
|
|
399
|
+
/** @oneof */
|
|
400
|
+
interface DecrementDataIdOneOf {
|
|
401
|
+
/**
|
|
402
|
+
* Inventory item ID.
|
|
403
|
+
* @maxLength 36
|
|
404
|
+
*/
|
|
405
|
+
inventoryId?: string;
|
|
406
|
+
/**
|
|
407
|
+
* @internal
|
|
408
|
+
* @internal
|
|
409
|
+
* @maxLength 36
|
|
410
|
+
* @deprecated Deprecated: use productId.
|
|
411
|
+
* @replacedBy product_id
|
|
412
|
+
* @targetRemovalDate 2024-12-31
|
|
413
|
+
*/
|
|
414
|
+
externalId?: string;
|
|
415
|
+
/**
|
|
416
|
+
* Product ID.
|
|
417
|
+
* @maxLength 36
|
|
418
|
+
*/
|
|
419
|
+
productId?: string;
|
|
420
|
+
}
|
|
421
|
+
interface DecrementInventoryResponse {
|
|
422
|
+
}
|
|
423
|
+
interface IncrementInventoryRequest {
|
|
424
|
+
/**
|
|
425
|
+
* Item or product to increment.
|
|
426
|
+
* @minSize 1
|
|
427
|
+
* @maxSize 300
|
|
428
|
+
*/
|
|
429
|
+
incrementData?: IncrementData[];
|
|
430
|
+
}
|
|
431
|
+
interface IncrementData extends IncrementDataIdOneOf {
|
|
432
|
+
/**
|
|
433
|
+
* Inventory item ID.
|
|
434
|
+
* @maxLength 36
|
|
435
|
+
*/
|
|
436
|
+
inventoryId?: string;
|
|
437
|
+
/**
|
|
438
|
+
* Product ID.
|
|
439
|
+
* @maxLength 36
|
|
440
|
+
*/
|
|
441
|
+
productId?: string;
|
|
442
|
+
/**
|
|
443
|
+
* Variant ID.
|
|
444
|
+
* @format GUID
|
|
445
|
+
*/
|
|
446
|
+
variantId?: string;
|
|
447
|
+
/**
|
|
448
|
+
* Number to increment inventory by.
|
|
449
|
+
* @min 1
|
|
450
|
+
*/
|
|
451
|
+
incrementBy?: number;
|
|
452
|
+
}
|
|
453
|
+
/** @oneof */
|
|
454
|
+
interface IncrementDataIdOneOf {
|
|
455
|
+
/**
|
|
456
|
+
* Inventory item ID.
|
|
457
|
+
* @maxLength 36
|
|
458
|
+
*/
|
|
459
|
+
inventoryId?: string;
|
|
460
|
+
/**
|
|
461
|
+
* Product ID.
|
|
462
|
+
* @maxLength 36
|
|
463
|
+
*/
|
|
464
|
+
productId?: string;
|
|
465
|
+
}
|
|
466
|
+
interface IncrementInventoryResponse {
|
|
467
|
+
}
|
|
468
468
|
interface BaseEventMetadata {
|
|
469
469
|
/**
|
|
470
470
|
* App instance ID.
|
|
@@ -527,6 +527,59 @@ interface InventoryVariantsChangedEnvelope {
|
|
|
527
527
|
* @slug inventory_variants_changed
|
|
528
528
|
*/
|
|
529
529
|
declare function onInventoryVariantsChanged(handler: (event: InventoryVariantsChangedEnvelope) => void | Promise<void>): void;
|
|
530
|
+
/**
|
|
531
|
+
* Gets inventory variant information based on the specified option choices.
|
|
532
|
+
*
|
|
533
|
+
*
|
|
534
|
+
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
535
|
+
* @param inventoryId - Inventory item ID.
|
|
536
|
+
* @public
|
|
537
|
+
* @requiredField inventoryId
|
|
538
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
539
|
+
* @applicableIdentity APP
|
|
540
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
541
|
+
*/
|
|
542
|
+
declare function getInventoryVariants(inventoryId: string, options?: GetInventoryVariantsOptions): Promise<NonNullablePaths<GetInventoryVariantsResponse, `inventoryItem.variants` | `inventoryItem.variants.${number}.variantId` | `inventoryItem.variants.${number}.availableForPreorder` | `inventoryItem.numericId` | `inventoryItem.preorderInfo.enabled`, 5>>;
|
|
543
|
+
interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
|
|
544
|
+
/**
|
|
545
|
+
* @internal
|
|
546
|
+
* @internal
|
|
547
|
+
* @deprecated Deprecated (use productID instead).
|
|
548
|
+
* @replacedBy product_id
|
|
549
|
+
* @targetRemovalDate 2024-12-31
|
|
550
|
+
*/
|
|
551
|
+
externalId?: string;
|
|
552
|
+
/** Product ID. */
|
|
553
|
+
productId?: string;
|
|
554
|
+
/** Variant IDs to query for this inventory item (optional). */
|
|
555
|
+
variantIds?: string[];
|
|
556
|
+
}
|
|
557
|
+
/** @oneof */
|
|
558
|
+
interface GetInventoryVariantsOptionsIdOneOf {
|
|
559
|
+
/** Inventory item ID. */
|
|
560
|
+
inventoryId?: string;
|
|
561
|
+
/**
|
|
562
|
+
* @internal
|
|
563
|
+
* @deprecated Deprecated (use productID instead).
|
|
564
|
+
* @replacedBy product_id
|
|
565
|
+
* @targetRemovalDate 2024-12-31
|
|
566
|
+
*/
|
|
567
|
+
externalId?: string;
|
|
568
|
+
/** Product ID. */
|
|
569
|
+
productId?: string;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Returns a list of inventory items, given the provided paging, sorting and filtering.
|
|
573
|
+
* @public
|
|
574
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
575
|
+
* @applicableIdentity APP
|
|
576
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
577
|
+
*/
|
|
578
|
+
declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 5>>;
|
|
579
|
+
interface QueryInventoryOptions {
|
|
580
|
+
/** Information about paging, filters, sorting. */
|
|
581
|
+
query?: Query;
|
|
582
|
+
}
|
|
530
583
|
/**
|
|
531
584
|
* Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
|
|
532
585
|
*
|
|
@@ -598,58 +651,5 @@ declare function decrementInventory(decrementData: DecrementData[]): Promise<voi
|
|
|
598
651
|
* @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
|
|
599
652
|
*/
|
|
600
653
|
declare function incrementInventory(incrementData: IncrementData[]): Promise<void>;
|
|
601
|
-
/**
|
|
602
|
-
* Gets inventory variant information based on the specified option choices.
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
606
|
-
* @param inventoryId - Inventory item ID.
|
|
607
|
-
* @public
|
|
608
|
-
* @requiredField inventoryId
|
|
609
|
-
* @permissionId WIX_STORES.READ_INVENTORY
|
|
610
|
-
* @applicableIdentity APP
|
|
611
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
612
|
-
*/
|
|
613
|
-
declare function getInventoryVariants(inventoryId: string, options?: GetInventoryVariantsOptions): Promise<NonNullablePaths<GetInventoryVariantsResponse, `inventoryItem.variants` | `inventoryItem.variants.${number}.variantId` | `inventoryItem.variants.${number}.availableForPreorder` | `inventoryItem.numericId` | `inventoryItem.preorderInfo.enabled`, 5>>;
|
|
614
|
-
interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
|
|
615
|
-
/**
|
|
616
|
-
* @internal
|
|
617
|
-
* @internal
|
|
618
|
-
* @deprecated Deprecated (use productID instead).
|
|
619
|
-
* @replacedBy product_id
|
|
620
|
-
* @targetRemovalDate 2024-12-31
|
|
621
|
-
*/
|
|
622
|
-
externalId?: string;
|
|
623
|
-
/** Product ID. */
|
|
624
|
-
productId?: string;
|
|
625
|
-
/** Variant IDs to query for this inventory item (optional). */
|
|
626
|
-
variantIds?: string[];
|
|
627
|
-
}
|
|
628
|
-
/** @oneof */
|
|
629
|
-
interface GetInventoryVariantsOptionsIdOneOf {
|
|
630
|
-
/** Inventory item ID. */
|
|
631
|
-
inventoryId?: string;
|
|
632
|
-
/**
|
|
633
|
-
* @internal
|
|
634
|
-
* @deprecated Deprecated (use productID instead).
|
|
635
|
-
* @replacedBy product_id
|
|
636
|
-
* @targetRemovalDate 2024-12-31
|
|
637
|
-
*/
|
|
638
|
-
externalId?: string;
|
|
639
|
-
/** Product ID. */
|
|
640
|
-
productId?: string;
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Returns a list of inventory items, given the provided paging, sorting and filtering.
|
|
644
|
-
* @public
|
|
645
|
-
* @permissionId WIX_STORES.READ_INVENTORY
|
|
646
|
-
* @applicableIdentity APP
|
|
647
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
648
|
-
*/
|
|
649
|
-
declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 5>>;
|
|
650
|
-
interface QueryInventoryOptions {
|
|
651
|
-
/** Information about paging, filters, sorting. */
|
|
652
|
-
query?: Query;
|
|
653
|
-
}
|
|
654
654
|
|
|
655
655
|
export { type AccountInfo, type BaseEventMetadata, type BulkUpdateInventoryItemsRequest, type BulkUpdateInventoryItemsResponse, type BulkUpdateInventoryVariantsRequest, type BulkUpdateInventoryVariantsRequestActionOneOf, type BulkUpdateInventoryVariantsResponse, type ChangedInventoryVariant, type ChangedInventoryVariantData, type DecrementData, type DecrementDataIdOneOf, type DecrementInventoryRequest, type DecrementInventoryResponse, type GetInventoryItemsRequest, type GetInventoryItemsResponse, type GetInventoryVariantsOptions, type GetInventoryVariantsOptionsIdOneOf, type GetInventoryVariantsRequest, type GetInventoryVariantsRequestIdOneOf, type GetInventoryVariantsResponse, type IdentificationData, type IdentificationDataIdOneOf, type IncrementData, type IncrementDataIdOneOf, type IncrementInventoryRequest, type IncrementInventoryResponse, type InventoryItemChanged, type InventoryItemChangedEnvelope, type InventoryItemV2, type InventoryVariantV2, type InventoryVariantsChanged, type InventoryVariantsChangedEnvelope, type MessageEnvelope, type Paging, type PagingMetadata, type PreorderInfo, type Query, type QueryInventoryOptions, type QueryInventoryRequest, type QueryInventoryResponse, ReasonType, type ReasonTypeWithLiterals, type UpdateInventoryVariantsInventoryItem, type UpdateInventoryVariantsRequest, type UpdateInventoryVariantsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, decrementInventory, getInventoryVariants, incrementInventory, onInventoryItemChanged, onInventoryVariantsChanged, queryInventory, updateInventoryVariants };
|