@wix/auto_sdk_stores_inventory 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/stores-v2-inventory-inventory.context.d.ts +20 -0
  11. package/build/cjs/src/stores-v2-inventory-inventory.context.js +25 -0
  12. package/build/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -0
  13. package/build/cjs/src/stores-v2-inventory-inventory.http.d.ts +31 -0
  14. package/build/cjs/src/stores-v2-inventory-inventory.http.js +291 -0
  15. package/build/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -0
  16. package/build/cjs/src/stores-v2-inventory-inventory.meta.d.ts +21 -0
  17. package/build/cjs/src/stores-v2-inventory-inventory.meta.js +125 -0
  18. package/build/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -0
  19. package/build/cjs/src/stores-v2-inventory-inventory.public.d.ts +60 -0
  20. package/build/cjs/src/stores-v2-inventory-inventory.public.js +60 -0
  21. package/build/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -0
  22. package/build/cjs/src/stores-v2-inventory-inventory.types.d.ts +358 -0
  23. package/build/cjs/src/stores-v2-inventory-inventory.types.js +23 -0
  24. package/build/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -0
  25. package/build/cjs/src/stores-v2-inventory-inventory.universal.d.ts +489 -0
  26. package/build/cjs/src/stores-v2-inventory-inventory.universal.js +269 -0
  27. package/build/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/stores-v2-inventory-inventory.context.d.ts +20 -0
  39. package/build/es/src/stores-v2-inventory-inventory.context.js +20 -0
  40. package/build/es/src/stores-v2-inventory-inventory.context.js.map +1 -0
  41. package/build/es/src/stores-v2-inventory-inventory.http.d.ts +31 -0
  42. package/build/es/src/stores-v2-inventory-inventory.http.js +283 -0
  43. package/build/es/src/stores-v2-inventory-inventory.http.js.map +1 -0
  44. package/build/es/src/stores-v2-inventory-inventory.meta.d.ts +21 -0
  45. package/build/es/src/stores-v2-inventory-inventory.meta.js +94 -0
  46. package/build/es/src/stores-v2-inventory-inventory.meta.js.map +1 -0
  47. package/build/es/src/stores-v2-inventory-inventory.public.d.ts +60 -0
  48. package/build/es/src/stores-v2-inventory-inventory.public.js +50 -0
  49. package/build/es/src/stores-v2-inventory-inventory.public.js.map +1 -0
  50. package/build/es/src/stores-v2-inventory-inventory.types.d.ts +358 -0
  51. package/build/es/src/stores-v2-inventory-inventory.types.js +20 -0
  52. package/build/es/src/stores-v2-inventory-inventory.types.js.map +1 -0
  53. package/build/es/src/stores-v2-inventory-inventory.universal.d.ts +489 -0
  54. package/build/es/src/stores-v2-inventory-inventory.universal.js +238 -0
  55. package/build/es/src/stores-v2-inventory-inventory.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/stores-v2-inventory-inventory.context.d.ts +20 -0
  66. package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js +25 -0
  67. package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -0
  68. package/build/internal/cjs/src/stores-v2-inventory-inventory.http.d.ts +31 -0
  69. package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js +291 -0
  70. package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -0
  71. package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.d.ts +21 -0
  72. package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js +125 -0
  73. package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -0
  74. package/build/internal/cjs/src/stores-v2-inventory-inventory.public.d.ts +60 -0
  75. package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js +60 -0
  76. package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -0
  77. package/build/internal/cjs/src/stores-v2-inventory-inventory.types.d.ts +358 -0
  78. package/build/internal/cjs/src/stores-v2-inventory-inventory.types.js +23 -0
  79. package/build/internal/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -0
  80. package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.d.ts +563 -0
  81. package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js +269 -0
  82. package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/stores-v2-inventory-inventory.context.d.ts +20 -0
  93. package/build/internal/es/src/stores-v2-inventory-inventory.context.js +20 -0
  94. package/build/internal/es/src/stores-v2-inventory-inventory.context.js.map +1 -0
  95. package/build/internal/es/src/stores-v2-inventory-inventory.http.d.ts +31 -0
  96. package/build/internal/es/src/stores-v2-inventory-inventory.http.js +283 -0
  97. package/build/internal/es/src/stores-v2-inventory-inventory.http.js.map +1 -0
  98. package/build/internal/es/src/stores-v2-inventory-inventory.meta.d.ts +21 -0
  99. package/build/internal/es/src/stores-v2-inventory-inventory.meta.js +94 -0
  100. package/build/internal/es/src/stores-v2-inventory-inventory.meta.js.map +1 -0
  101. package/build/internal/es/src/stores-v2-inventory-inventory.public.d.ts +60 -0
  102. package/build/internal/es/src/stores-v2-inventory-inventory.public.js +50 -0
  103. package/build/internal/es/src/stores-v2-inventory-inventory.public.js.map +1 -0
  104. package/build/internal/es/src/stores-v2-inventory-inventory.types.d.ts +358 -0
  105. package/build/internal/es/src/stores-v2-inventory-inventory.types.js +20 -0
  106. package/build/internal/es/src/stores-v2-inventory-inventory.types.js.map +1 -0
  107. package/build/internal/es/src/stores-v2-inventory-inventory.universal.d.ts +563 -0
  108. package/build/internal/es/src/stores-v2-inventory-inventory.universal.js +238 -0
  109. package/build/internal/es/src/stores-v2-inventory-inventory.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,563 @@
