@wix/auto_sdk_stores_inventory 1.0.37 → 1.0.38

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 +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/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 +197 -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 +178 -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 +230 -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 +178 -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 +230 -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 +178 -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;
@@ -281,171 +446,6 @@ declare enum WebhookIdentityType {
281
446
  }
282
447
  /** @enumType */
283
448
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
284
- interface UpdateInventoryVariantsRequest {
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 {
336
- /**
337
- * Item or product to decrement.
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.
365
- * @format GUID
366
- */
367
- variantId?: string;
368
- /**
369
- * Number to decrement inventory by.
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.
425
- * @format GUID
426
- */
427
- variantId?: string;
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;
441
- /**
442
- * Product ID.
443
- * @maxLength 36
444
- */
445
- productId?: string;
446
- }
447
- interface IncrementInventoryResponse {
448
- }
449
449
  interface BaseEventMetadata {
450
450
  /**
451
451
  * App instance ID.
@@ -506,59 +506,6 @@ interface InventoryVariantsChangedEnvelope {
506
506
  * @slug inventory_variants_changed
507
507
  */
508
508
  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
509
  /**
563
510
  * Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
564
511
  *
@@ -630,5 +577,58 @@ declare function decrementInventory(decrementData: DecrementData[]): Promise<voi
630
577
  * @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
631
578
  */
632
579
  declare function incrementInventory(incrementData: IncrementData[]): Promise<void>;
580
+ /**
581
+ * Gets inventory variant information based on the specified option choices.
582
+ *
583
+ *
584
+ * The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
585
+ * @param inventoryId - Inventory item ID.
586
+ * @public
587
+ * @requiredField inventoryId
588
+ * @permissionId WIX_STORES.READ_INVENTORY
589
+ * @applicableIdentity APP
590
+ * @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
591
+ */
592
+ 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>>;
593
+ interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
594
+ /**
595
+ * @internal
596
+ * @internal
597
+ * @deprecated Deprecated (use productID instead).
598
+ * @replacedBy product_id
599
+ * @targetRemovalDate 2024-12-31
600
+ */
601
+ externalId?: string;
602
+ /** Product ID. */
603
+ productId?: string;
604
+ /** Variant IDs to query for this inventory item (optional). */
605
+ variantIds?: string[];
606
+ }
607
+ /** @oneof */
608
+ interface GetInventoryVariantsOptionsIdOneOf {
609
+ /** Inventory item ID. */
610
+ inventoryId?: string;
611
+ /**
612
+ * @internal
613
+ * @deprecated Deprecated (use productID instead).
614
+ * @replacedBy product_id
615
+ * @targetRemovalDate 2024-12-31
616
+ */
617
+ externalId?: string;
618
+ /** Product ID. */
619
+ productId?: string;
620
+ }
621
+ /**
622
+ * Returns a list of inventory items, given the provided paging, sorting and filtering.
623
+ * @public
624
+ * @permissionId WIX_STORES.READ_INVENTORY
625
+ * @applicableIdentity APP
626
+ * @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
627
+ */
628
+ declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 5>>;
629
+ interface QueryInventoryOptions {
630
+ /** Information about paging, filters, sorting. */
631
+ query?: Query;
632
+ }
633
633
 
634
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 };