@wix/auto_sdk_stores_inventory 1.0.88 → 1.0.89

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.
@@ -59,165 +59,6 @@ interface PreorderInfo {
59
59
  */
60
60
  limit?: number | null;
61
61
  }
62
- interface UpdateInventoryVariantsRequest {
63
- /** Inventory item. */
64
- inventoryItem: InventoryItemV2;
65
- }
66
- declare enum ReasonType {
67
- /** Unknown reason. */
68
- UNKNOWN = "UNKNOWN",
69
- /** Order related. */
70
- ORDER = "ORDER",
71
- /** Manual adjustment. */
72
- MANUAL = "MANUAL",
73
- /** Reverting an inventory change. */
74
- REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
75
- }
76
- /** @enumType */
77
- type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
78
- interface UpdateInventoryVariantsResponse {
79
- }
80
- interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
81
- /** Change availability. */
82
- setInStock?: boolean | null;
83
- /** Set new quantity. */
84
- setQuantity?: number | null;
85
- /**
86
- * Number to increment inventory by.
87
- * @min 1
88
- */
89
- incrementBy?: number | null;
90
- /**
91
- * Number to decrement inventory by.
92
- * @min 1
93
- */
94
- decrementBy?: number | null;
95
- /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
96
- filter?: Record<string, any> | null;
97
- }
98
- /** @oneof */
99
- interface BulkUpdateInventoryVariantsRequestActionOneOf {
100
- /** Change availability. */
101
- setInStock?: boolean | null;
102
- /** Set new quantity. */
103
- setQuantity?: number | null;
104
- /**
105
- * Number to increment inventory by.
106
- * @min 1
107
- */
108
- incrementBy?: number | null;
109
- /**
110
- * Number to decrement inventory by.
111
- * @min 1
112
- */
113
- decrementBy?: number | null;
114
- }
115
- interface BulkUpdateInventoryVariantsResponse {
116
- }
117
- interface BulkUpdateInventoryItemsRequest {
118
- /** Variants filter */
119
- variantsFilter?: Record<string, any> | null;
120
- /** Whether inventory is being tracked. */
121
- trackInventory?: boolean | null;
122
- }
123
- interface BulkUpdateInventoryItemsResponse {
124
- }
125
- interface DecrementInventoryRequest {
126
- /**
127
- * Item or product to decrement.
128
- * @minSize 1
129
- * @maxSize 300
130
- */
131
- decrementData?: DecrementData[];
132
- }
133
- interface DecrementData extends DecrementDataIdOneOf {
134
- /**
135
- * Inventory item ID.
136
- * @maxLength 36
137
- */
138
- inventoryId?: string;
139
- /**
140
- * Product ID.
141
- * @maxLength 36
142
- */
143
- productId?: string;
144
- /**
145
- * Variant ID.
146
- * @format GUID
147
- */
148
- variantId?: string;
149
- /**
150
- * Number to decrement inventory by.
151
- * @min 1
152
- */
153
- decrementBy?: number;
154
- /**
155
- * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
156
- * If true and the item is available for preorder, we allow negative inventory.
157
- * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
158
- */
159
- preorderRequest?: boolean;
160
- }
161
- /** @oneof */
162
- interface DecrementDataIdOneOf {
163
- /**
164
- * Inventory item ID.
165
- * @maxLength 36
166
- */
167
- inventoryId?: string;
168
- /**
169
- * Product ID.
170
- * @maxLength 36
171
- */
172
- productId?: string;
173
- }
174
- interface DecrementInventoryResponse {
175
- }
176
- interface IncrementInventoryRequest {
177
- /**
178
- * Item or product to increment.
179
- * @minSize 1
180
- * @maxSize 300
181
- */
182
- incrementData?: IncrementData[];
183
- }
184
- interface IncrementData extends IncrementDataIdOneOf {
185
- /**
186
- * Inventory item ID.
187
- * @maxLength 36
188
- */
189
- inventoryId?: string;
190
- /**
191
- * Product ID.
192
- * @maxLength 36
193
- */
194
- productId?: string;
195
- /**
196
- * Variant ID.
197
- * @format GUID
198
- */
199
- variantId?: string;
200
- /**
201
- * Number to increment inventory by.
202
- * @min 1
203
- */
204
- incrementBy?: number;
205
- }
206
- /** @oneof */
207
- interface IncrementDataIdOneOf {
208
- /**
209
- * Inventory item ID.
210
- * @maxLength 36
211
- */
212
- inventoryId?: string;
213
- /**
214
- * Product ID.
215
- * @maxLength 36
216
- */
217
- productId?: string;
218
- }
219
- interface IncrementInventoryResponse {
220
- }
221
62
  interface InventoryItemChanged {
222
63
  /** Inventory item ID. */
223
64
  inventoryItemId?: string;
@@ -258,6 +99,18 @@ interface ChangedInventoryVariantData {
258
99
  /** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
259
100
  availableForPreorder?: boolean;
260
101
  }
102
+ declare enum ReasonType {
103
+ /** Unknown reason. */
104
+ UNKNOWN = "UNKNOWN",
105
+ /** Order related. */
106
+ ORDER = "ORDER",
107
+ /** Manual adjustment. */
108
+ MANUAL = "MANUAL",
109
+ /** Reverting an inventory change. */
110
+ REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
111
+ }
112
+ /** @enumType */
113
+ type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
261
114
  interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
262
115
  /** Inventory item ID. */
263
116
  inventoryId: string;
@@ -411,6 +264,153 @@ interface AccountInfo {
411
264
  */
412
265
  siteId?: string | null;
413
266
  }
267
+ interface UpdateInventoryVariantsRequest {
268
+ /** Inventory item. */
269
+ inventoryItem: InventoryItemV2;
270
+ }
271
+ interface UpdateInventoryVariantsResponse {
272
+ }
273
+ interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
274
+ /** Change availability. */
275
+ setInStock?: boolean | null;
276
+ /** Set new quantity. */
277
+ setQuantity?: number | null;
278
+ /**
279
+ * Number to increment inventory by.
280
+ * @min 1
281
+ */
282
+ incrementBy?: number | null;
283
+ /**
284
+ * Number to decrement inventory by.
285
+ * @min 1
286
+ */
287
+ decrementBy?: number | null;
288
+ /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
289
+ filter?: Record<string, any> | null;
290
+ }
291
+ /** @oneof */
292
+ interface BulkUpdateInventoryVariantsRequestActionOneOf {
293
+ /** Change availability. */
294
+ setInStock?: boolean | null;
295
+ /** Set new quantity. */
296
+ setQuantity?: number | null;
297
+ /**
298
+ * Number to increment inventory by.
299
+ * @min 1
300
+ */
301
+ incrementBy?: number | null;
302
+ /**
303
+ * Number to decrement inventory by.
304
+ * @min 1
305
+ */
306
+ decrementBy?: number | null;
307
+ }
308
+ interface BulkUpdateInventoryVariantsResponse {
309
+ }
310
+ interface BulkUpdateInventoryItemsRequest {
311
+ /** Variants filter */
312
+ variantsFilter?: Record<string, any> | null;
313
+ /** Whether inventory is being tracked. */
314
+ trackInventory?: boolean | null;
315
+ }
316
+ interface BulkUpdateInventoryItemsResponse {
317
+ }
318
+ interface DecrementInventoryRequest {
319
+ /**
320
+ * Item or product to decrement.
321
+ * @minSize 1
322
+ * @maxSize 300
323
+ */
324
+ decrementData?: DecrementData[];
325
+ }
326
+ interface DecrementData extends DecrementDataIdOneOf {
327
+ /**
328
+ * Inventory item ID.
329
+ * @maxLength 36
330
+ */
331
+ inventoryId?: string;
332
+ /**
333
+ * Product ID.
334
+ * @maxLength 36
335
+ */
336
+ productId?: string;
337
+ /**
338
+ * Variant ID.
339
+ * @format GUID
340
+ */
341
+ variantId?: string;
342
+ /**
343
+ * Number to decrement inventory by.
344
+ * @min 1
345
+ */
346
+ decrementBy?: number;
347
+ /**
348
+ * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
349
+ * If true and the item is available for preorder, we allow negative inventory.
350
+ * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
351
+ */
352
+ preorderRequest?: boolean;
353
+ }
354
+ /** @oneof */
355
+ interface DecrementDataIdOneOf {
356
+ /**
357
+ * Inventory item ID.
358
+ * @maxLength 36
359
+ */
360
+ inventoryId?: string;
361
+ /**
362
+ * Product ID.
363
+ * @maxLength 36
364
+ */
365
+ productId?: string;
366
+ }
367
+ interface DecrementInventoryResponse {
368
+ }
369
+ interface IncrementInventoryRequest {
370
+ /**
371
+ * Item or product to increment.
372
+ * @minSize 1
373
+ * @maxSize 300
374
+ */
375
+ incrementData?: IncrementData[];
376
+ }
377
+ interface IncrementData extends IncrementDataIdOneOf {
378
+ /**
379
+ * Inventory item ID.
380
+ * @maxLength 36
381
+ */
382
+ inventoryId?: string;
383
+ /**
384
+ * Product ID.
385
+ * @maxLength 36
386
+ */
387
+ productId?: string;
388
+ /**
389
+ * Variant ID.
390
+ * @format GUID
391
+ */
392
+ variantId?: string;
393
+ /**
394
+ * Number to increment inventory by.
395
+ * @min 1
396
+ */
397
+ incrementBy?: number;
398
+ }
399
+ /** @oneof */
400
+ interface IncrementDataIdOneOf {
401
+ /**
402
+ * Inventory item ID.
403
+ * @maxLength 36
404
+ */
405
+ inventoryId?: string;
406
+ /**
407
+ * Product ID.
408
+ * @maxLength 36
409
+ */
410
+ productId?: string;
411
+ }
412
+ interface IncrementInventoryResponse {
413
+ }
414
414
  interface BaseEventMetadata {
415
415
  /**
416
416
  * App instance ID.
@@ -473,6 +473,44 @@ interface InventoryVariantsChangedEnvelope {
473
473
  * @slug inventory_variants_changed
474
474
  */
475
475
  declare function onInventoryVariantsChanged(handler: (event: InventoryVariantsChangedEnvelope) => void | Promise<void>): void;
476
+ /**
477
+ * Gets inventory variant information based on the specified option choices.
478
+ *
479
+ *
480
+ * The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
481
+ * @param inventoryId - Inventory item ID.
482
+ * @public
483
+ * @requiredField inventoryId
484
+ * @permissionId WIX_STORES.READ_INVENTORY
485
+ * @applicableIdentity APP
486
+ * @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
487
+ */
488
+ 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`, 3>>;
489
+ interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
490
+ /** Product ID. */
491
+ productId?: string;
492
+ /** Variant IDs to query for this inventory item (optional). */
493
+ variantIds?: string[];
494
+ }
495
+ /** @oneof */
496
+ interface GetInventoryVariantsOptionsIdOneOf {
497
+ /** Inventory item ID. */
498
+ inventoryId?: string;
499
+ /** Product ID. */
500
+ productId?: string;
501
+ }
502
+ /**
503
+ * Returns a list of inventory items, given the provided paging, sorting and filtering.
504
+ * @public
505
+ * @permissionId WIX_STORES.READ_INVENTORY
506
+ * @applicableIdentity APP
507
+ * @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
508
+ */
509
+ declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 3>>;
510
+ interface QueryInventoryOptions {
511
+ /** Information about paging, filters, sorting. */
512
+ query?: Query;
513
+ }
476
514
  /**
477
515
  * Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
478
516
  *
@@ -540,43 +578,5 @@ declare function decrementInventory(decrementData: DecrementData[]): Promise<voi
540
578
  * @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
541
579
  */
542
580
  declare function incrementInventory(incrementData: IncrementData[]): Promise<void>;
543
- /**
544
- * Gets inventory variant information based on the specified option choices.
545
- *
546
- *
547
- * The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
548
- * @param inventoryId - Inventory item ID.
549
- * @public
550
- * @requiredField inventoryId
551
- * @permissionId WIX_STORES.READ_INVENTORY
552
- * @applicableIdentity APP
553
- * @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
554
- */
555
- 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`, 3>>;
556
- interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
557
- /** Product ID. */
558
- productId?: string;
559
- /** Variant IDs to query for this inventory item (optional). */
560
- variantIds?: string[];
561
- }
562
- /** @oneof */
563
- interface GetInventoryVariantsOptionsIdOneOf {
564
- /** Inventory item ID. */
565
- inventoryId?: string;
566
- /** Product ID. */
567
- productId?: string;
568
- }
569
- /**
570
- * Returns a list of inventory items, given the provided paging, sorting and filtering.
571
- * @public
572
- * @permissionId WIX_STORES.READ_INVENTORY
573
- * @applicableIdentity APP
574
- * @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
575
- */
576
- declare function queryInventory(options?: QueryInventoryOptions): Promise<NonNullablePaths<QueryInventoryResponse, `inventoryItems` | `inventoryItems.${number}.numericId` | `inventoryItems.${number}.preorderInfo.enabled` | `metadata.items` | `metadata.offset` | `totalResults`, 3>>;
577
- interface QueryInventoryOptions {
578
- /** Information about paging, filters, sorting. */
579
- query?: Query;
580
- }
581
581
 
582
582
  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 };