1
+ export interface InventoryItemV2 {
2
+ /** Inventory item ID. */
3
+ _id?: string | null;
4
+ /**
5
+ * @internal
6
+ * @internal
7
+ * @readonly
8
+ * @deprecated Deprecated: use productId.
9
+ * @replacedBy product_id
10
+ * @targetRemovalDate 2024-12-31
11
+ */
12
+ externalId?: string | null;
13
+ /**
14
+ * Product ID.
15
+ * @readonly
16
+ */
17
+ productId?: string | null;
18
+ /** Whether quantity is being tracked. */
19
+ trackQuantity?: boolean | null;
20
+ /** Variants associated with this inventory item. */
21
+ variants?: InventoryVariantV2[];
22
+ /**
23
+ * Last updated timestamp.
24
+ * @readonly
25
+ */
26
+ lastUpdated?: Date | null;
27
+ /**
28
+ * Inventory’s unique numeric ID (assigned in ascending order).
29
+ * Primarily for sorting and filtering when crawling all inventories.
30
+ * @readonly
31
+ */
32
+ numericId?: string;
33
+ /** Preorder information. */
34
+ preorderInfo?: PreorderInfo;
35
+ }
36
+ export interface InventoryVariantV2 {
37
+ /** Variant ID. */
38
+ variantId?: string;
39
+ /** Whether the product is listed as in stock. */
40
+ inStock?: boolean | null;
41
+ /** Quantity currently left in inventory. */
42
+ quantity?: number | null;
43
+ /**
44
+ * Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level.
45
+ * @readonly
46
+ */
47
+ availableForPreorder?: boolean;
48
+ }
49
+ export interface PreorderInfo {
50
+ /** Whether the item is available for preorder. */
51
+ enabled?: boolean;
52
+ /** A message the buyer will see when the item is out of stock and preorder is enabled. */
53
+ message?: string | null;
54
+ /** Number of products that can be preordered after stock reaches zero. */
55
+ limit?: number | null;
56
+ }
57
+ export interface InventoryItemChanged {
58
+ /** Inventory item ID. */
59
+ inventoryItemId?: string;
60
+ /**
61
+ * @internal
62
+ * @internal
63
+ * @deprecated Deprecated: use productId.
64
+ * @replacedBy product_id
65
+ * @targetRemovalDate 2024-12-31
66
+ */
67
+ externalId?: string;
68
+ /** Product ID. */
69
+ productId?: string;
70
+ /** Whether inventory is being tracked. */
71
+ trackInventory?: boolean;
72
+ /** Preorder information. */
73
+ preorderInfo?: PreorderInfo;
74
+ /** Field mask of updated fields. */
75
+ fieldMask?: string[];
76
+ /** Date and time the inventory item was last updated. */
77
+ _updatedDate?: Date | null;
78
+ }
79
+ export interface InventoryVariantsChanged {
80
+ /** Inventory item ID. */
81
+ inventoryItemId?: string;
82
+ /**
83
+ * @internal
84
+ * @internal
85
+ * @deprecated Deprecated: use productId.
86
+ * @replacedBy product_id
87
+ * @targetRemovalDate 2024-12-31
88
+ */
89
+ externalId?: string;
90
+ /** Product ID. */
91
+ productId?: string;
92
+ /** Information about changed variants. */
93
+ variants?: ChangedInventoryVariant[];
94
+ /** Date and time the inventory variant item was last updated. */
95
+ _updatedDate?: Date | null;
96
+ }
97
+ export interface ChangedInventoryVariant {
98
+ /** Variant ID. */
99
+ _id?: string;
100
+ /** Previous inventory variant data. */
101
+ oldValue?: ChangedInventoryVariantData;
102
+ /** Current inventory variant data. */
103
+ newValue?: ChangedInventoryVariantData;
104
+ }
105
+ export interface ChangedInventoryVariantData {
106
+ /** Inventory variant quantity. */
107
+ quantity?: number | null;
108
+ /** Whether the product variant is in stock. */
109
+ inStock?: boolean;
110
+ /** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
111
+ availableForPreorder?: boolean;
112
+ }
113
+ export declare enum ReasonType {
114
+ /** Unknown reason. */
115
+ UNKNOWN = "UNKNOWN",
116
+ /** Order related. */
117
+ ORDER = "ORDER",
118
+ /** Manual adjustment. */
119
+ MANUAL = "MANUAL",
120
+ /** Reverting an inventory change. */
121
+ REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
122
+ }
123
+ export interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
124
+ /** Inventory item ID. */
125
+ inventoryId: string;
126
+ /**
127
+ * @internal
128
+ * @internal
129
+ * @deprecated Deprecated (use productID instead).
130
+ * @replacedBy product_id
131
+ * @targetRemovalDate 2024-12-31
132
+ */
133
+ externalId?: string;
134
+ /** Product ID. */
135
+ productId?: string;
136
+ /** Variant IDs to query for this inventory item (optional). */
137
+ variantIds?: string[];
138
+ }
139
+ /** @oneof */
140
+ export interface GetInventoryVariantsRequestIdOneOf {
141
+ /** Inventory item ID. */
142
+ inventoryId?: string;
143
+ /**
144
+ * @internal
145
+ * @internal
146
+ * @deprecated Deprecated (use productID instead).
147
+ * @replacedBy product_id
148
+ * @targetRemovalDate 2024-12-31
149
+ */
150
+ externalId?: string;
151
+ /** Product ID. */
152
+ productId?: string;
153
+ }
154
+ export interface GetInventoryVariantsResponse {
155
+ /** Inventory item. */
156
+ inventoryItem?: InventoryItemV2;
157
+ }
158
+ export interface GetInventoryItemsRequest {
159
+ /** Product IDs */
160
+ productIds?: string[];
161
+ }
162
+ export interface GetInventoryItemsResponse {
163
+ /** Inventory items. */
164
+ inventoryItems?: InventoryItemV2[];
165
+ }
166
+ export interface QueryInventoryRequest {
167
+ /** Information about paging, filters, sorting. */
168
+ query?: Query;
169
+ }
170
+ export interface Query {
171
+ /** Paging options to limit and skip the number of items. */
172
+ paging?: Paging;
173
+ /** Filter string */
174
+ filter?: string | null;
175
+ /** Sort string */
176
+ sort?: string | null;
177
+ }
178
+ export interface Paging {
179
+ /** Amount of items to load per page */
180
+ limit?: number | null;
181
+ /** Number of items to skip in the display (relevant for all pages after the first) */
182
+ offset?: number | null;
183
+ }
184
+ export interface QueryInventoryResponse {
185
+ /** Inventory items. */
186
+ inventoryItems?: InventoryItemV2[];
187
+ /** Display metadata. */
188
+ metadata?: PagingMetadata;
189
+ /** Number of total results. */
190
+ totalResults?: number;
191
+ }
192
+ export interface PagingMetadata {
193
+ /** Amount of items to load per page */
194
+ items?: number;
195
+ /** Number of items to skip in the display (relevant for all pages after the first) */
196
+ offset?: number;
197
+ }
198
+ export interface MessageEnvelope {
199
+ /** App instance ID. */
200
+ instanceId?: string | null;
201
+ /** Event type. */
202
+ eventType?: string;
203
+ /** The identification type and identity data. */
204
+ identity?: IdentificationData;
205
+ /** Stringify payload. */
206
+ data?: string;
207
+ }
208
+ export interface IdentificationData extends IdentificationDataIdOneOf {
209
+ /** ID of a site visitor that has not logged in to the site. */
210
+ anonymousVisitorId?: string;
211
+ /** ID of a site visitor that has logged in to the site. */
212
+ memberId?: string;
213
+ /** ID of a Wix user (site owner, contributor, etc.). */
214
+ wixUserId?: string;
215
+ /** ID of an app. */
216
+ appId?: string;
217
+ /** @readonly */
218
+ identityType?: WebhookIdentityType;
219
+ }
220
+ /** @oneof */
221
+ export interface IdentificationDataIdOneOf {
222
+ /** ID of a site visitor that has not logged in to the site. */
223
+ anonymousVisitorId?: string;
224
+ /** ID of a site visitor that has logged in to the site. */
225
+ memberId?: string;
226
+ /** ID of a Wix user (site owner, contributor, etc.). */
227
+ wixUserId?: string;
228
+ /** ID of an app. */
229
+ appId?: string;
230
+ }
231
+ export declare enum WebhookIdentityType {
232
+ UNKNOWN = "UNKNOWN",
233
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
234
+ MEMBER = "MEMBER",
235
+ WIX_USER = "WIX_USER",
236
+ APP = "APP"
237
+ }
238
+ export interface UpdateInventoryVariantsRequest {
239
+ /** Inventory item. */
240
+ inventoryItem: InventoryItemV2;
241
+ }
242
+ export interface UpdateInventoryVariantsResponse {
243
+ }
244
+ export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
245
+ /** Change availability. */
246
+ setInStock?: boolean | null;
247
+ /** Set new quantity. */
248
+ setQuantity?: number | null;
249
+ /** Number to increment inventory by. */
250
+ incrementBy?: number | null;
251
+ /** Number to decrement inventory by. */
252
+ decrementBy?: number | null;
253
+ /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
254
+ filter?: Record<string, any> | null;
255
+ }
256
+ /** @oneof */
257
+ export interface BulkUpdateInventoryVariantsRequestActionOneOf {
258
+ /** Change availability. */
259
+ setInStock?: boolean | null;
260
+ /** Set new quantity. */
261
+ setQuantity?: number | null;
262
+ /** Number to increment inventory by. */
263
+ incrementBy?: number | null;
264
+ /** Number to decrement inventory by. */
265
+ decrementBy?: number | null;
266
+ }
267
+ export interface BulkUpdateInventoryVariantsResponse {
268
+ }
269
+ export interface BulkUpdateInventoryItemsRequest {
270
+ /** Variants filter */
271
+ variantsFilter?: Record<string, any> | null;
272
+ /** Whether inventory is being tracked. */
273
+ trackInventory?: boolean | null;
274
+ }
275
+ export interface BulkUpdateInventoryItemsResponse {
276
+ }
277
+ export interface DecrementInventoryRequest {
278
+ /** Item or product to decrement. */
279
+ decrementData?: DecrementData[];
280
+ }
281
+ export interface DecrementData extends DecrementDataIdOneOf {
282
+ /** Inventory item ID. */
283
+ inventoryId?: string;
284
+ /**
285
+ * @internal
286
+ * @internal
287
+ * @deprecated Deprecated: use productId.
288
+ * @replacedBy product_id
289
+ * @targetRemovalDate 2024-12-31
290
+ */
291
+ externalId?: string;
292
+ /** Product ID. */
293
+ productId?: string;
294
+ /** Variant ID. */
295
+ variantId?: string;
296
+ /** Number to decrement inventory by. */
297
+ decrementBy?: number;
298
+ /**
299
+ * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
300
+ * If true and the item is available for preorder, we allow negative inventory.
301
+ * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
302
+ */
303
+ preorderRequest?: boolean;
304
+ }
305
+ /** @oneof */
306
+ export interface DecrementDataIdOneOf {
307
+ /** Inventory item ID. */
308
+ inventoryId?: string;
309
+ /**
310
+ * @internal
311
+ * @internal
312
+ * @deprecated Deprecated: use productId.
313
+ * @replacedBy product_id
314
+ * @targetRemovalDate 2024-12-31
315
+ */
316
+ externalId?: string;
317
+ /** Product ID. */
318
+ productId?: string;
319
+ }
320
+ export interface DecrementInventoryResponse {
321
+ }
322
+ export interface IncrementInventoryRequest {
323
+ /** Item or product to increment. */
324
+ incrementData?: IncrementData[];
325
+ }
326
+ export interface IncrementData extends IncrementDataIdOneOf {
327
+ /** Inventory item ID. */
328
+ inventoryId?: string;
329
+ /** Product ID. */
330
+ productId?: string;
331
+ /** Variant ID. */
332
+ variantId?: string;
333
+ /** Number to increment inventory by. */
334
+ incrementBy?: number;
335
+ }
336
+ /** @oneof */
337
+ export interface IncrementDataIdOneOf {
338
+ /** Inventory item ID. */
339
+ inventoryId?: string;
340
+ /** Product ID. */
341
+ productId?: string;
342
+ }
343
+ export interface IncrementInventoryResponse {
344
+ }
345
+ interface InventoryVariantV2NonNullableFields {
346
+ variantId: string;
347
+ availableForPreorder: boolean;
348
+ }
349
+ interface PreorderInfoNonNullableFields {
350
+ enabled: boolean;
351
+ }
352
+ interface InventoryItemV2NonNullableFields {
353
+ variants: InventoryVariantV2NonNullableFields[];
354
+ numericId: string;
355
+ preorderInfo?: PreorderInfoNonNullableFields;
356
+ }
357
+ export interface GetInventoryVariantsResponseNonNullableFields {
358
+ inventoryItem?: InventoryItemV2NonNullableFields;
359
+ }
360
+ interface PagingMetadataNonNullableFields {
361
+ items: number;
362
+ offset: number;
363
+ }
364
+ export interface QueryInventoryResponseNonNullableFields {
365
+ inventoryItems: InventoryItemV2NonNullableFields[];
366
+ metadata?: PagingMetadataNonNullableFields;
367
+ totalResults: number;
368
+ }
369
+ export interface BaseEventMetadata {
370
+ /** App instance ID. */
371
+ instanceId?: string | null;
372
+ /** Event type. */
373
+ eventType?: string;
374
+ /** The identification type and identity data. */
375
+ identity?: IdentificationData;
376
+ }
377
+ export interface InventoryItemChangedEnvelope {
378
+ data: InventoryItemChanged;
379
+ metadata: BaseEventMetadata;
380
+ }
381
+ /**
382
+ * Triggered when an inventory item is changed.
383
+ * @permissionScope Manage Stores - all permissions
384
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
385
+ * @permissionScope Manage Products
386
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
387
+ * @permissionScope Read Stores - all read permissions
388
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
389
+ * @permissionScope Read Products
390
+ * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
391
+ * @permissionId WIX_STORES.READ_INVENTORY
392
+ * @webhook
393
+ * @eventType com.wix.ecommerce.inventory.api.v1.InventoryItemChanged
394
+ */
395
+ export declare function onInventoryItemChanged(handler: (event: InventoryItemChangedEnvelope) => void | Promise<void>): void;
396
+ export interface InventoryVariantsChangedEnvelope {
397
+ data: InventoryVariantsChanged;
398
+ metadata: BaseEventMetadata;
399
+ }
400
+ /**
401
+ * Triggered when inventory variants are changed.
402
+ * @permissionScope Manage Stores - all permissions
403
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
404
+ * @permissionScope Manage Products
405
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
406
+ * @permissionScope Read Stores - all read permissions
407
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
408
+ * @permissionScope Read Products
409
+ * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
410
+ * @permissionId WIX_STORES.READ_INVENTORY
411
+ * @webhook
412
+ * @eventType com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged
413
+ */
414
+ export declare function onInventoryVariantsChanged(handler: (event: InventoryVariantsChangedEnvelope) => void | Promise<void>): void;
415
+ /**
416
+ * Gets inventory variant information based on the specified option choices.
417
+ *
418
+ *
419
+ * The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
420
+ * @param inventoryId - Inventory item ID.
421
+ * @public
422
+ * @requiredField inventoryId
423
+ * @permissionId WIX_STORES.READ_INVENTORY
424
+ * @permissionScope Manage Stores - all permissions
425
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
426
+ * @permissionScope Manage Products
427
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
428
+ * @permissionScope Read Stores - all read permissions
429
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
430
+ * @permissionScope Read Products
431
+ * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
432
+ * @applicableIdentity APP
433
+ * @applicableIdentity VISITOR
434
+ * @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
435
+ */
436
+ export declare function getInventoryVariants(inventoryId: string, options?: GetInventoryVariantsOptions): Promise<GetInventoryVariantsResponse & GetInventoryVariantsResponseNonNullableFields>;
437
+ export interface GetInventoryVariantsOptions extends GetInventoryVariantsRequestIdOneOf {
438
+ /**
439
+ * @internal
440
+ * @internal
441
+ * @deprecated Deprecated (use productID instead).
442
+ * @replacedBy product_id
443
+ * @targetRemovalDate 2024-12-31
444
+ */
445
+ externalId?: string;
446
+ /** Product ID. */
447
+ productId?: string;
448
+ /** Variant IDs to query for this inventory item (optional). */
449
+ variantIds?: string[];
450
+ }
451
+ /**
452
+ * Returns a list of inventory items, given the provided paging, sorting and filtering.
453
+ * @public
454
+ * @permissionId WIX_STORES.READ_INVENTORY
455
+ * @permissionScope Manage Stores - all permissions
456
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
457
+ * @permissionScope Manage Products
458
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
459
+ * @permissionScope Read Stores - all read permissions
460
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
461
+ * @permissionScope Read Products
462
+ * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
463
+ * @applicableIdentity APP
464
+ * @applicableIdentity VISITOR
465
+ * @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
466
+ */
467
+ export declare function queryInventory(options?: QueryInventoryOptions): Promise<QueryInventoryResponse & QueryInventoryResponseNonNullableFields>;
468
+ export interface QueryInventoryOptions {
469
+ /** Information about paging, filters, sorting. */
470
+ query?: Query;
471
+ }
472
+ /**
473
+ * Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
474
+ *
475
+ *
476
+ * The `updateInventoryVariants()` function is a Promise that resolves to the updated inventory variant data.
477
+ * @param productId - Product ID.
478
+ * @public
479
+ * @requiredField inventoryItem
480
+ * @requiredField productId
481
+ * @param inventoryItem - Inventory item to update.
482
+ * @permissionId WIX_STORES.MODIFY_INVENTORY
483
+ * @permissionScope Manage Stores - all permissions
484
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
485
+ * @permissionScope Manage Products
486
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
487
+ * @permissionScope Manage Restaurants - all permissions
488
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
489
+ * @applicableIdentity APP
490
+ * @fqn wix.inventory.api.v1.InventoryWriteApi.UpdateInventoryVariants
491
+ */
492
+ export declare function updateInventoryVariants(productId: string | null, inventoryItem: UpdateInventoryVariantsInventoryItem): Promise<void>;
493
+ export interface UpdateInventoryVariantsInventoryItem {
494
+ /** Inventory item ID. */
495
+ _id?: string | null;
496
+ /**
497
+ * @internal
498
+ * @internal
499
+ * @readonly
500
+ * @deprecated Deprecated: use productId.
501
+ * @replacedBy product_id
502
+ * @targetRemovalDate 2024-12-31
503
+ */
504
+ externalId?: string | null;
505
+ /** Whether quantity is being tracked. */
506
+ trackQuantity?: boolean | null;
507
+ /** Variants associated with this inventory item. */
508
+ variants?: InventoryVariantV2[];
509
+ /**
510
+ * Last updated timestamp.
511
+ * @readonly
512
+ */
513
+ lastUpdated?: Date | null;
514
+ /**
515
+ * Inventory’s unique numeric ID (assigned in ascending order).
516
+ * Primarily for sorting and filtering when crawling all inventories.
517
+ * @readonly
518
+ */
519
+ numericId?: string;
520
+ /** Preorder information. */
521
+ preorderInfo?: PreorderInfo;
522
+ }
523
+ /**
524
+ * Subtracts a set number of items from inventory.
525
+ *
526
+ *
527
+ * The `decrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
528
+ * @param decrementData - Item or product to decrement.
529
+ * @public
530
+ * @documentationMaturity preview
531
+ * @requiredField decrementData
532
+ * @permissionId WIX_STORES.MODIFY_INVENTORY
533
+ * @permissionScope Manage Stores - all permissions
534
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
535
+ * @permissionScope Manage Products
536
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
537
+ * @permissionScope Manage Restaurants - all permissions
538
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
539
+ * @applicableIdentity APP
540
+ * @fqn wix.inventory.api.v1.InventoryWriteApi.DecrementInventory
541
+ */
542
+ export declare function decrementInventory(decrementData: DecrementData[]): Promise<void>;
543
+ /**
544
+ * Adds a set number of items to inventory.
545
+ *
546
+ *
547
+ * The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
548
+ * @param incrementData - Item or product to increment.
549
+ * @public
550
+ * @documentationMaturity preview
551
+ * @requiredField incrementData
552
+ * @permissionId WIX_STORES.MODIFY_INVENTORY
553
+ * @permissionScope Manage Stores - all permissions
554
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
555
+ * @permissionScope Manage Products
556
+ * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
557
+ * @permissionScope Manage Restaurants - all permissions
558
+ * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
559
+ * @applicableIdentity APP
560
+ * @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
561
+ */
562
+ export declare function incrementInventory(incrementData: IncrementData[]): Promise<void>;
563
+ export {};