@wix/stores 1.0.134 → 1.0.136

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 (235) hide show
  1. package/build/cjs/context.d.ts +5 -5
  2. package/build/cjs/context.js +5 -5
  3. package/build/cjs/context.js.map +1 -1
  4. package/build/cjs/index.d.ts +5 -6
  5. package/build/cjs/index.js +6 -7
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/cjs/meta.d.ts +5 -6
  8. package/build/cjs/meta.js +6 -7
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/context.d.ts +5 -5
  11. package/build/es/context.js +5 -5
  12. package/build/es/context.js.map +1 -1
  13. package/build/es/index.d.ts +5 -6
  14. package/build/es/index.js +5 -6
  15. package/build/es/index.js.map +1 -1
  16. package/build/es/meta.d.ts +5 -6
  17. package/build/es/meta.js +5 -6
  18. package/build/es/meta.js.map +1 -1
  19. package/package.json +15 -9
  20. package/build/cjs/index.typings.d.ts +0 -6
  21. package/build/cjs/index.typings.js +0 -33
  22. package/build/cjs/index.typings.js.map +0 -1
  23. package/build/cjs/src/platform-v1-wishlist.context.d.ts +0 -3
  24. package/build/cjs/src/platform-v1-wishlist.context.js +0 -22
  25. package/build/cjs/src/platform-v1-wishlist.context.js.map +0 -1
  26. package/build/cjs/src/platform-v1-wishlist.http.d.ts +0 -3
  27. package/build/cjs/src/platform-v1-wishlist.http.js +0 -91
  28. package/build/cjs/src/platform-v1-wishlist.http.js.map +0 -1
  29. package/build/cjs/src/platform-v1-wishlist.meta.d.ts +0 -13
  30. package/build/cjs/src/platform-v1-wishlist.meta.js +0 -47
  31. package/build/cjs/src/platform-v1-wishlist.meta.js.map +0 -1
  32. package/build/cjs/src/platform-v1-wishlist.public.d.ts +0 -15
  33. package/build/cjs/src/platform-v1-wishlist.public.js +0 -12
  34. package/build/cjs/src/platform-v1-wishlist.public.js.map +0 -1
  35. package/build/cjs/src/platform-v1-wishlist.types.d.ts +0 -104
  36. package/build/cjs/src/platform-v1-wishlist.types.js +0 -3
  37. package/build/cjs/src/platform-v1-wishlist.types.js.map +0 -1
  38. package/build/cjs/src/platform-v1-wishlist.universal.d.ts +0 -121
  39. package/build/cjs/src/platform-v1-wishlist.universal.js +0 -106
  40. package/build/cjs/src/platform-v1-wishlist.universal.js.map +0 -1
  41. package/build/cjs/src/stores-catalog-v1-collection.context.d.ts +0 -5
  42. package/build/cjs/src/stores-catalog-v1-collection.context.js +0 -56
  43. package/build/cjs/src/stores-catalog-v1-collection.context.js.map +0 -1
  44. package/build/cjs/src/stores-catalog-v1-collection.http.d.ts +0 -10
  45. package/build/cjs/src/stores-catalog-v1-collection.http.js +0 -110
  46. package/build/cjs/src/stores-catalog-v1-collection.http.js.map +0 -1
  47. package/build/cjs/src/stores-catalog-v1-collection.meta.d.ts +0 -19
  48. package/build/cjs/src/stores-catalog-v1-collection.meta.js +0 -85
  49. package/build/cjs/src/stores-catalog-v1-collection.meta.js.map +0 -1
  50. package/build/cjs/src/stores-catalog-v1-collection.public.d.ts +0 -59
  51. package/build/cjs/src/stores-catalog-v1-collection.public.js +0 -27
  52. package/build/cjs/src/stores-catalog-v1-collection.public.js.map +0 -1
  53. package/build/cjs/src/stores-catalog-v1-collection.types.d.ts +0 -414
  54. package/build/cjs/src/stores-catalog-v1-collection.types.js +0 -18
  55. package/build/cjs/src/stores-catalog-v1-collection.types.js.map +0 -1
  56. package/build/cjs/src/stores-catalog-v1-collection.universal.d.ts +0 -452
  57. package/build/cjs/src/stores-catalog-v1-collection.universal.js +0 -225
  58. package/build/cjs/src/stores-catalog-v1-collection.universal.js.map +0 -1
  59. package/build/cjs/src/stores-catalog-v1-product.context.d.ts +0 -35
  60. package/build/cjs/src/stores-catalog-v1-product.context.js +0 -566
  61. package/build/cjs/src/stores-catalog-v1-product.context.js.map +0 -1
  62. package/build/cjs/src/stores-catalog-v1-product.http.d.ts +0 -89
  63. package/build/cjs/src/stores-catalog-v1-product.http.js +0 -1716
  64. package/build/cjs/src/stores-catalog-v1-product.http.js.map +0 -1
  65. package/build/cjs/src/stores-catalog-v1-product.meta.d.ts +0 -95
  66. package/build/cjs/src/stores-catalog-v1-product.meta.js +0 -655
  67. package/build/cjs/src/stores-catalog-v1-product.meta.js.map +0 -1
  68. package/build/cjs/src/stores-catalog-v1-product.public.d.ts +0 -1216
  69. package/build/cjs/src/stores-catalog-v1-product.public.js +0 -221
  70. package/build/cjs/src/stores-catalog-v1-product.public.js.map +0 -1
  71. package/build/cjs/src/stores-catalog-v1-product.types.d.ts +0 -4235
  72. package/build/cjs/src/stores-catalog-v1-product.types.js +0 -78
  73. package/build/cjs/src/stores-catalog-v1-product.types.js.map +0 -1
  74. package/build/cjs/src/stores-catalog-v1-product.universal.d.ts +0 -5074
  75. package/build/cjs/src/stores-catalog-v1-product.universal.js +0 -2220
  76. package/build/cjs/src/stores-catalog-v1-product.universal.js.map +0 -1
  77. package/build/cjs/src/stores-v1-abandoned-cart.http.d.ts +0 -6
  78. package/build/cjs/src/stores-v1-abandoned-cart.http.js +0 -103
  79. package/build/cjs/src/stores-v1-abandoned-cart.http.js.map +0 -1
  80. package/build/cjs/src/stores-v1-abandoned-cart.meta.d.ts +0 -16
  81. package/build/cjs/src/stores-v1-abandoned-cart.meta.js +0 -66
  82. package/build/cjs/src/stores-v1-abandoned-cart.meta.js.map +0 -1
  83. package/build/cjs/src/stores-v1-abandoned-cart.public.d.ts +0 -19
  84. package/build/cjs/src/stores-v1-abandoned-cart.public.js +0 -22
  85. package/build/cjs/src/stores-v1-abandoned-cart.public.js.map +0 -1
  86. package/build/cjs/src/stores-v1-abandoned-cart.types.d.ts +0 -216
  87. package/build/cjs/src/stores-v1-abandoned-cart.types.js +0 -30
  88. package/build/cjs/src/stores-v1-abandoned-cart.types.js.map +0 -1
  89. package/build/cjs/src/stores-v1-abandoned-cart.universal.d.ts +0 -246
  90. package/build/cjs/src/stores-v1-abandoned-cart.universal.js +0 -189
  91. package/build/cjs/src/stores-v1-abandoned-cart.universal.js.map +0 -1
  92. package/build/cjs/src/stores-v1-subscription-option.context.d.ts +0 -14
  93. package/build/cjs/src/stores-v1-subscription-option.context.js +0 -209
  94. package/build/cjs/src/stores-v1-subscription-option.context.js.map +0 -1
  95. package/build/cjs/src/stores-v1-subscription-option.http.d.ts +0 -128
  96. package/build/cjs/src/stores-v1-subscription-option.http.js +0 -466
  97. package/build/cjs/src/stores-v1-subscription-option.http.js.map +0 -1
  98. package/build/cjs/src/stores-v1-subscription-option.meta.d.ts +0 -40
  99. package/build/cjs/src/stores-v1-subscription-option.meta.js +0 -258
  100. package/build/cjs/src/stores-v1-subscription-option.meta.js.map +0 -1
  101. package/build/cjs/src/stores-v1-subscription-option.public.d.ts +0 -46
  102. package/build/cjs/src/stores-v1-subscription-option.public.js +0 -81
  103. package/build/cjs/src/stores-v1-subscription-option.public.js.map +0 -1
  104. package/build/cjs/src/stores-v1-subscription-option.types.d.ts +0 -351
  105. package/build/cjs/src/stores-v1-subscription-option.types.js +0 -20
  106. package/build/cjs/src/stores-v1-subscription-option.types.js.map +0 -1
  107. package/build/cjs/src/stores-v1-subscription-option.universal.d.ts +0 -646
  108. package/build/cjs/src/stores-v1-subscription-option.universal.js +0 -893
  109. package/build/cjs/src/stores-v1-subscription-option.universal.js.map +0 -1
  110. package/build/cjs/src/stores-v2-inventory.context.d.ts +0 -7
  111. package/build/cjs/src/stores-v2-inventory.context.js +0 -90
  112. package/build/cjs/src/stores-v2-inventory.context.js.map +0 -1
  113. package/build/cjs/src/stores-v2-inventory.http.d.ts +0 -31
  114. package/build/cjs/src/stores-v2-inventory.http.js +0 -289
  115. package/build/cjs/src/stores-v2-inventory.http.js.map +0 -1
  116. package/build/cjs/src/stores-v2-inventory.meta.d.ts +0 -21
  117. package/build/cjs/src/stores-v2-inventory.meta.js +0 -125
  118. package/build/cjs/src/stores-v2-inventory.meta.js.map +0 -1
  119. package/build/cjs/src/stores-v2-inventory.public.d.ts +0 -13
  120. package/build/cjs/src/stores-v2-inventory.public.js +0 -41
  121. package/build/cjs/src/stores-v2-inventory.public.js.map +0 -1
  122. package/build/cjs/src/stores-v2-inventory.types.d.ts +0 -283
  123. package/build/cjs/src/stores-v2-inventory.types.js +0 -11
  124. package/build/cjs/src/stores-v2-inventory.types.js.map +0 -1
  125. package/build/cjs/src/stores-v2-inventory.universal.d.ts +0 -425
  126. package/build/cjs/src/stores-v2-inventory.universal.js +0 -382
  127. package/build/cjs/src/stores-v2-inventory.universal.js.map +0 -1
  128. package/build/es/index.typings.d.ts +0 -6
  129. package/build/es/index.typings.js +0 -7
  130. package/build/es/index.typings.js.map +0 -1
  131. package/build/es/src/platform-v1-wishlist.context.d.ts +0 -3
  132. package/build/es/src/platform-v1-wishlist.context.js +0 -18
  133. package/build/es/src/platform-v1-wishlist.context.js.map +0 -1
  134. package/build/es/src/platform-v1-wishlist.http.d.ts +0 -3
  135. package/build/es/src/platform-v1-wishlist.http.js +0 -87
  136. package/build/es/src/platform-v1-wishlist.http.js.map +0 -1
  137. package/build/es/src/platform-v1-wishlist.meta.d.ts +0 -13
  138. package/build/es/src/platform-v1-wishlist.meta.js +0 -20
  139. package/build/es/src/platform-v1-wishlist.meta.js.map +0 -1
  140. package/build/es/src/platform-v1-wishlist.public.d.ts +0 -15
  141. package/build/es/src/platform-v1-wishlist.public.js +0 -8
  142. package/build/es/src/platform-v1-wishlist.public.js.map +0 -1
  143. package/build/es/src/platform-v1-wishlist.types.d.ts +0 -104
  144. package/build/es/src/platform-v1-wishlist.types.js +0 -2
  145. package/build/es/src/platform-v1-wishlist.types.js.map +0 -1
  146. package/build/es/src/platform-v1-wishlist.universal.d.ts +0 -121
  147. package/build/es/src/platform-v1-wishlist.universal.js +0 -79
  148. package/build/es/src/platform-v1-wishlist.universal.js.map +0 -1
  149. package/build/es/src/stores-catalog-v1-collection.context.d.ts +0 -5
  150. package/build/es/src/stores-catalog-v1-collection.context.js +0 -50
  151. package/build/es/src/stores-catalog-v1-collection.context.js.map +0 -1
  152. package/build/es/src/stores-catalog-v1-collection.http.d.ts +0 -10
  153. package/build/es/src/stores-catalog-v1-collection.http.js +0 -104
  154. package/build/es/src/stores-catalog-v1-collection.http.js.map +0 -1
  155. package/build/es/src/stores-catalog-v1-collection.meta.d.ts +0 -19
  156. package/build/es/src/stores-catalog-v1-collection.meta.js +0 -56
  157. package/build/es/src/stores-catalog-v1-collection.meta.js.map +0 -1
  158. package/build/es/src/stores-catalog-v1-collection.public.d.ts +0 -59
  159. package/build/es/src/stores-catalog-v1-collection.public.js +0 -19
  160. package/build/es/src/stores-catalog-v1-collection.public.js.map +0 -1
  161. package/build/es/src/stores-catalog-v1-collection.types.d.ts +0 -414
  162. package/build/es/src/stores-catalog-v1-collection.types.js +0 -15
  163. package/build/es/src/stores-catalog-v1-collection.types.js.map +0 -1
  164. package/build/es/src/stores-catalog-v1-collection.universal.d.ts +0 -452
  165. package/build/es/src/stores-catalog-v1-collection.universal.js +0 -196
  166. package/build/es/src/stores-catalog-v1-collection.universal.js.map +0 -1
  167. package/build/es/src/stores-catalog-v1-product.context.d.ts +0 -35
  168. package/build/es/src/stores-catalog-v1-product.context.js +0 -530
  169. package/build/es/src/stores-catalog-v1-product.context.js.map +0 -1
  170. package/build/es/src/stores-catalog-v1-product.http.d.ts +0 -89
  171. package/build/es/src/stores-catalog-v1-product.http.js +0 -1680
  172. package/build/es/src/stores-catalog-v1-product.http.js.map +0 -1
  173. package/build/es/src/stores-catalog-v1-product.meta.d.ts +0 -95
  174. package/build/es/src/stores-catalog-v1-product.meta.js +0 -596
  175. package/build/es/src/stores-catalog-v1-product.meta.js.map +0 -1
  176. package/build/es/src/stores-catalog-v1-product.public.d.ts +0 -1216
  177. package/build/es/src/stores-catalog-v1-product.public.js +0 -170
  178. package/build/es/src/stores-catalog-v1-product.public.js.map +0 -1
  179. package/build/es/src/stores-catalog-v1-product.types.d.ts +0 -4235
  180. package/build/es/src/stores-catalog-v1-product.types.js +0 -75
  181. package/build/es/src/stores-catalog-v1-product.types.js.map +0 -1
  182. package/build/es/src/stores-catalog-v1-product.universal.d.ts +0 -5074
  183. package/build/es/src/stores-catalog-v1-product.universal.js +0 -2161
  184. package/build/es/src/stores-catalog-v1-product.universal.js.map +0 -1
  185. package/build/es/src/stores-v1-abandoned-cart.http.d.ts +0 -6
  186. package/build/es/src/stores-v1-abandoned-cart.http.js +0 -98
  187. package/build/es/src/stores-v1-abandoned-cart.http.js.map +0 -1
  188. package/build/es/src/stores-v1-abandoned-cart.meta.d.ts +0 -16
  189. package/build/es/src/stores-v1-abandoned-cart.meta.js +0 -38
  190. package/build/es/src/stores-v1-abandoned-cart.meta.js.map +0 -1
  191. package/build/es/src/stores-v1-abandoned-cart.public.d.ts +0 -19
  192. package/build/es/src/stores-v1-abandoned-cart.public.js +0 -14
  193. package/build/es/src/stores-v1-abandoned-cart.public.js.map +0 -1
  194. package/build/es/src/stores-v1-abandoned-cart.types.d.ts +0 -216
  195. package/build/es/src/stores-v1-abandoned-cart.types.js +0 -27
  196. package/build/es/src/stores-v1-abandoned-cart.types.js.map +0 -1
  197. package/build/es/src/stores-v1-abandoned-cart.universal.d.ts +0 -246
  198. package/build/es/src/stores-v1-abandoned-cart.universal.js +0 -161
  199. package/build/es/src/stores-v1-abandoned-cart.universal.js.map +0 -1
  200. package/build/es/src/stores-v1-subscription-option.context.d.ts +0 -14
  201. package/build/es/src/stores-v1-subscription-option.context.js +0 -194
  202. package/build/es/src/stores-v1-subscription-option.context.js.map +0 -1
  203. package/build/es/src/stores-v1-subscription-option.http.d.ts +0 -128
  204. package/build/es/src/stores-v1-subscription-option.http.js +0 -451
  205. package/build/es/src/stores-v1-subscription-option.http.js.map +0 -1
  206. package/build/es/src/stores-v1-subscription-option.meta.d.ts +0 -40
  207. package/build/es/src/stores-v1-subscription-option.meta.js +0 -220
  208. package/build/es/src/stores-v1-subscription-option.meta.js.map +0 -1
  209. package/build/es/src/stores-v1-subscription-option.public.d.ts +0 -46
  210. package/build/es/src/stores-v1-subscription-option.public.js +0 -64
  211. package/build/es/src/stores-v1-subscription-option.public.js.map +0 -1
  212. package/build/es/src/stores-v1-subscription-option.types.d.ts +0 -351
  213. package/build/es/src/stores-v1-subscription-option.types.js +0 -17
  214. package/build/es/src/stores-v1-subscription-option.types.js.map +0 -1
  215. package/build/es/src/stores-v1-subscription-option.universal.d.ts +0 -646
  216. package/build/es/src/stores-v1-subscription-option.universal.js +0 -855
  217. package/build/es/src/stores-v1-subscription-option.universal.js.map +0 -1
  218. package/build/es/src/stores-v2-inventory.context.d.ts +0 -7
  219. package/build/es/src/stores-v2-inventory.context.js +0 -82
  220. package/build/es/src/stores-v2-inventory.context.js.map +0 -1
  221. package/build/es/src/stores-v2-inventory.http.d.ts +0 -31
  222. package/build/es/src/stores-v2-inventory.http.js +0 -281
  223. package/build/es/src/stores-v2-inventory.http.js.map +0 -1
  224. package/build/es/src/stores-v2-inventory.meta.d.ts +0 -21
  225. package/build/es/src/stores-v2-inventory.meta.js +0 -94
  226. package/build/es/src/stores-v2-inventory.meta.js.map +0 -1
  227. package/build/es/src/stores-v2-inventory.public.d.ts +0 -13
  228. package/build/es/src/stores-v2-inventory.public.js +0 -30
  229. package/build/es/src/stores-v2-inventory.public.js.map +0 -1
  230. package/build/es/src/stores-v2-inventory.types.d.ts +0 -283
  231. package/build/es/src/stores-v2-inventory.types.js +0 -8
  232. package/build/es/src/stores-v2-inventory.types.js.map +0 -1
  233. package/build/es/src/stores-v2-inventory.universal.d.ts +0 -425
  234. package/build/es/src/stores-v2-inventory.universal.js +0 -351
  235. package/build/es/src/stores-v2-inventory.universal.js.map +0 -1
