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