@wix/auto_sdk_stores_inventory 1.0.72 → 1.0.74

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.
Files changed (49) hide show
  1. package/build/cjs/index.d.ts +21 -21
  2. package/build/cjs/index.js +171 -171
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +197 -197
  5. package/build/cjs/index.typings.js +154 -154
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +178 -178
  8. package/build/cjs/meta.js +140 -140
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +63 -63
  11. package/build/cjs/schemas.js +100 -100
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +21 -21
  14. package/build/es/index.mjs +171 -171
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +197 -197
  17. package/build/es/index.typings.mjs +154 -154
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +178 -178
  20. package/build/es/meta.mjs +140 -140
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +63 -63
  23. package/build/es/schemas.mjs +100 -100
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +21 -21
  26. package/build/internal/cjs/index.js +171 -171
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +247 -230
  29. package/build/internal/cjs/index.typings.js +154 -154
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +195 -178
  32. package/build/internal/cjs/meta.js +140 -140
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +63 -63
  35. package/build/internal/cjs/schemas.js +100 -100
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +21 -21
  38. package/build/internal/es/index.mjs +171 -171
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +247 -230
  41. package/build/internal/es/index.typings.mjs +154 -154
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +195 -178
  44. package/build/internal/es/meta.mjs +140 -140
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +63 -63
  47. package/build/internal/es/schemas.mjs +100 -100
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +4 -4
@@ -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;
@@ -277,6 +100,11 @@ interface InventoryVariantsChanged {
277
100
  productId?: string;
278
101
  /** Information about changed variants. */
279
102
  variants?: ChangedInventoryVariant[];
103
+ /**
104
+ * Reason data
105
+ * @internal
106
+ */
107
+ reason?: ReasonTypeWithLiterals;
280
108
  /** Date and time the inventory variant item was last updated. */
281
109
  _updatedDate?: Date | null;
282
110
  }
@@ -296,6 +124,18 @@ interface ChangedInventoryVariantData {
296
124
  /** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
297
125
  availableForPreorder?: boolean;
298
126
  }
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';
299
139
  interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
300
140
  /** Inventory item ID. */
301
141
  inventoryId: string;
@@ -465,6 +305,183 @@ interface AccountInfo {
465
305
  */
466
306
  siteId?: string | null;
467
307
  }
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
+ }
468
485
  interface BaseEventMetadata {
469
486
  /**
470
487
  * App instance ID.
@@ -527,6 +544,59 @@ interface InventoryVariantsChangedEnvelope {
527
544
  * @slug inventory_variants_changed
528
545
  */
529
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
+ }
530
600
  /**
531
601
  * Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
532
602
  *
@@ -598,58 +668,5 @@ declare function decrementInventory(decrementData: DecrementData[]): Promise<voi
598
668
  * @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
599
669
  */
600
670
  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
671
 
655
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 };