@@ -1,425 +0,0 @@
1
- import { EventDefinition } from '@wix/sdk-types';
2
- export interface InventoryItemV2 {
3
- /** Inventory item ID. */
4
- _id?: string | null;
5
- /**
6
- * @internal
7
- * @internal
8
- * @readonly
9
- */
10
- externalId?: string | null;
11
- /**
12
- * Product ID.
13
- * @readonly
14
- */
15
- productId?: string | null;
16
- /** Whether quantity is being tracked. */
17
- trackQuantity?: boolean | null;
18
- /** Variants associated with this inventory item. */
19
- variants?: InventoryVariantV2[];
20
- /**
21
- * Last updated timestamp.
22
- * @readonly
23
- */
24
- lastUpdated?: Date;
25
- /**
26
- * Inventory’s unique numeric ID (assigned in ascending order).
27
- * Primarily for sorting and filtering when crawling all inventories.
28
- * @readonly
29
- */
30
- numericId?: string;
31
- /** Preorder information. */
32
- preorderInfo?: PreorderInfo;
33
- }
34
- export interface InventoryVariantV2 {
35
- /** Variant ID. */
36
- variantId?: string;
37
- /** Whether the product is listed as in stock. */
38
- inStock?: boolean | null;
39
- /** Quantity currently left in inventory. */
40
- quantity?: number | null;
41
- /**
42
- * Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level.
43
- * @readonly
44
- */
45
- availableForPreorder?: boolean;
46
- }
47
- export interface PreorderInfo {
48
- /** Whether the item is available for preorder. */
49
- enabled?: boolean;
50
- /** A message the buyer will see when the item is out of stock and preorder is enabled. */
51
- message?: string | null;
52
- /** Number of products that can be preordered after stock reaches zero. */
53
- limit?: number | null;
54
- }
55
- export interface InventoryItemChanged {
56
- /** Inventory item ID. */
57
- inventoryItemId?: string;
58
- /**
59
- * @internal
60
- * @internal */
61
- externalId?: string;
62
- /** Product ID. */
63
- productId?: string;
64
- /** Whether inventory is being tracked. */
65
- trackInventory?: boolean;
66
- /** Preorder information. */
67
- preorderInfo?: PreorderInfo;
68
- /** Date and time the inventory item was last updated. */
69
- _updatedDate?: Date;
70
- }
71
- export interface InventoryVariantsChanged {
72
- /** Inventory item ID. */
73
- inventoryItemId?: string;
74
- /**
75
- * @internal
76
- * @internal */
77
- externalId?: string;
78
- /** Product ID. */
79
- productId?: string;
80
- /** Information about changed variants. */
81
- variants?: ChangedInventoryVariant[];
82
- /** Date and time the inventory variant item was last updated. */
83
- _updatedDate?: Date;
84
- }
85
- export interface ChangedInventoryVariant {
86
- /** Variant ID. */
87
- _id?: string;
88
- /** Previous inventory variant data. */
89
- oldValue?: ChangedInventoryVariantData;
90
- /** Current inventory variant data. */
91
- newValue?: ChangedInventoryVariantData;
92
- }
93
- export interface ChangedInventoryVariantData {
94
- /** Inventory variant quantity. */
95
- quantity?: number | null;
96
- /** Whether the product variant is in stock. */
97
- inStock?: boolean;
98
- /** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
99
- availableForPreorder?: boolean;
100
- }
101
- export declare enum ReasonType {
102
- UNKNOWN = "UNKNOWN",
103
- ORDER = "ORDER",
104
- MANUAL = "MANUAL",
105
- REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
106
- }
107
- export interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
108
- /** Inventory item ID. */
109
- inventoryId: string;
110
- /**
111
- * @internal
112
- * @internal */
113
- externalId?: string;
114
- /** Product ID. */
115
- productId?: string;
116
- /** Variant IDs to query for this inventory item (optional). */
117
- variantIds?: string[];
118
- }
119
- /** @oneof */
120
- export interface GetInventoryVariantsRequestIdOneOf {
121
- /** Inventory item ID. */
122
- inventoryId?: string;
123
- /**
124
- * @internal
125
- * @internal */
126
- externalId?: string;
127
- /** Product ID. */
128
- productId?: string;
129
- }
130
- export interface GetInventoryVariantsResponse {
131
- /** Inventory item. */
132
- inventoryItem?: InventoryItemV2;
133
- }
134
- export interface GetInventoryItemsRequest {
135
- /** Product IDs */
136
- productIds?: string[];
137
- }
138
- export interface GetInventoryItemsResponse {
139
- /** Inventory items. */
140
- inventoryItems?: InventoryItemV2[];
141
- }
142
- export interface QueryInventoryRequest {
143
- /** Information about paging, filters, sorting. */
144
- query?: Query;
145
- }
146
- export interface Query {
147
- /** Paging options to limit and skip the number of items. */
148
- paging?: Paging;
149
- /** Filter string */
150
- filter?: string | null;
151
- /** Sort string */
152
- sort?: string | null;
153
- }
154
- export interface Paging {
155
- /** Amount of items to load per page */
156
- limit?: number | null;
157
- /** Number of items to skip in the display (relevant for all pages after the first) */
158
- offset?: number | null;
159
- }
160
- export interface QueryInventoryResponse {
161
- /** Inventory items. */
162
- inventoryItems?: InventoryItemV2[];
163
- /** Display metadata. */
164
- metadata?: PagingMetadata;
165
- /** Number of total results. */
166
- totalResults?: number;
167
- }
168
- export interface PagingMetadata {
169
- /** Amount of items to load per page */
170
- items?: number;
171
- /** Number of items to skip in the display (relevant for all pages after the first) */
172
- offset?: number;
173
- }
174
- export interface UpdateInventoryVariantsRequest {
175
- /** Inventory item. */
176
- inventoryItem: InventoryItemV2;
177
- }
178
- export interface UpdateInventoryVariantsResponse {
179
- }
180
- export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
181
- /** Change availability. */
182
- setInStock?: boolean | null;
183
- /** Set new quantity. */
184
- setQuantity?: number | null;
185
- /** Number to increment inventory by. */
186
- incrementBy?: number | null;
187
- /** Number to decrement inventory by. */
188
- decrementBy?: number | null;
189
- /** Variants filter. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
190
- filter?: Record<string, any> | null;
191
- }
192
- /** @oneof */
193
- export interface BulkUpdateInventoryVariantsRequestActionOneOf {
194
- /** Change availability. */
195
- setInStock?: boolean | null;
196
- /** Set new quantity. */
197
- setQuantity?: number | null;
198
- /** Number to increment inventory by. */
199
- incrementBy?: number | null;
200
- /** Number to decrement inventory by. */
201
- decrementBy?: number | null;
202
- }
203
- export interface BulkUpdateInventoryVariantsResponse {
204
- }
205
- export interface BulkUpdateInventoryItemsRequest {
206
- /** Variants filter */
207
- variantsFilter?: Record<string, any> | null;
208
- /** Whether inventory is being tracked. */
209
- trackInventory?: boolean | null;
210
- }
211
- export interface BulkUpdateInventoryItemsResponse {
212
- }
213
- export interface DecrementInventoryRequest {
214
- /** Item or product to decrement. */
215
- decrementData?: DecrementData[];
216
- }
217
- export interface DecrementData extends DecrementDataIdOneOf {
218
- /** Inventory item ID. */
219
- inventoryId?: string;
220
- /**
221
- * @internal
222
- * @internal */
223
- externalId?: string;
224
- /** Product ID. */
225
- productId?: string;
226
- /** Variant ID. */
227
- variantId?: string;
228
- /** Number to decrement inventory by. */
229
- decrementBy?: number;
230
- /**
231
- * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
232
- * If true and the item is available for preorder, we allow negative inventory.
233
- * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
234
- */
235
- preorderRequest?: boolean;
236
- }
237
- /** @oneof */
238
- export interface DecrementDataIdOneOf {
239
- /** Inventory item ID. */
240
- inventoryId?: string;
241
- /**
242
- * @internal
243
- * @internal */
244
- externalId?: string;
245
- /** Product ID. */
246
- productId?: string;
247
- }
248
- export interface DecrementInventoryResponse {
249
- }
250
- export interface IncrementInventoryRequest {
251
- /** Item or product to increment. */
252
- incrementData?: IncrementData[];
253
- }
254
- export interface IncrementData extends IncrementDataIdOneOf {
255
- /** Inventory item ID. */
256
- inventoryId?: string;
257
- /** Product ID. */
258
- productId?: string;
259
- /** Variant ID. */
260
- variantId?: string;
261
- /** Number to increment inventory by. */
262
- incrementBy?: number;
263
- }
264
- /** @oneof */
265
- export interface IncrementDataIdOneOf {
266
- /** Inventory item ID. */
267
- inventoryId?: string;
268
- /** Product ID. */
269
- productId?: string;
270
- }
271
- export interface IncrementInventoryResponse {
272
- }
273
- export interface GetInventoryVariantsResponseNonNullableFields {
274
- inventoryItem?: {
275
- variants: {
276
- variantId: string;
277
- availableForPreorder: boolean;
278
- }[];
279
- numericId: string;
280
- preorderInfo?: {
281
- enabled: boolean;
282
- };
283
- };
284
- }
285
- export interface QueryInventoryResponseNonNullableFields {
286
- inventoryItems: {
287
- variants: {
288
- variantId: string;
289
- availableForPreorder: boolean;
290
- }[];
291
- numericId: string;
292
- preorderInfo?: {
293
- enabled: boolean;
294
- };
295
- }[];
296
- metadata?: {
297
- items: number;
298
- offset: number;
299
- };
300
- totalResults: number;
301
- }
302
- export declare const onInventoryItemChanged: EventDefinition<InventoryItemChanged, "com.wix.ecommerce.inventory.api.v1.InventoryItemChanged">;
303
- export declare const onInventoryVariantsChanged: EventDefinition<InventoryVariantsChanged, "com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged">;
304
- /**
305
- * Gets inventory variant information based on the specified option choices.
306
- *
307
- *
308
- * The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
309
- * @param inventoryId - Inventory item ID.
310
- * @public
311
- * @requiredField inventoryId
312
- * @permissionScope Manage Stores - all permissions
313
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
314
- * @permissionScope Manage Products
315
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
316
- * @permissionScope Read Stores - all read permissions
317
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
318
- * @permissionScope Read Products
319
- * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
320
- * @applicableIdentity APP
321
- */
322
- export declare function getInventoryVariants(inventoryId: string, options?: GetInventoryVariantsOptions): Promise<GetInventoryVariantsResponse & GetInventoryVariantsResponseNonNullableFields>;
323
- export interface GetInventoryVariantsOptions extends GetInventoryVariantsRequestIdOneOf {
324
- /**
325
- * @internal
326
- * @internal */
327
- externalId?: string;
328
- /** Product ID. */
329
- productId?: string;
330
- /** Variant IDs to query for this inventory item (optional). */
331
- variantIds?: string[];
332
- }
333
- /**
334
- * Returns a list of inventory items, given the provided paging, sorting and filtering.
335
- * @public
336
- * @documentationMaturity preview
337
- * @permissionScope Manage Stores - all permissions
338
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
339
- * @permissionScope Manage Products
340
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
341
- * @permissionScope Read Stores - all read permissions
342
- * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
343
- * @permissionScope Read Products
344
- * @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
345
- * @applicableIdentity APP
346
- */
347
- export declare function queryInventory(options?: QueryInventoryOptions): Promise<QueryInventoryResponse & QueryInventoryResponseNonNullableFields>;
348
- export interface QueryInventoryOptions {
349
- /** Information about paging, filters, sorting. */
350
- query?: Query;
351
- }
352
- /**
353
- * Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
354
- *
355
- *
356
- * The `updateInventoryVariants()` function is a Promise that resolves to the updated inventory variant data.
357
- * @param productId - Product ID.
358
- * @public
359
- * @requiredField inventoryItem
360
- * @requiredField productId
361
- * @param inventoryItem - Inventory item to update.
362
- * @permissionScope Manage Stores - all permissions
363
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
364
- * @permissionScope Manage Products
365
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
366
- * @applicableIdentity APP
367
- */
368
- export declare function updateInventoryVariants(productId: string | null, inventoryItem: UpdateInventoryVariantsInventoryItem): Promise<void>;
369
- export interface UpdateInventoryVariantsInventoryItem {
370
- /** Inventory item ID. */
371
- _id?: string | null;
372
- /**
373
- * @internal
374
- * @internal
375
- * @readonly
376
- */
377
- externalId?: string | null;
378
- /** Whether quantity is being tracked. */
379
- trackQuantity?: boolean | null;
380
- /** Variants associated with this inventory item. */
381
- variants?: InventoryVariantV2[];
382
- /**
383
- * Last updated timestamp.
384
- * @readonly
385
- */
386
- lastUpdated?: Date;
387
- /**
388
- * Inventory’s unique numeric ID (assigned in ascending order).
389
- * Primarily for sorting and filtering when crawling all inventories.
390
- * @readonly
391
- */
392
- numericId?: string;
393
- /** Preorder information. */
394
- preorderInfo?: PreorderInfo;
395
- }
396
- /**
397
- * Subtracts a set number of items from inventory.
398
- *
399
- *
400
- * The `decrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
401
- * @param decrementData - Item or product to decrement.
402
- * @public
403
- * @requiredField decrementData
404
- * @permissionScope Manage Stores - all permissions
405
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
406
- * @permissionScope Manage Products
407
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
408
- * @applicableIdentity APP
409
- */
410
- export declare function decrementInventory(decrementData: DecrementData[]): Promise<void>;
411
- /**
412
- * Adds a set number of items to inventory.
413
- *
414
- *
415
- * The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
416
- * @param incrementData - Item or product to increment.
417
- * @public
418
- * @requiredField incrementData
419
- * @permissionScope Manage Stores - all permissions
420
- * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
421
- * @permissionScope Manage Products
422
- * @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
423
- * @applicableIdentity APP
424
- */
425
- export declare function incrementInventory(incrementData: IncrementData[]): Promise<void>;