@wix/auto_sdk_stores_inventory 1.0.37 → 1.0.39
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 +22 -22
- package/build/cjs/index.js +171 -171
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +206 -189
- package/build/cjs/index.typings.js +154 -154
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +187 -170
- package/build/cjs/meta.js +140 -140
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +22 -22
- package/build/es/index.mjs +171 -171
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +206 -189
- package/build/es/index.typings.mjs +154 -154
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +187 -170
- package/build/es/meta.mjs +140 -140
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +22 -22
- 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 +239 -222
- 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 +187 -170
- package/build/internal/cjs/meta.js +140 -140
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +22 -22
- 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 +239 -222
- 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 +187 -170
- package/build/internal/es/meta.mjs +140 -140
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -63,6 +63,183 @@ 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
|
+
}
|
|
66
243
|
interface InventoryItemChanged {
|
|
67
244
|
/** Inventory item ID. */
|
|
68
245
|
inventoryItemId?: string;
|
|
@@ -119,18 +296,6 @@ interface ChangedInventoryVariantData {
|
|
|
119
296
|
/** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
|
|
120
297
|
availableForPreorder?: boolean;
|
|
121
298
|
}
|
|
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';
|
|
134
299
|
interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
|
|
135
300
|
/** Inventory item ID. */
|
|
136
301
|
inventoryId: string;
|
|
@@ -281,170 +446,22 @@ declare enum WebhookIdentityType {
|
|
|
281
446
|
}
|
|
282
447
|
/** @enumType */
|
|
283
448
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
284
|
-
interface
|
|
285
|
-
/** Inventory item. */
|
|
286
|
-
inventoryItem: InventoryItemV2;
|
|
287
|
-
}
|
|
288
|
-
interface UpdateInventoryVariantsResponse {
|
|
289
|
-
}
|
|
290
|
-
interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
291
|
-
/** Change availability. */
|
|
292
|
-
setInStock?: boolean | null;
|
|
293
|
-
/** Set new quantity. */
|
|
294
|
-
setQuantity?: number | null;
|
|
295
|
-
/**
|
|
296
|
-
* Number to increment inventory by.
|
|
297
|
-
* @min 1
|
|
298
|
-
*/
|
|
299
|
-
incrementBy?: number | null;
|
|
300
|
-
/**
|
|
301
|
-
* Number to decrement inventory by.
|
|
302
|
-
* @min 1
|
|
303
|
-
*/
|
|
304
|
-
decrementBy?: number | null;
|
|
305
|
-
/** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
306
|
-
filter?: Record<string, any> | null;
|
|
307
|
-
}
|
|
308
|
-
/** @oneof */
|
|
309
|
-
interface 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
|
-
}
|
|
325
|
-
interface BulkUpdateInventoryVariantsResponse {
|
|
326
|
-
}
|
|
327
|
-
interface BulkUpdateInventoryItemsRequest {
|
|
328
|
-
/** Variants filter */
|
|
329
|
-
variantsFilter?: Record<string, any> | null;
|
|
330
|
-
/** Whether inventory is being tracked. */
|
|
331
|
-
trackInventory?: boolean | null;
|
|
332
|
-
}
|
|
333
|
-
interface BulkUpdateInventoryItemsResponse {
|
|
334
|
-
}
|
|
335
|
-
interface DecrementInventoryRequest {
|
|
449
|
+
interface AccountDetails {
|
|
336
450
|
/**
|
|
337
|
-
*
|
|
338
|
-
* @minSize 1
|
|
339
|
-
* @maxSize 300
|
|
340
|
-
*/
|
|
341
|
-
decrementData?: DecrementData[];
|
|
342
|
-
}
|
|
343
|
-
interface DecrementData extends DecrementDataIdOneOf {
|
|
344
|
-
/**
|
|
345
|
-
* Inventory item ID.
|
|
346
|
-
* @maxLength 36
|
|
347
|
-
*/
|
|
348
|
-
inventoryId?: string;
|
|
349
|
-
/**
|
|
350
|
-
* @internal
|
|
351
|
-
* @internal
|
|
352
|
-
* @maxLength 36
|
|
353
|
-
* @deprecated Deprecated: use productId.
|
|
354
|
-
* @replacedBy product_id
|
|
355
|
-
* @targetRemovalDate 2024-12-31
|
|
356
|
-
*/
|
|
357
|
-
externalId?: string;
|
|
358
|
-
/**
|
|
359
|
-
* Product ID.
|
|
360
|
-
* @maxLength 36
|
|
361
|
-
*/
|
|
362
|
-
productId?: string;
|
|
363
|
-
/**
|
|
364
|
-
* Variant ID.
|
|
451
|
+
* ID of the account.
|
|
365
452
|
* @format GUID
|
|
366
453
|
*/
|
|
367
|
-
|
|
454
|
+
accountId?: string | null;
|
|
368
455
|
/**
|
|
369
|
-
*
|
|
370
|
-
* @min 1
|
|
371
|
-
*/
|
|
372
|
-
decrementBy?: number;
|
|
373
|
-
/**
|
|
374
|
-
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
375
|
-
* If true and the item is available for preorder, we allow negative inventory.
|
|
376
|
-
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
377
|
-
*/
|
|
378
|
-
preorderRequest?: boolean;
|
|
379
|
-
}
|
|
380
|
-
/** @oneof */
|
|
381
|
-
interface DecrementDataIdOneOf {
|
|
382
|
-
/**
|
|
383
|
-
* Inventory item ID.
|
|
384
|
-
* @maxLength 36
|
|
385
|
-
*/
|
|
386
|
-
inventoryId?: string;
|
|
387
|
-
/**
|
|
388
|
-
* @internal
|
|
389
|
-
* @internal
|
|
390
|
-
* @maxLength 36
|
|
391
|
-
* @deprecated Deprecated: use productId.
|
|
392
|
-
* @replacedBy product_id
|
|
393
|
-
* @targetRemovalDate 2024-12-31
|
|
394
|
-
*/
|
|
395
|
-
externalId?: string;
|
|
396
|
-
/**
|
|
397
|
-
* Product ID.
|
|
398
|
-
* @maxLength 36
|
|
399
|
-
*/
|
|
400
|
-
productId?: string;
|
|
401
|
-
}
|
|
402
|
-
interface DecrementInventoryResponse {
|
|
403
|
-
}
|
|
404
|
-
interface IncrementInventoryRequest {
|
|
405
|
-
/**
|
|
406
|
-
* Item or product to increment.
|
|
407
|
-
* @minSize 1
|
|
408
|
-
* @maxSize 300
|
|
409
|
-
*/
|
|
410
|
-
incrementData?: IncrementData[];
|
|
411
|
-
}
|
|
412
|
-
interface IncrementData extends IncrementDataIdOneOf {
|
|
413
|
-
/**
|
|
414
|
-
* Inventory item ID.
|
|
415
|
-
* @maxLength 36
|
|
416
|
-
*/
|
|
417
|
-
inventoryId?: string;
|
|
418
|
-
/**
|
|
419
|
-
* Product ID.
|
|
420
|
-
* @maxLength 36
|
|
421
|
-
*/
|
|
422
|
-
productId?: string;
|
|
423
|
-
/**
|
|
424
|
-
* Variant ID.
|
|
456
|
+
* ID of the parent account.
|
|
425
457
|
* @format GUID
|
|
426
458
|
*/
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
* Number to increment inventory by.
|
|
430
|
-
* @min 1
|
|
431
|
-
*/
|
|
432
|
-
incrementBy?: number;
|
|
433
|
-
}
|
|
434
|
-
/** @oneof */
|
|
435
|
-
interface IncrementDataIdOneOf {
|
|
436
|
-
/**
|
|
437
|
-
* Inventory item ID.
|
|
438
|
-
* @maxLength 36
|
|
439
|
-
*/
|
|
440
|
-
inventoryId?: string;
|
|
459
|
+
parentAccountId?: string | null;
|
|
441
460
|
/**
|
|
442
|
-
*
|
|
443
|
-
* @
|
|
461
|
+
* ID of the site, if applicable.
|
|
462
|
+
* @format GUID
|
|
444
463
|
*/
|
|
445
|
-
|
|
446
|
-
}
|
|
447
|
-
interface IncrementInventoryResponse {
|
|
464
|
+
siteId?: string | null;
|
|
448
465
|
}
|
|
449
466
|
interface BaseEventMetadata {
|
|
450
467
|
/**
|
|
@@ -506,59 +523,6 @@ interface InventoryVariantsChangedEnvelope {
|
|
|
506
523
|
* @slug inventory_variants_changed
|
|
507
524
|
*/
|
|
508
525
|
declare function onInventoryVariantsChanged(handler: (event: InventoryVariantsChangedEnvelope) => void | Promise<void>): void;
|
|
509
|
-
/**
|
|
510
|
-
* Gets inventory variant information based on the specified option choices.
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
514
|
-
* @param inventoryId - Inventory item ID.
|
|
515
|
-
* @public
|
|
516
|
-
* @requiredField inventoryId
|
|
517
|
-
* @permissionId WIX_STORES.READ_INVENTORY
|
|
518
|
-
* @applicableIdentity APP
|
|
519
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
520
|
-
*/
|
|
521
|
-
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>>;
|
|
522
|
-
interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
|
|
523
|
-
/**
|
|
524
|
-
* @internal
|
|
525
|
-
* @internal
|
|
526
|
-
* @deprecated Deprecated (use productID instead).
|
|
527
|
-
* @replacedBy product_id
|
|
528
|
-
* @targetRemovalDate 2024-12-31
|
|
529
|
-
*/
|
|
530
|
-
externalId?: string;
|
|
531
|
-
/** Product ID. */
|
|
532
|
-
productId?: string;
|
|
533
|
-
/** Variant IDs to query for this inventory item (optional). */
|
|
534
|
-
variantIds?: string[];
|
|
535
|
-
}
|
|
536
|
-
/** @oneof */
|
|
537
|
-
interface GetInventoryVariantsOptionsIdOneOf {
|
|
538
|
-
/** Inventory item ID. */
|
|
539
|
-
inventoryId?: string;
|
|
540
|
-
/**
|
|
541
|
-
* @internal
|
|
542
|
-
* @deprecated Deprecated (use productID instead).
|
|
543
|
-
* @replacedBy product_id
|
|
544
|
-
* @targetRemovalDate 2024-12-31
|
|
545
|
-
*/
|
|
546
|
-
externalId?: string;
|
|
547
|
-
/** Product ID. */
|
|
548
|
-
productId?: string;
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Returns a list of inventory items, given the provided paging, sorting and filtering.
|
|
552
|
-
* @public
|
|
553
|
-
* @permissionId WIX_STORES.READ_INVENTORY
|
|
554
|
-
* @applicableIdentity APP
|
|
555
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
556
|
-
*/
|
|
557
|
-
declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 5>>;
|
|
558
|
-
interface QueryInventoryOptions {
|
|
559
|
-
/** Information about paging, filters, sorting. */
|
|
560
|
-
query?: Query;
|
|
561
|
-
}
|
|
562
526
|
/**
|
|
563
527
|
* Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
|
|
564
528
|
*
|
|
@@ -630,5 +594,58 @@ declare function decrementInventory(decrementData: DecrementData[]): Promise<voi
|
|
|
630
594
|
* @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
|
|
631
595
|
*/
|
|
632
596
|
declare function incrementInventory(incrementData: IncrementData[]): Promise<void>;
|
|
597
|
+
/**
|
|
598
|
+
* Gets inventory variant information based on the specified option choices.
|
|
599
|
+
*
|
|
600
|
+
*
|
|
601
|
+
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
602
|
+
* @param inventoryId - Inventory item ID.
|
|
603
|
+
* @public
|
|
604
|
+
* @requiredField inventoryId
|
|
605
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
606
|
+
* @applicableIdentity APP
|
|
607
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
608
|
+
*/
|
|
609
|
+
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>>;
|
|
610
|
+
interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
|
|
611
|
+
/**
|
|
612
|
+
* @internal
|
|
613
|
+
* @internal
|
|
614
|
+
* @deprecated Deprecated (use productID instead).
|
|
615
|
+
* @replacedBy product_id
|
|
616
|
+
* @targetRemovalDate 2024-12-31
|
|
617
|
+
*/
|
|
618
|
+
externalId?: string;
|
|
619
|
+
/** Product ID. */
|
|
620
|
+
productId?: string;
|
|
621
|
+
/** Variant IDs to query for this inventory item (optional). */
|
|
622
|
+
variantIds?: string[];
|
|
623
|
+
}
|
|
624
|
+
/** @oneof */
|
|
625
|
+
interface GetInventoryVariantsOptionsIdOneOf {
|
|
626
|
+
/** Inventory item ID. */
|
|
627
|
+
inventoryId?: string;
|
|
628
|
+
/**
|
|
629
|
+
* @internal
|
|
630
|
+
* @deprecated Deprecated (use productID instead).
|
|
631
|
+
* @replacedBy product_id
|
|
632
|
+
* @targetRemovalDate 2024-12-31
|
|
633
|
+
*/
|
|
634
|
+
externalId?: string;
|
|
635
|
+
/** Product ID. */
|
|
636
|
+
productId?: string;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Returns a list of inventory items, given the provided paging, sorting and filtering.
|
|
640
|
+
* @public
|
|
641
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
642
|
+
* @applicableIdentity APP
|
|
643
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
644
|
+
*/
|
|
645
|
+
declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 5>>;
|
|
646
|
+
interface QueryInventoryOptions {
|
|
647
|
+
/** Information about paging, filters, sorting. */
|
|
648
|
+
query?: Query;
|
|
649
|
+
}
|
|
633
650
|
|
|
634
|
-
export { 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 };
|
|
651
|
+
export { type AccountDetails, 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 };
|