@wix/auto_sdk_stores_inventory 1.0.43 → 1.0.45

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 (37) 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 +201 -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 +180 -178
  8. package/build/cjs/meta.js +140 -140
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +21 -21
  11. package/build/es/index.mjs +171 -171
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +201 -197
  14. package/build/es/index.typings.mjs +154 -154
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +180 -178
  17. package/build/es/meta.mjs +140 -140
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +21 -21
  20. package/build/internal/cjs/index.js +171 -171
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +234 -230
  23. package/build/internal/cjs/index.typings.js +154 -154
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +180 -178
  26. package/build/internal/cjs/meta.js +140 -140
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +21 -21
  29. package/build/internal/es/index.mjs +171 -171
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +234 -230
  32. package/build/internal/es/index.typings.mjs +154 -154
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +180 -178
  35. package/build/internal/es/meta.mjs +140 -140
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. 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;
@@ -224,6 +389,8 @@ interface MessageEnvelope {
224
389
  identity?: IdentificationData;
225
390
  /** Stringify payload. */
226
391
  data?: string;
392
+ /** Details related to the account */
393
+ accountInfo?: AccountInfo;
227
394
  }
228
395
  interface IdentificationData extends IdentificationDataIdOneOf {
229
396
  /**
@@ -298,171 +465,6 @@ interface AccountInfo {
298
465
  */
299
466
  siteId?: string | null;
300
467
  }
301
- interface UpdateInventoryVariantsRequest {
302
- /** Inventory item. */
303
- inventoryItem: InventoryItemV2;
304
- }
305
- interface UpdateInventoryVariantsResponse {
306
- }
307
- interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
308
- /** Change availability. */
309
- setInStock?: boolean | null;
310
- /** Set new quantity. */
311
- setQuantity?: number | null;
312
- /**
313
- * Number to increment inventory by.
314
- * @min 1
315
- */
316
- incrementBy?: number | null;
317
- /**
318
- * Number to decrement inventory by.
319
- * @min 1
320
- */
321
- decrementBy?: number | null;
322
- /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
323
- filter?: Record<string, any> | null;
324
- }
325
- /** @oneof */
326
- interface BulkUpdateInventoryVariantsRequestActionOneOf {
327
- /** Change availability. */
328
- setInStock?: boolean | null;
329
- /** Set new quantity. */
330
- setQuantity?: number | null;
331
- /**
332
- * Number to increment inventory by.
333
- * @min 1
334
- */
335
- incrementBy?: number | null;
336
- /**
337
- * Number to decrement inventory by.
338
- * @min 1
339
- */
340
- decrementBy?: number | null;
341
- }
342
- interface BulkUpdateInventoryVariantsResponse {
343
- }
344
- interface BulkUpdateInventoryItemsRequest {
345
- /** Variants filter */
346
- variantsFilter?: Record<string, any> | null;
347
- /** Whether inventory is being tracked. */
348
- trackInventory?: boolean | null;
349
- }
350
- interface BulkUpdateInventoryItemsResponse {
351
- }
352
- interface DecrementInventoryRequest {
353
- /**
354
- * Item or product to decrement.
355
- * @minSize 1
356
- * @maxSize 300
357
- */
358
- decrementData?: DecrementData[];
359
- }
360
- interface DecrementData extends DecrementDataIdOneOf {
361
- /**
362
- * Inventory item ID.
363
- * @maxLength 36
364
- */
365
- inventoryId?: string;
366
- /**
367
- * @internal
368
- * @internal
369
- * @maxLength 36
370
- * @deprecated Deprecated: use productId.
371
- * @replacedBy product_id
372
- * @targetRemovalDate 2024-12-31
373
- */
374
- externalId?: string;
375
- /**
376
- * Product ID.
377
- * @maxLength 36
378
- */
379
- productId?: string;
380
- /**
381
- * Variant ID.
382
- * @format GUID
383
- */
384
- variantId?: string;
385
- /**
386
- * Number to decrement inventory by.
387
- * @min 1
388
- */
389
- decrementBy?: number;
390
- /**
391
- * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
392
- * If true and the item is available for preorder, we allow negative inventory.
393
- * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
394
- */
395
- preorderRequest?: boolean;
396
- }
397
- /** @oneof */
398
- interface DecrementDataIdOneOf {
399
- /**
400
- * Inventory item ID.
401
- * @maxLength 36
402
- */
403
- inventoryId?: string;
404
- /**
405
- * @internal
406
- * @internal
407
- * @maxLength 36
408
- * @deprecated Deprecated: use productId.
409
- * @replacedBy product_id
410
- * @targetRemovalDate 2024-12-31
411
- */
412
- externalId?: string;
413
- /**
414
- * Product ID.
415
- * @maxLength 36
416
- */
417
- productId?: string;
418
- }
419
- interface DecrementInventoryResponse {
420
- }
421
- interface IncrementInventoryRequest {
422
- /**
423
- * Item or product to increment.
424
- * @minSize 1
425
- * @maxSize 300
426
- */
427
- incrementData?: IncrementData[];
428
- }
429
- interface IncrementData extends IncrementDataIdOneOf {
430
- /**
431
- * Inventory item ID.
432
- * @maxLength 36
433
- */
434
- inventoryId?: string;
435
- /**
436
- * Product ID.
437
- * @maxLength 36
438
- */
439
- productId?: string;
440
- /**
441
- * Variant ID.
442
- * @format GUID
443
- */
444
- variantId?: string;
445
- /**
446
- * Number to increment inventory by.
447
- * @min 1
448
- */
449
- incrementBy?: number;
450
- }
451
- /** @oneof */
452
- interface IncrementDataIdOneOf {
453
- /**
454
- * Inventory item ID.
455
- * @maxLength 36
456
- */
457
- inventoryId?: string;
458
- /**
459
- * Product ID.
460
- * @maxLength 36
461
- */
462
- productId?: string;
463
- }
464
- interface IncrementInventoryResponse {
465
- }
466
468
  interface BaseEventMetadata {
467
469
  /**
468
470
  * App instance ID.
@@ -476,6 +478,8 @@ interface BaseEventMetadata {
476
478
  eventType?: string;
477
479
  /** The identification type and identity data. */
478
480
  identity?: IdentificationData;
481
+ /** Details related to the account */
482
+ accountInfo?: AccountInfo;
479
483
  }
