@wix/auto_sdk_stores_inventory 1.0.1 → 1.0.3

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 (69) hide show
  1. package/build/cjs/src/stores-v2-inventory-inventory.context.d.ts +4 -4
  2. package/build/cjs/src/stores-v2-inventory-inventory.context.js +3 -3
  3. package/build/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -1
  4. package/build/cjs/src/stores-v2-inventory-inventory.http.d.ts +9 -9
  5. package/build/cjs/src/stores-v2-inventory-inventory.http.js +118 -118
  6. package/build/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -1
  7. package/build/cjs/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
  8. package/build/cjs/src/stores-v2-inventory-inventory.meta.js +31 -31
  9. package/build/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -1
  10. package/build/cjs/src/stores-v2-inventory-inventory.public.d.ts +19 -19
  11. package/build/cjs/src/stores-v2-inventory-inventory.public.js +13 -13
  12. package/build/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -1
  13. package/build/cjs/src/stores-v2-inventory-inventory.types.d.ts +224 -126
  14. package/build/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -1
  15. package/build/cjs/src/stores-v2-inventory-inventory.universal.d.ts +274 -165
  16. package/build/cjs/src/stores-v2-inventory-inventory.universal.js +91 -91
  17. package/build/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -1
  18. package/build/es/src/stores-v2-inventory-inventory.context.d.ts +4 -4
  19. package/build/es/src/stores-v2-inventory-inventory.context.js +3 -3
  20. package/build/es/src/stores-v2-inventory-inventory.context.js.map +1 -1
  21. package/build/es/src/stores-v2-inventory-inventory.http.d.ts +9 -9
  22. package/build/es/src/stores-v2-inventory-inventory.http.js +115 -115
  23. package/build/es/src/stores-v2-inventory-inventory.http.js.map +1 -1
  24. package/build/es/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
  25. package/build/es/src/stores-v2-inventory-inventory.meta.js +25 -25
  26. package/build/es/src/stores-v2-inventory-inventory.meta.js.map +1 -1
  27. package/build/es/src/stores-v2-inventory-inventory.public.d.ts +19 -19
  28. package/build/es/src/stores-v2-inventory-inventory.public.js +10 -10
  29. package/build/es/src/stores-v2-inventory-inventory.public.js.map +1 -1
  30. package/build/es/src/stores-v2-inventory-inventory.types.d.ts +224 -126
  31. package/build/es/src/stores-v2-inventory-inventory.types.js.map +1 -1
  32. package/build/es/src/stores-v2-inventory-inventory.universal.d.ts +274 -165
  33. package/build/es/src/stores-v2-inventory-inventory.universal.js +85 -85
  34. package/build/es/src/stores-v2-inventory-inventory.universal.js.map +1 -1
  35. package/build/internal/cjs/src/stores-v2-inventory-inventory.context.d.ts +4 -4
  36. package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js +3 -3
  37. package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -1
  38. package/build/internal/cjs/src/stores-v2-inventory-inventory.http.d.ts +9 -9
  39. package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js +118 -118
  40. package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -1
  41. package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
  42. package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js +31 -31
  43. package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -1
  44. package/build/internal/cjs/src/stores-v2-inventory-inventory.public.d.ts +19 -19
  45. package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js +13 -13
  46. package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -1
  47. package/build/internal/cjs/src/stores-v2-inventory-inventory.types.d.ts +224 -126
  48. package/build/internal/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -1
  49. package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.d.ts +307 -189
  50. package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js +91 -91
  51. package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -1
  52. package/build/internal/es/src/stores-v2-inventory-inventory.context.d.ts +4 -4
  53. package/build/internal/es/src/stores-v2-inventory-inventory.context.js +3 -3
  54. package/build/internal/es/src/stores-v2-inventory-inventory.context.js.map +1 -1
  55. package/build/internal/es/src/stores-v2-inventory-inventory.http.d.ts +9 -9
  56. package/build/internal/es/src/stores-v2-inventory-inventory.http.js +115 -115
  57. package/build/internal/es/src/stores-v2-inventory-inventory.http.js.map +1 -1
  58. package/build/internal/es/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
  59. package/build/internal/es/src/stores-v2-inventory-inventory.meta.js +25 -25
  60. package/build/internal/es/src/stores-v2-inventory-inventory.meta.js.map +1 -1
  61. package/build/internal/es/src/stores-v2-inventory-inventory.public.d.ts +19 -19
  62. package/build/internal/es/src/stores-v2-inventory-inventory.public.js +10 -10
  63. package/build/internal/es/src/stores-v2-inventory-inventory.public.js.map +1 -1
  64. package/build/internal/es/src/stores-v2-inventory-inventory.types.d.ts +224 -126
  65. package/build/internal/es/src/stores-v2-inventory-inventory.types.js.map +1 -1
  66. package/build/internal/es/src/stores-v2-inventory-inventory.universal.d.ts +307 -189
  67. package/build/internal/es/src/stores-v2-inventory-inventory.universal.js +85 -85
  68. package/build/internal/es/src/stores-v2-inventory-inventory.universal.js.map +1 -1
  69. package/package.json +2 -2
