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