480
484
  interface InventoryItemChangedEnvelope {
481
485
  data: InventoryItemChanged;
@@ -523,59 +527,6 @@ interface InventoryVariantsChangedEnvelope {
523
527
  * @slug inventory_variants_changed
524
528
  */
525
529
  declare function onInventoryVariantsChanged(handler: (event: InventoryVariantsChangedEnvelope) => void | Promise<void>): void;
526
- /**
527
- * Gets inventory variant information based on the specified option choices.
528
- *
529
- *
530
- * The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
531
- * @param inventoryId - Inventory item ID.
532
- * @public
533
- * @requiredField inventoryId
534
- * @permissionId WIX_STORES.READ_INVENTORY
535
- * @applicableIdentity APP
536
- * @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
537
- */
538
- 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>>;
539
- interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
540
- /**
541
- * @internal
542
- * @internal
543
- * @deprecated Deprecated (use productID instead).
544
- * @replacedBy product_id
545
- * @targetRemovalDate 2024-12-31
546
- */
547
- externalId?: string;
548
- /** Product ID. */
549
- productId?: string;
550
- /** Variant IDs to query for this inventory item (optional). */
551
- variantIds?: string[];
552
- }
553
- /** @oneof */
554
- interface GetInventoryVariantsOptionsIdOneOf {
555
- /** Inventory item ID. */
556
- inventoryId?: string;
557
- /**
558
- * @internal
559
- * @deprecated Deprecated (use productID instead).
560
- * @replacedBy product_id
561
- * @targetRemovalDate 2024-12-31
562
- */
563
- externalId?: string;
564
- /** Product ID. */
565
- productId?: string;
566
- }
567
- /**
568
- * Returns a list of inventory items, given the provided paging, sorting and filtering.
569
- * @public
570
- * @permissionId WIX_STORES.READ_INVENTORY
571
- * @applicableIdentity APP
572
- * @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
573
- */
574
- declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 5>>;
575
- interface QueryInventoryOptions {
576
- /** Information about paging, filters, sorting. */
577
- query?: Query;
578
- }
579
530
  /**
580
531
  * Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
581
532
  *
@@ -647,5 +598,58 @@ declare function decrementInventory(decrementData: DecrementData[]): Promise<voi
647
598
  * @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
648
599
  */
649
600
  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
+ }
650
654
 
651
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 };