@@ -48,11 +48,189 @@ export interface InventoryVariantV2 {
48
48
  export interface PreorderInfo {
49
49
  /** Whether the item is available for preorder. */
50
50
  enabled?: boolean;
51
- /** A message the buyer will see when the item is out of stock and preorder is enabled. */
51
+ /**
52
+ * A message the buyer will see when the item is out of stock and preorder is enabled.
53
+ * @minLength 1
54
+ * @maxLength 250
55
+ */
52
56
  message?: string | null;
53
- /** Number of products that can be preordered after stock reaches zero. */
57
+ /**
58
+ * Number of products that can be preordered after stock reaches zero.
59
+ * @max 100000
60
+ */
54
61
  limit?: number | null;
55
62
  }
63
+ export interface UpdateInventoryVariantsRequest {
64
+ /** Inventory item. */
65
+ inventoryItem: InventoryItemV2;
66
+ }
67
+ export declare enum ReasonType {
68
+ /** Unknown reason. */
69
+ UNKNOWN = "UNKNOWN",
70
+ /** Order related. */
71
+ ORDER = "ORDER",
72
+ /** Manual adjustment. */
73
+ MANUAL = "MANUAL",
74
+ /** Reverting an inventory change. */
75
+ REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
76
+ }
77
+ export interface UpdateInventoryVariantsResponse {
78
+ }
79
+ export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
80
+ /** Change availability. */
81
+ setInStock?: boolean | null;
82
+ /** Set new quantity. */
83
+ setQuantity?: number | null;
84
+ /**
85
+ * Number to increment inventory by.
86
+ * @min 1
87
+ */
88
+ incrementBy?: number | null;
89
+ /**
90
+ * Number to decrement inventory by.
91
+ * @min 1
92
+ */
93
+ decrementBy?: number | null;
94
+ /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
95
+ filter?: Record<string, any> | null;
96
+ }
97
+ /** @oneof */
98
+ export interface BulkUpdateInventoryVariantsRequestActionOneOf {
99
+ /** Change availability. */
100
+ setInStock?: boolean | null;
101
+ /** Set new quantity. */
102
+ setQuantity?: number | null;
103
+ /**
104
+ * Number to increment inventory by.
105
+ * @min 1
106
+ */
107
+ incrementBy?: number | null;
108
+ /**
109
+ * Number to decrement inventory by.
110
+ * @min 1
111
+ */
112
+ decrementBy?: number | null;
113
+ }
114
+ export interface BulkUpdateInventoryVariantsResponse {
115
+ }
116
+ export interface BulkUpdateInventoryItemsRequest {
117
+ /** Variants filter */
118
+ variantsFilter?: Record<string, any> | null;
119
+ /** Whether inventory is being tracked. */
120
+ trackInventory?: boolean | null;
121
+ }
122
+ export interface BulkUpdateInventoryItemsResponse {
123
+ }
124
+ export interface DecrementInventoryRequest {
125
+ /**
126
+ * @minSize 1
127
+ * @maxSize 300
128
+ */
129
+ decrementData?: DecrementData[];
130
+ }
131
+ export interface DecrementData extends DecrementDataIdOneOf {
132
+ /**
133
+ * Inventory item ID.
134
+ * @maxLength 36
135
+ */
136
+ inventoryId?: string;
137
+ /**
138
+ * Deprecated: use productId.
139
+ * @maxLength 36
140
+ * @deprecated Deprecated: use productId.
141
+ * @replacedBy product_id
142
+ * @targetRemovalDate 2024-12-31
143
+ */
144
+ externalId?: string;
145
+ /**
146
+ * Product ID.
147
+ * @maxLength 36
148
+ */
149
+ productId?: string;
150
+ /**
151
+ * Variant ID.
152
+ * @format GUID
153
+ */
154
+ variantId?: string;
155
+ /**
156
+ * Number to decrement inventory by.
157
+ * @min 1
158
+ */
159
+ decrementBy?: number;
160
+ /**
161
+ * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
162
+ * If true and the item is available for preorder, we allow negative inventory.
163
+ * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
164
+ */
165
+ preorderRequest?: boolean;
166
+ }
167
+ /** @oneof */
168
+ export interface DecrementDataIdOneOf {
169
+ /**
170
+ * Inventory item ID.
171
+ * @maxLength 36
172
+ */
173
+ inventoryId?: string;
174
+ /**
175
+ * Deprecated: use productId.
176
+ * @maxLength 36
177
+ * @deprecated Deprecated: use productId.
178
+ * @replacedBy product_id
179
+ * @targetRemovalDate 2024-12-31
180
+ */
181
+ externalId?: string;
182
+ /**
183
+ * Product ID.
184
+ * @maxLength 36
185
+ */
186
+ productId?: string;
187
+ }
188
+ export interface DecrementInventoryResponse {
189
+ }
190
+ export interface IncrementInventoryRequest {
191
+ /**
192
+ * @minSize 1
193
+ * @maxSize 300
194
+ */
195
+ incrementData?: IncrementData[];
196
+ }
197
+ export interface IncrementData extends IncrementDataIdOneOf {
198
+ /**
199
+ * Inventory item ID.
200
+ * @maxLength 36
201
+ */
202
+ inventoryId?: string;
203
+ /**
204
+ * Product ID.
205
+ * @maxLength 36
206
+ */
207
+ productId?: string;
208
+ /**
209
+ * Variant ID.
210
+ * @format GUID
211
+ */
212
+ variantId?: string;
213
+ /**
214
+ * Number to increment inventory by.
215
+ * @min 1
216
+ */
217
+ incrementBy?: number;
218
+ }
219
+ /** @oneof */
220
+ export interface IncrementDataIdOneOf {
221
+ /**
222
+ * Inventory item ID.
223
+ * @maxLength 36
224
+ */
225
+ inventoryId?: string;
226
+ /**
227
+ * Product ID.
228
+ * @maxLength 36
229
+ */
230
+ productId?: string;
231
+ }
232
+ export interface IncrementInventoryResponse {
233
+ }
56
234
  export interface InventoryItemChanged {
57
235
  /** Inventory item ID. */
58
236
  inventoryItemId?: string;
@@ -107,16 +285,6 @@ export interface ChangedInventoryVariantData {
107
285
  /** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
108
286
  availableForPreorder?: boolean;
109
287
  }
110
- export declare enum ReasonType {
111
- /** Unknown reason. */
112
- UNKNOWN = "UNKNOWN",
113
- /** Order related. */
114
- ORDER = "ORDER",
115
- /** Manual adjustment. */
116
- MANUAL = "MANUAL",
117
- /** Reverting an inventory change. */
118
- REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
119
- }
120
288
  export interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
121
289
  /** Inventory item ID. */
122
290
  inventoryId: string;
@@ -169,7 +337,10 @@ export interface Query {
169
337
  sort?: string | null;
170
338
  }
171
339
  export interface Paging {
172
- /** Amount of items to load per page */
340
+ /**
341
+ * Amount of items to load per page
342
+ * @max 100
343
+ */
173
344
  limit?: number | null;
174
345
  /** Number of items to skip in the display (relevant for all pages after the first) */
175
346
  offset?: number | null;
@@ -189,9 +360,15 @@ export interface PagingMetadata {
189
360
  offset?: number;
190
361
  }
191
362
  export interface MessageEnvelope {
192
- /** App instance ID. */
363
+ /**
364
+ * App instance ID.
365
+ * @format GUID
366
+ */
193
367
  instanceId?: string | null;
194
- /** Event type. */
368
+ /**
369
+ * Event type.
370
+ * @maxLength 150
371
+ */
195
372
  eventType?: string;
196
373
  /** The identification type and identity data. */
197
374
  identity?: IdentificationData;
@@ -199,26 +376,50 @@ export interface MessageEnvelope {
199
376
  data?: string;
200
377
  }
201
378
  export interface IdentificationData extends IdentificationDataIdOneOf {
202
- /** ID of a site visitor that has not logged in to the site. */
379
+ /**
380
+ * ID of a site visitor that has not logged in to the site.
381
+ * @format GUID
382
+ */
203
383
  anonymousVisitorId?: string;
204
- /** ID of a site visitor that has logged in to the site. */
384
+ /**
385
+ * ID of a site visitor that has logged in to the site.
386
+ * @format GUID
387
+ */
205
388
  memberId?: string;
206
- /** ID of a Wix user (site owner, contributor, etc.). */
389
+ /**
390
+ * ID of a Wix user (site owner, contributor, etc.).
391
+ * @format GUID
392
+ */
207
393
  wixUserId?: string;
208
- /** ID of an app. */
394
+ /**
395
+ * ID of an app.
396
+ * @format GUID
397
+ */
209
398
  appId?: string;
210
399
  /** @readonly */
211
400
  identityType?: WebhookIdentityType;
212
401
  }
213
402
  /** @oneof */
214
403
  export interface IdentificationDataIdOneOf {
215
- /** ID of a site visitor that has not logged in to the site. */
404
+ /**
405
+ * ID of a site visitor that has not logged in to the site.
406
+ * @format GUID
407
+ */
216
408
  anonymousVisitorId?: string;
217
- /** ID of a site visitor that has logged in to the site. */
409
+ /**
410
+ * ID of a site visitor that has logged in to the site.
411
+ * @format GUID
412
+ */
218
413
  memberId?: string;
219
- /** ID of a Wix user (site owner, contributor, etc.). */
414
+ /**
415
+ * ID of a Wix user (site owner, contributor, etc.).
416
+ * @format GUID
417
+ */
220
418
  wixUserId?: string;
221
- /** ID of an app. */
419
+ /**
420
+ * ID of an app.
421
+ * @format GUID
422
+ */
222
423
  appId?: string;
223
424
  }
224
425
  export declare enum WebhookIdentityType {
@@ -228,109 +429,6 @@ export declare enum WebhookIdentityType {
228
429
  WIX_USER = "WIX_USER",
229
430
  APP = "APP"
230
431
  }
231
- export interface UpdateInventoryVariantsRequest {
232
- /** Inventory item. */
233
- inventoryItem: InventoryItemV2;
234
- }
235
- export interface UpdateInventoryVariantsResponse {
236
- }
237
- export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
238
- /** Change availability. */
239
- setInStock?: boolean | null;
240
- /** Set new quantity. */
241
- setQuantity?: number | null;
242
- /** Number to increment inventory by. */
243
- incrementBy?: number | null;
244
- /** Number to decrement inventory by. */
245
- decrementBy?: number | null;
246
- /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
247
- filter?: Record<string, any> | null;
248
- }
249
- /** @oneof */
250
- export interface BulkUpdateInventoryVariantsRequestActionOneOf {
251
- /** Change availability. */
252
- setInStock?: boolean | null;
253
- /** Set new quantity. */
254
- setQuantity?: number | null;
255
- /** Number to increment inventory by. */
256
- incrementBy?: number | null;
257
- /** Number to decrement inventory by. */
258
- decrementBy?: number | null;
259
- }
260
- export interface BulkUpdateInventoryVariantsResponse {
261
- }
262
- export interface BulkUpdateInventoryItemsRequest {
263
- /** Variants filter */
264
- variantsFilter?: Record<string, any> | null;
265
- /** Whether inventory is being tracked. */
266
- trackInventory?: boolean | null;
267
- }
268
- export interface BulkUpdateInventoryItemsResponse {
269
- }
270
- export interface DecrementInventoryRequest {
271
- decrementData?: DecrementData[];
272
- }
273
- export interface DecrementData extends DecrementDataIdOneOf {
274
- /** Inventory item ID. */
275
- inventoryId?: string;
276
- /**
277
- * Deprecated: use productId.
278
- * @deprecated Deprecated: use productId.
279
- * @replacedBy product_id
280
- * @targetRemovalDate 2024-12-31
281
- */
282
- externalId?: string;
283
- /** Product ID. */
284
- productId?: string;
285
- /** Variant ID. */
286
- variantId?: string;
287
- /** Number to decrement inventory by. */
288
- decrementBy?: number;
289
- /**
290
- * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
291
- * If true and the item is available for preorder, we allow negative inventory.
292
- * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
293
- */
294
- preorderRequest?: boolean;
295
- }
296
- /** @oneof */
297
- export interface DecrementDataIdOneOf {
298
- /** Inventory item ID. */
299
- inventoryId?: string;
300
- /**
301
- * Deprecated: use productId.
302
- * @deprecated Deprecated: use productId.
303
- * @replacedBy product_id
304
- * @targetRemovalDate 2024-12-31
305
- */
306
- externalId?: string;
307
- /** Product ID. */
308
- productId?: string;
309
- }
310
- export interface DecrementInventoryResponse {
311
- }
312
- export interface IncrementInventoryRequest {
313
- incrementData?: IncrementData[];
314
- }
315
- export interface IncrementData extends IncrementDataIdOneOf {
316
- /** Inventory item ID. */
317
- inventoryId?: string;
318
- /** Product ID. */
319
- productId?: string;
320
- /** Variant ID. */
321
- variantId?: string;
322
- /** Number to increment inventory by. */
323
- incrementBy?: number;
324
- }
325
- /** @oneof */
326
- export interface IncrementDataIdOneOf {
327
- /** Inventory item ID. */
328
- inventoryId?: string;
329
- /** Product ID. */
330
- productId?: string;
331
- }
332
- export interface IncrementInventoryResponse {
333
- }
334
432
  interface InventoryVariantV2NonNullableFields {
335
433
  variantId: string;
336
434
  availableForPreorder: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"stores-v2-inventory-inventory.types.js","sourceRoot":"","sources":["../../../../src/stores-v2-inventory-inventory.types.ts"],"names":[],"mappings":"AAoHA,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB,sBAAsB;IACtB,iCAAmB,CAAA;IACnB,qBAAqB;IACrB,6BAAe,CAAA;IACf,yBAAyB;IACzB,+BAAiB,CAAA;IACjB,qCAAqC;IACrC,iEAAmD,CAAA;AACrD,CAAC,EATW,UAAU,KAAV,UAAU,QASrB;AAwHD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
1
+ {"version":3,"file":"stores-v2-inventory-inventory.types.js","sourceRoot":"","sources":["../../../../src/stores-v2-inventory-inventory.types.ts"],"names":[],"mappings":"AAsEA,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB,sBAAsB;IACtB,iCAAmB,CAAA;IACnB,qBAAqB;IACrB,6BAAe,CAAA;IACf,yBAAyB;IACzB,+BAAiB,CAAA;IACjB,qCAAqC;IACrC,iEAAmD,CAAA;AACrD,CAAC,EATW,UAAU,KAAV,UAAU,QASrB;AA0XD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}