@wix/auto_sdk_stores_inventory 1.0.11 → 1.0.13

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