@wix/auto_sdk_stores_inventory 1.0.11 → 1.0.12

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,14 +1,6 @@
1
- export interface InventoryItemV2 {
1
+ interface InventoryItemV2 {
2
2
  /** Inventory item ID. */
3
- id?: string | null;
4
- /**
5
- * Deprecated: use productId.
6
- * @readonly
7
- * @deprecated Deprecated: use productId.
8
- * @replacedBy product_id
9
- * @targetRemovalDate 2024-12-31
10
- */
11
- externalId?: string | null;
3
+ _id?: string | null;
12
4
  /**
13
5
  * Product ID.
14
6
  * @readonly
@@ -32,7 +24,7 @@ export interface InventoryItemV2 {
32
24
  /** Preorder information. */
33
25
  preorderInfo?: PreorderInfo;
34
26
  }
35
- export interface InventoryVariantV2 {
27
+ interface InventoryVariantV2 {
36
28
  /** Variant ID. */
37
29
  variantId?: string;
38
30
  /** Whether the product is listed as in stock. */
@@ -45,7 +37,7 @@ export interface InventoryVariantV2 {
45
37
  */
46
38
  availableForPreorder?: boolean;
47
39
  }
48
- export interface PreorderInfo {
40
+ interface PreorderInfo {
49
41
  /** Whether the item is available for preorder. */
50
42
  enabled?: boolean;
51
43
  /**
@@ -60,11 +52,11 @@ export interface PreorderInfo {
60
52
  */
61
53
  limit?: number | null;
62
54
  }
63
- export interface UpdateInventoryVariantsRequest {
55
+ interface UpdateInventoryVariantsRequest {
64
56
  /** Inventory item. */
65
57
  inventoryItem: InventoryItemV2;
66
58
  }
67
- export declare enum ReasonType {
59
+ declare enum ReasonType {
68
60
  /** Unknown reason. */
69
61
  UNKNOWN = "UNKNOWN",
70
62
  /** Order related. */
@@ -74,11 +66,9 @@ export declare enum ReasonType {
74
66
  /** Reverting an inventory change. */
75
67
  REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
76
68
  }
77
- /** @enumType */
78
- export type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
79
- export interface UpdateInventoryVariantsResponse {
69
+ interface UpdateInventoryVariantsResponse {
80
70
  }
81
- export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
71
+ interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
82
72
  /** Change availability. */
83
73
  setInStock?: boolean | null;
84
74
  /** Set new quantity. */
@@ -97,7 +87,7 @@ export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryV
97
87
  filter?: Record<string, any> | null;
98
88
  }
99
89
  /** @oneof */
100
- export interface BulkUpdateInventoryVariantsRequestActionOneOf {
90
+ interface BulkUpdateInventoryVariantsRequestActionOneOf {
101
91
  /** Change availability. */
102
92
  setInStock?: boolean | null;
103
93
  /** Set new quantity. */
@@ -113,37 +103,30 @@ export interface BulkUpdateInventoryVariantsRequestActionOneOf {
113
103
  */
114
104
  decrementBy?: number | null;
115
105
  }
116
- export interface BulkUpdateInventoryVariantsResponse {
106
+ interface BulkUpdateInventoryVariantsResponse {
117
107
  }
118
- export interface BulkUpdateInventoryItemsRequest {
108
+ interface BulkUpdateInventoryItemsRequest {
119
109
  /** Variants filter */
120
110
  variantsFilter?: Record<string, any> | null;
121
111
  /** Whether inventory is being tracked. */
122
112
  trackInventory?: boolean | null;
123
113
  }
124
- export interface BulkUpdateInventoryItemsResponse {
114
+ interface BulkUpdateInventoryItemsResponse {
125
115
  }
126
- export interface DecrementInventoryRequest {
116
+ interface DecrementInventoryRequest {
127
117
  /**
118
+ * Item or product to decrement.
128
119
  * @minSize 1
129
120
  * @maxSize 300
130
121
  */
131
122
  decrementData?: DecrementData[];
132
123
  }
133
- export interface DecrementData extends DecrementDataIdOneOf {
124
+ interface DecrementData extends DecrementDataIdOneOf {
134
125
  /**
135
126
  * Inventory item ID.
136
127
  * @maxLength 36
137
128
  */
138
129
  inventoryId?: string;
139
- /**
140
- * Deprecated: use productId.
141
- * @maxLength 36
142
- * @deprecated Deprecated: use productId.
143
- * @replacedBy product_id
144
- * @targetRemovalDate 2024-12-31
145
- */
146
- externalId?: string;
147
130
  /**
148
131
  * Product ID.
149
132
  * @maxLength 36
@@ -167,36 +150,29 @@ export interface DecrementData extends DecrementDataIdOneOf {
167
150
  preorderRequest?: boolean;
168
151
  }
169
152
  /** @oneof */
170
- export interface DecrementDataIdOneOf {
153
+ interface DecrementDataIdOneOf {
171
154
  /**
172
155
  * Inventory item ID.
173
156
  * @maxLength 36
174
157
  */
175
158
  inventoryId?: string;
176
- /**
177
- * Deprecated: use productId.
178
- * @maxLength 36
179
- * @deprecated Deprecated: use productId.
180
- * @replacedBy product_id
181
- * @targetRemovalDate 2024-12-31
182
- */
183
- externalId?: string;
184
159
  /**
185
160
  * Product ID.
186
161
  * @maxLength 36
187
162
  */
188
163
  productId?: string;
189
164
  }
190
- export interface DecrementInventoryResponse {
165
+ interface DecrementInventoryResponse {
191
166
  }
192
- export interface IncrementInventoryRequest {
167
+ interface IncrementInventoryRequest {
193
168
  /**
169
+ * Item or product to increment.
194
170
  * @minSize 1
195
171
  * @maxSize 300
196
172
  */
197
173
  incrementData?: IncrementData[];
198
174
  }
199
- export interface IncrementData extends IncrementDataIdOneOf {
175
+ interface IncrementData extends IncrementDataIdOneOf {
200
176
  /**
201
177
  * Inventory item ID.
202
178
  * @maxLength 36
@@ -219,7 +195,7 @@ export interface IncrementData extends IncrementDataIdOneOf {
219
195
  incrementBy?: number;
220
196
  }
221
197
  /** @oneof */
222
- export interface IncrementDataIdOneOf {
198
+ interface IncrementDataIdOneOf {
223
199
  /**
224
200
  * Inventory item ID.
225
201
  * @maxLength 36
@@ -231,18 +207,11 @@ export interface IncrementDataIdOneOf {
231
207
  */
232
208
  productId?: string;
233
209
  }
234
- export interface IncrementInventoryResponse {
210
+ interface IncrementInventoryResponse {
235
211
  }
236
- export interface InventoryItemChanged {
212
+ interface InventoryItemChanged {
237
213
  /** Inventory item ID. */
238
214
  inventoryItemId?: string;
239
- /**
240
- * Deprecated: use productId.
241
- * @deprecated Deprecated: use productId.
242
- * @replacedBy product_id
243
- * @targetRemovalDate 2024-12-31
244
- */
245
- externalId?: string;
246
215
  /** Product ID. */
247
216
  productId?: string;
248
217
  /** Whether inventory is being tracked. */
@@ -252,34 +221,27 @@ export interface InventoryItemChanged {
252
221
  /** Field mask of updated fields. */
253
222
  fieldMask?: string[];
254
223
  /** Date and time the inventory item was last updated. */
255
- updatedDate?: Date | null;
224
+ _updatedDate?: Date | null;
256
225
  }
257
- export interface InventoryVariantsChanged {
226
+ interface InventoryVariantsChanged {
258
227
  /** Inventory item ID. */
259
228
  inventoryItemId?: string;
260
- /**
261
- * Deprecated: use productId.
262
- * @deprecated Deprecated: use productId.
263
- * @replacedBy product_id
264
- * @targetRemovalDate 2024-12-31
265
- */
266
- externalId?: string;
267
229
  /** Product ID. */
268
230
  productId?: string;
269
231
  /** Information about changed variants. */
270
232
  variants?: ChangedInventoryVariant[];
271
233
  /** Date and time the inventory variant item was last updated. */
272
- updatedDate?: Date | null;
234
+ _updatedDate?: Date | null;
273
235
  }
274
- export interface ChangedInventoryVariant {
236
+ interface ChangedInventoryVariant {
275
237
  /** Variant ID. */
276
- id?: string;
238
+ _id?: string;
277
239
  /** Previous inventory variant data. */
278
240
  oldValue?: ChangedInventoryVariantData;
279
241
  /** Current inventory variant data. */
280
242
  newValue?: ChangedInventoryVariantData;
281
243
  }
282
- export interface ChangedInventoryVariantData {
244
+ interface ChangedInventoryVariantData {
283
245
  /** Inventory variant quantity. */
284
246
  quantity?: number | null;
285
247
  /** Whether the product variant is in stock. */
@@ -287,58 +249,46 @@ export interface ChangedInventoryVariantData {
287
249
  /** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
288
250
  availableForPreorder?: boolean;
289
251
  }
290
- export interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
252
+ interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
291
253
  /** Inventory item ID. */
292
254
  inventoryId: string;
293
- /**
294
- * Deprecated (use productID instead).
295
- * @deprecated Deprecated (use productID instead).
296
- * @replacedBy product_id
297
- * @targetRemovalDate 2024-12-31
298
- */
299
- externalId?: string;
300
255
  /** Product ID. */
301
256
  productId?: string;
302
257
  /** Variant IDs to query for this inventory item (optional). */
303
258
  variantIds?: string[];
304
259
  }
305
260
  /** @oneof */
306
- export interface GetInventoryVariantsRequestIdOneOf {
261
+ interface GetInventoryVariantsRequestIdOneOf {
307
262
  /** Inventory item ID. */
308
263
  inventoryId?: string;
309
- /**
310
- * Deprecated (use productID instead).
311
- * @deprecated Deprecated (use productID instead).
312
- * @replacedBy product_id
313
- * @targetRemovalDate 2024-12-31
314
- */
315
- externalId?: string;
316
264
  /** Product ID. */
317
265
  productId?: string;
318
266
  }
319
- export interface GetInventoryVariantsResponse {
267
+ interface GetInventoryVariantsResponse {
320
268
  /** Inventory item. */
321
269
  inventoryItem?: InventoryItemV2;
322
270
  }
323
- export interface GetInventoryItemsRequest {
271
+ interface GetInventoryItemsRequest {
324
272
  /** Product IDs */
325
273
  productIds?: string[];
326
274
  }
327
- export interface GetInventoryItemsResponse {
275
+ interface GetInventoryItemsResponse {
328
276
  /** Inventory items. */
329
277
  inventoryItems?: InventoryItemV2[];
330
278
  }
331
- export interface QueryInventoryRequest {
279
+ interface QueryInventoryRequest {
280
+ /** Information about paging, filters, sorting. */
332
281
  query?: Query;
333
282
  }
334
- export interface Query {
283
+ interface Query {
284
+ /** Paging options to limit and skip the number of items. */
335
285
  paging?: Paging;
336
286
  /** Filter string */
337
287
  filter?: string | null;
338
288
  /** Sort string */
339
289
  sort?: string | null;
340
290
  }
341
- export interface Paging {
291
+ interface Paging {
342
292
  /**
343
293
  * Amount of items to load per page
344
294
  * @max 100
@@ -347,7 +297,7 @@ export interface Paging {
347
297
  /** Number of items to skip in the display (relevant for all pages after the first) */
348
298
  offset?: number | null;
349
299
  }
350
- export interface QueryInventoryResponse {
300
+ interface QueryInventoryResponse {
351
301
  /** Inventory items. */
352
302
  inventoryItems?: InventoryItemV2[];
353
303
  /** Display metadata. */
@@ -355,13 +305,13 @@ export interface QueryInventoryResponse {
355
305
  /** Number of total results. */
356
306
  totalResults?: number;
357
307
  }
358
- export interface PagingMetadata {
308
+ interface PagingMetadata {
359
309
  /** Amount of items to load per page */
360
310
  items?: number;
361
311
  /** Number of items to skip in the display (relevant for all pages after the first) */
362
312
  offset?: number;
363
313
  }
364
- export interface MessageEnvelope {
314
+ interface MessageEnvelope {
365
315
  /**
366
316
  * App instance ID.
367
317
  * @format GUID
@@ -377,7 +327,7 @@ export interface MessageEnvelope {
377
327
  /** Stringify payload. */
378
328
  data?: string;
379
329
  }
380
- export interface IdentificationData extends IdentificationDataIdOneOf {
330
+ interface IdentificationData extends IdentificationDataIdOneOf {
381
331
  /**
382
332
  * ID of a site visitor that has not logged in to the site.
383
333
  * @format GUID
@@ -402,7 +352,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
402
352
  identityType?: WebhookIdentityTypeWithLiterals;
403
353
  }
404
354
  /** @oneof */
405
- export interface IdentificationDataIdOneOf {
355
+ interface IdentificationDataIdOneOf {
406
356
  /**
407
357
  * ID of a site visitor that has not logged in to the site.
408
358
  * @format GUID
@@ -424,7 +374,7 @@ export interface IdentificationDataIdOneOf {
424
374
  */
425
375
  appId?: string;
426
376
  }
427
- export declare enum WebhookIdentityType {
377
+ declare enum WebhookIdentityType {
428
378
  UNKNOWN = "UNKNOWN",
429
379
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
430
380
  MEMBER = "MEMBER",
@@ -432,4 +382,66 @@ export declare enum WebhookIdentityType {
432
382
  APP = "APP"
433
383
  }
434
384
  /** @enumType */
435
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
385
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
386
+ interface BaseEventMetadata {
387
+ /**
388
+ * App instance ID.
389
+ * @format GUID
390
+ */
391
+ instanceId?: string | null;
392
+ /**
393
+ * Event type.
394
+ * @maxLength 150
395
+ */
396
+ eventType?: string;
397
+ /** The identification type and identity data. */
398
+ identity?: IdentificationData;
399
+ }
400
+ interface InventoryItemChangedEnvelope {
401
+ data: InventoryItemChanged;
402
+ metadata: BaseEventMetadata;
403
+ }
404
+ interface InventoryVariantsChangedEnvelope {
405
+ data: InventoryVariantsChanged;
406
+ metadata: BaseEventMetadata;
407
+ }
408
+ interface UpdateInventoryVariantsInventoryItem {
409
+ /** Inventory item ID. */
410
+ _id?: string | null;
411
+ /** Whether quantity is being tracked. */
412
+ trackQuantity?: boolean | null;
413
+ /** Variants associated with this inventory item. */
414
+ variants?: InventoryVariantV2[];
415
+ /**
416
+ * Last updated timestamp.
417
+ * @readonly
418
+ */
419
+ lastUpdated?: Date | null;
420
+ /**
421
+ * Inventory’s unique numeric ID (assigned in ascending order).
422
+ * Primarily for sorting and filtering when crawling all inventories.
423
+ * @readonly
424
+ */
425
+ numericId?: string;
426
+ /** Preorder information. */
427
+ preorderInfo?: PreorderInfo;
428
+ }
429
+ interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
430
+ /** Product ID. */
431
+ productId?: string;
432
+ /** Variant IDs to query for this inventory item (optional). */
433
+ variantIds?: string[];
434
+ }
435
+ /** @oneof */
436
+ interface GetInventoryVariantsOptionsIdOneOf {
437
+ /** Inventory item ID. */
438
+ inventoryId?: string;
439
+ /** Product ID. */
440
+ productId?: string;
441
+ }
442
+ interface QueryInventoryOptions {
443
+ /** Information about paging, filters, sorting. */
444
+ query?: Query;
445
+ }
446
+
447
+ export { type Query as A, type BulkUpdateInventoryVariantsRequest as B, type ChangedInventoryVariant as C, type DecrementData as D, type Paging as E, type PagingMetadata as F, type GetInventoryVariantsOptions as G, type IdentificationData as H, type IncrementData as I, type IdentificationDataIdOneOf as J, type BaseEventMetadata as K, type GetInventoryVariantsOptionsIdOneOf as L, type MessageEnvelope as M, type PreorderInfo as P, type QueryInventoryOptions as Q, ReasonType as R, type UpdateInventoryVariantsInventoryItem as U, WebhookIdentityType as W, type GetInventoryVariantsResponse as a, type QueryInventoryResponse as b, type InventoryItemChangedEnvelope as c, type InventoryVariantsChangedEnvelope as d, type InventoryItemV2 as e, type InventoryVariantV2 as f, type UpdateInventoryVariantsRequest as g, type UpdateInventoryVariantsResponse as h, type BulkUpdateInventoryVariantsRequestActionOneOf as i, type BulkUpdateInventoryVariantsResponse as j, type BulkUpdateInventoryItemsRequest as k, type BulkUpdateInventoryItemsResponse as l, type DecrementInventoryRequest as m, type DecrementDataIdOneOf as n, type DecrementInventoryResponse as o, type IncrementInventoryRequest as p, type IncrementDataIdOneOf as q, type IncrementInventoryResponse as r, type InventoryItemChanged as s, type InventoryVariantsChanged as t, type ChangedInventoryVariantData as u, type GetInventoryVariantsRequest as v, type GetInventoryVariantsRequestIdOneOf as w, type GetInventoryItemsRequest as x, type GetInventoryItemsResponse as y, type QueryInventoryRequest as z };
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_stores_inventory",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
7
7
  },
8
8
  "keywords": [],
9
9
  "sideEffects": false,
10
- "main": "./build/cjs/index.js",
11
- "types": "./build/es/index.d.ts",
10
+ "main": "/build/index.js",
11
+ "types": "./build/index.d.mts",
12
12
  "exports": {
13
13
  ".": {
14
- "import": "./build/es/index.js",
15
- "require": "./build/cjs/index.js",
16
- "types": "./build/es/index.d.ts"
14
+ "import": "./build/index.mjs",
15
+ "require": "./build/index.js",
16
+ "types": "./build/index.d.mts"
17
17
  },
18
18
  "./package.json": "./package.json",
19
19
  "./meta": {
20
- "import": "./build/es/meta.js",
21
- "require": "./build/cjs/meta.js",
22
- "types": "./build/es/meta.d.ts"
20
+ "import": "./build/meta.mjs",
21
+ "require": "./build/meta.js",
22
+ "types": "./build/meta.d.mts"
23
23
  }
24
24
  },
25
25
  "files": [
@@ -32,10 +32,11 @@
32
32
  "@wix/sdk-types": "^1.13.28"
33
33
  },
34
34
  "devDependencies": {
35
+ "tsup": "^8.4.0",
35
36
  "typescript": "^5.3.2"
36
37
  },
37
38
  "scripts": {
38
- "build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.internal.json tsconfig.internal.esm.json",
39
+ "build": "tsup",
39
40
  "test": ":"
40
41
  },
41
42
  "wix": {
@@ -48,5 +49,5 @@
48
49
  "fqdn": "wix.stores.v2.inventory"
49
50
  }
50
51
  },
51
- "falconPackageHash": "d1f88df3126e020f8c8823555b3914fdd0fe07c0499634091678afd4"
52
+ "falconPackageHash": "df1ca1cf89537eea1a16270b58a2fb2af1c3af757fdfcc47c6572266"
52
53
  }
@@ -1 +0,0 @@
1
- export * from './src/stores-v2-inventory-inventory.context.js';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/stores-v2-inventory-inventory.context.js"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iFAA+D"}
@@ -1 +0,0 @@
1
- export * from './src/stores-v2-inventory-inventory.universal.js';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/stores-v2-inventory-inventory.universal.js"), exports);
18
- //# sourceMappingURL=index.typings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mFAAiE"}
@@ -1 +0,0 @@
1
- export * from './src/stores-v2-inventory-inventory.meta.js';
package/build/cjs/meta.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/stores-v2-inventory-inventory.meta.js"), exports);
18
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8EAA4D"}
@@ -1,20 +0,0 @@
1
- import { updateInventoryVariants as publicUpdateInventoryVariants, decrementInventory as publicDecrementInventory, incrementInventory as publicIncrementInventory, getInventoryVariants as publicGetInventoryVariants, queryInventory as publicQueryInventory } from './stores-v2-inventory-inventory.public.js';
2
- import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
3
- import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
4
- import { onInventoryItemChanged as publicOnInventoryItemChanged } from './stores-v2-inventory-inventory.public.js';
5
- import { onInventoryVariantsChanged as publicOnInventoryVariantsChanged } from './stores-v2-inventory-inventory.public.js';
6
- export declare const updateInventoryVariants: MaybeContext<BuildRESTFunction<typeof publicUpdateInventoryVariants> & typeof publicUpdateInventoryVariants>;
7
- export declare const decrementInventory: MaybeContext<BuildRESTFunction<typeof publicDecrementInventory> & typeof publicDecrementInventory>;
8
- export declare const incrementInventory: MaybeContext<BuildRESTFunction<typeof publicIncrementInventory> & typeof publicIncrementInventory>;
9
- export declare const getInventoryVariants: MaybeContext<BuildRESTFunction<typeof publicGetInventoryVariants> & typeof publicGetInventoryVariants>;
10
- export declare const queryInventory: MaybeContext<BuildRESTFunction<typeof publicQueryInventory> & typeof publicQueryInventory>;
11
- /**
12
- * Triggered when an inventory item is changed.
13
- */
14
- export declare const onInventoryItemChanged: ReturnType<typeof createEventModule<typeof publicOnInventoryItemChanged>>;
15
- /**
16
- * Triggered when inventory variants are changed.
17
- */
18
- export declare const onInventoryVariantsChanged: ReturnType<typeof createEventModule<typeof publicOnInventoryVariantsChanged>>;
19
- export { ReasonType, WebhookIdentityType, } from './stores-v2-inventory-inventory.universal.js';
20
- export { InventoryItemV2, InventoryVariantV2, PreorderInfo, UpdateInventoryVariantsRequest, UpdateInventoryVariantsResponse, BulkUpdateInventoryVariantsRequest, BulkUpdateInventoryVariantsRequestActionOneOf, BulkUpdateInventoryVariantsResponse, BulkUpdateInventoryItemsRequest, BulkUpdateInventoryItemsResponse, DecrementInventoryRequest, DecrementData, DecrementDataIdOneOf, DecrementInventoryResponse, IncrementInventoryRequest, IncrementData, IncrementDataIdOneOf, IncrementInventoryResponse, InventoryItemChanged, InventoryVariantsChanged, ChangedInventoryVariant, ChangedInventoryVariantData, GetInventoryVariantsRequest, GetInventoryVariantsRequestIdOneOf, GetInventoryVariantsResponse, GetInventoryItemsRequest, GetInventoryItemsResponse, QueryInventoryRequest, Query, Paging, QueryInventoryResponse, PagingMetadata, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, BaseEventMetadata, InventoryItemChangedEnvelope, InventoryVariantsChangedEnvelope, UpdateInventoryVariantsInventoryItem, GetInventoryVariantsOptions, GetInventoryVariantsOptionsIdOneOf, QueryInventoryOptions, } from './stores-v2-inventory-inventory.universal.js';
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebhookIdentityType = exports.ReasonType = exports.onInventoryVariantsChanged = exports.onInventoryItemChanged = exports.queryInventory = exports.getInventoryVariants = exports.incrementInventory = exports.decrementInventory = exports.updateInventoryVariants = void 0;
4
- const stores_v2_inventory_inventory_public_js_1 = require("./stores-v2-inventory-inventory.public.js");
5
- const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
6
- const event_definition_modules_1 = require("@wix/sdk-runtime/event-definition-modules");
7
- const stores_v2_inventory_inventory_public_js_2 = require("./stores-v2-inventory-inventory.public.js");
8
- const stores_v2_inventory_inventory_public_js_3 = require("./stores-v2-inventory-inventory.public.js");
9
- exports.updateInventoryVariants = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.updateInventoryVariants);
10
- exports.decrementInventory = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.decrementInventory);
11
- exports.incrementInventory = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.incrementInventory);
12
- exports.getInventoryVariants = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.getInventoryVariants);
13
- exports.queryInventory = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.queryInventory);
14
- /**
15
- * Triggered when an inventory item is changed.
16
- */
17
- exports.onInventoryItemChanged = (0, event_definition_modules_1.createEventModule)(stores_v2_inventory_inventory_public_js_2.onInventoryItemChanged);
18
- /**
19
- * Triggered when inventory variants are changed.
20
- */
21
- exports.onInventoryVariantsChanged = (0, event_definition_modules_1.createEventModule)(stores_v2_inventory_inventory_public_js_3.onInventoryVariantsChanged);
22
- var stores_v2_inventory_inventory_universal_js_1 = require("./stores-v2-inventory-inventory.universal.js");
23
- Object.defineProperty(exports, "ReasonType", { enumerable: true, get: function () { return stores_v2_inventory_inventory_universal_js_1.ReasonType; } });
24
- Object.defineProperty(exports, "WebhookIdentityType", { enumerable: true, get: function () { return stores_v2_inventory_inventory_universal_js_1.WebhookIdentityType; } });
25
- //# sourceMappingURL=stores-v2-inventory-inventory.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stores-v2-inventory-inventory.context.js","sourceRoot":"","sources":["../../../src/stores-v2-inventory-inventory.context.ts"],"names":[],"mappings":";;;AAAA,uGAMmD;AACnD,gEAAiE;AACjE,wFAA8E;AAE9E,uGAAmH;AACnH,uGAA2H;AAE9G,QAAA,uBAAuB,GAGlB,IAAA,+BAAgB,EAAC,iEAA6B,CAAC,CAAC;AACrD,QAAA,kBAAkB,GAGb,IAAA,+BAAgB,EAAC,4DAAwB,CAAC,CAAC;AAChD,QAAA,kBAAkB,GAGb,IAAA,+BAAgB,EAAC,4DAAwB,CAAC,CAAC;AAChD,QAAA,oBAAoB,GAGf,IAAA,+BAAgB,EAAC,8DAA0B,CAAC,CAAC;AAClD,QAAA,cAAc,GAET,IAAA,+BAAgB,EAAC,wDAAoB,CAAC,CAAC;AACzD;;GAEG;AACU,QAAA,sBAAsB,GAE/B,IAAA,4CAAiB,EAAC,gEAA4B,CAAC,CAAC;AACpD;;GAEG;AACU,QAAA,0BAA0B,GAEnC,IAAA,4CAAiB,EAAC,oEAAgC,CAAC,CAAC;AAExD,2GAGsD;AAFpD,wIAAA,UAAU,OAAA;AACV,iJAAA,mBAAmB,OAAA"}
@@ -1,31 +0,0 @@
1
- import { RequestOptionsFactory } from '@wix/sdk-types';
2
- /**
3
- * Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
4
- *
5
- *
6
- * The `updateInventoryVariants()` function is a Promise that resolves to the updated inventory variant data.
7
- */
8
- export declare function updateInventoryVariants(payload: object): RequestOptionsFactory<any>;
9
- /**
10
- * Subtracts a set number of items from inventory.
11
- *
12
- *
13
- * The `decrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
14
- */
15
- export declare function decrementInventory(payload: object): RequestOptionsFactory<any>;
16
- /**
17
- * Adds a set number of items to inventory.
18
- *
19
- *
20
- * The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
21
- */
22
- export declare function incrementInventory(payload: object): RequestOptionsFactory<any>;
23
- /**
24
- * Gets inventory variant information based on the specified option choices.
25
- *
26
- *
27
- * The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
28
- */
29
- export declare function getInventoryVariants(payload: object): RequestOptionsFactory<any>;
30
- /** Returns a list of inventory items, given the provided paging, sorting and filtering. */
31
- export declare function queryInventory(payload: object): RequestOptionsFactory<any>;