@wix/auto_sdk_stores_inventory 1.0.78 → 1.0.79

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