@wix/auto_sdk_stores_inventory 1.0.72 → 1.0.74

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 (49) hide show
  1. package/build/cjs/index.d.ts +21 -21
  2. package/build/cjs/index.js +171 -171
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +197 -197
  5. package/build/cjs/index.typings.js +154 -154
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +178 -178
  8. package/build/cjs/meta.js +140 -140
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +63 -63
  11. package/build/cjs/schemas.js +100 -100
  12. package/build/cjs/schemas.js.map +1 -1
  13. package/build/es/index.d.mts +21 -21
  14. package/build/es/index.mjs +171 -171
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +197 -197
  17. package/build/es/index.typings.mjs +154 -154
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +178 -178
  20. package/build/es/meta.mjs +140 -140
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +63 -63
  23. package/build/es/schemas.mjs +100 -100
  24. package/build/es/schemas.mjs.map +1 -1
  25. package/build/internal/cjs/index.d.ts +21 -21
  26. package/build/internal/cjs/index.js +171 -171
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +247 -230
  29. package/build/internal/cjs/index.typings.js +154 -154
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +195 -178
  32. package/build/internal/cjs/meta.js +140 -140
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +63 -63
  35. package/build/internal/cjs/schemas.js +100 -100
  36. package/build/internal/cjs/schemas.js.map +1 -1
  37. package/build/internal/es/index.d.mts +21 -21
  38. package/build/internal/es/index.mjs +171 -171
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +247 -230
  41. package/build/internal/es/index.typings.mjs +154 -154
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +195 -178
  44. package/build/internal/es/meta.mjs +140 -140
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +63 -63
  47. package/build/internal/es/schemas.mjs +100 -100
  48. package/build/internal/es/schemas.mjs.map +1 -1
  49. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { UpdateInventoryVariantsRequest as UpdateInventoryVariantsRequest$1, UpdateInventoryVariantsResponse as UpdateInventoryVariantsResponse$1, DecrementInventoryRequest as DecrementInventoryRequest$1, DecrementInventoryResponse as DecrementInventoryResponse$1, IncrementInventoryRequest as IncrementInventoryRequest$1, IncrementInventoryResponse as IncrementInventoryResponse$1, GetInventoryVariantsRequest as GetInventoryVariantsRequest$1, GetInventoryVariantsResponse as GetInventoryVariantsResponse$1, QueryInventoryRequest as QueryInventoryRequest$1, QueryInventoryResponse as QueryInventoryResponse$1 } from './index.typings.js';
1
+ import { GetInventoryVariantsRequest as GetInventoryVariantsRequest$1, GetInventoryVariantsResponse as GetInventoryVariantsResponse$1, QueryInventoryRequest as QueryInventoryRequest$1, QueryInventoryResponse as QueryInventoryResponse$1, UpdateInventoryVariantsRequest as UpdateInventoryVariantsRequest$1, UpdateInventoryVariantsResponse as UpdateInventoryVariantsResponse$1, DecrementInventoryRequest as DecrementInventoryRequest$1, DecrementInventoryResponse as DecrementInventoryResponse$1, IncrementInventoryRequest as IncrementInventoryRequest$1, IncrementInventoryResponse as IncrementInventoryResponse$1 } from './index.typings.js';
2
2
  import '@wix/sdk-types';
3
3
 
4
4
  interface InventoryItemV2 {
@@ -63,179 +63,6 @@ interface PreorderInfo {
63
63
  */
64
64
  limit?: number | null;
65
65
  }
66
- interface UpdateInventoryVariantsRequest {
67
- /** Inventory item. */
68
- inventoryItem: InventoryItemV2;
69
- }
70
- declare enum ReasonType {
71
- /** Unknown reason. */
72
- UNKNOWN = "UNKNOWN",
73
- /** Order related. */
74
- ORDER = "ORDER",
75
- /** Manual adjustment. */
76
- MANUAL = "MANUAL",
77
- /** Reverting an inventory change. */
78
- REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
79
- }
80
- /** @enumType */
81
- type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
82
- interface UpdateInventoryVariantsResponse {
83
- }
84
- interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
85
- /** Change availability. */
86
- setInStock?: boolean | null;
87
- /** Set new quantity. */
88
- setQuantity?: number | null;
89
- /**
90
- * Number to increment inventory by.
91
- * @min 1
92
- */
93
- incrementBy?: number | null;
94
- /**
95
- * Number to decrement inventory by.
96
- * @min 1
97
- */
98
- decrementBy?: number | null;
99
- /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
100
- filter?: Record<string, any> | null;
101
- }
102
- /** @oneof */
103
- interface BulkUpdateInventoryVariantsRequestActionOneOf {
104
- /** Change availability. */
105
- setInStock?: boolean | null;
106
- /** Set new quantity. */
107
- setQuantity?: number | null;
108
- /**
109
- * Number to increment inventory by.
110
- * @min 1
111
- */
112
- incrementBy?: number | null;
113
- /**
114
- * Number to decrement inventory by.
115
- * @min 1
116
- */
117
- decrementBy?: number | null;
118
- }
119
- interface BulkUpdateInventoryVariantsResponse {
120
- }
121
- interface BulkUpdateInventoryItemsRequest {
122
- /** Variants filter */
123
- variantsFilter?: Record<string, any> | null;
124
- /** Whether inventory is being tracked. */
125
- trackInventory?: boolean | null;
126
- }
127
- interface BulkUpdateInventoryItemsResponse {
128
- }
129
- interface DecrementInventoryRequest {
130
- /**
131
- * @minSize 1
132
- * @maxSize 300
133
- */
134
- decrementData?: DecrementData[];
135
- }
136
- interface DecrementData extends DecrementDataIdOneOf {
137
- /**
138
- * Inventory item ID.
139
- * @maxLength 36
140
- */
141
- inventoryId?: string;
142
- /**
143
- * Deprecated: use productId.
144
- * @maxLength 36
145
- * @deprecated Deprecated: use productId.
146
- * @replacedBy product_id
147
- * @targetRemovalDate 2024-12-31
148
- */
149
- externalId?: string;
150
- /**
151
- * Product ID.
152
- * @maxLength 36
153
- */
154
- productId?: string;
155
- /**
156
- * Variant ID.
157
- * @format GUID
158
- */
159
- variantId?: string;
160
- /**
161
- * Number to decrement inventory by.
162
- * @min 1
163
- */
164
- decrementBy?: number;
165
- /**
166
- * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
167
- * If true and the item is available for preorder, we allow negative inventory.
168
- * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
169
- */
170
- preorderRequest?: boolean;
171
- }
172
- /** @oneof */
173
- interface DecrementDataIdOneOf {
174
- /**
175
- * Inventory item ID.
176
- * @maxLength 36
177
- */
178
- inventoryId?: string;
179
- /**
180
- * Deprecated: use productId.
181
- * @maxLength 36
182
- * @deprecated Deprecated: use productId.
183
- * @replacedBy product_id
184
- * @targetRemovalDate 2024-12-31
185
- */
186
- externalId?: string;
187
- /**
188
- * Product ID.
189
- * @maxLength 36
190
- */
191
- productId?: string;
192
- }
193
- interface DecrementInventoryResponse {
194
- }
195
- interface IncrementInventoryRequest {
196
- /**
197
- * @minSize 1
198
- * @maxSize 300
199
- */
200
- incrementData?: IncrementData[];
201
- }
202
- interface IncrementData extends IncrementDataIdOneOf {
203
- /**
204
- * Inventory item ID.
205
- * @maxLength 36
206
- */
207
- inventoryId?: string;
208
- /**
209
- * Product ID.
210
- * @maxLength 36
211
- */
212
- productId?: string;
213
- /**
214
- * Variant ID.
215
- * @format GUID
216
- */
217
- variantId?: string;
218
- /**
219
- * Number to increment inventory by.
220
- * @min 1
221
- */
222
- incrementBy?: number;
223
- }
224
- /** @oneof */
225
- interface IncrementDataIdOneOf {
226
- /**
227
- * Inventory item ID.
228
- * @maxLength 36
229
- */
230
- inventoryId?: string;
231
- /**
232
- * Product ID.
233
- * @maxLength 36
234
- */
235
- productId?: string;
236
- }
237
- interface IncrementInventoryResponse {
238
- }
239
66
  interface InventoryItemChanged {
240
67
  /** Inventory item ID. */
241
68
  inventoryItemId?: string;
@@ -271,6 +98,11 @@ interface InventoryVariantsChanged {
271
98
  productId?: string;
272
99
  /** Information about changed variants. */
273
100
  variants?: ChangedInventoryVariant[];
101
+ /**
102
+ * Reason data
103
+ * @internal
104
+ */
105
+ reason?: ReasonTypeWithLiterals;
274
106
  /** Date and time the inventory variant item was last updated. */
275
107
  updatedDate?: Date | null;
276
108
  }
@@ -290,6 +122,18 @@ interface ChangedInventoryVariantData {
290
122
  /** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
291
123
  availableForPreorder?: boolean;
292
124
  }
125
+ declare enum ReasonType {
126
+ /** Unknown reason. */
127
+ UNKNOWN = "UNKNOWN",
128
+ /** Order related. */
129
+ ORDER = "ORDER",
130
+ /** Manual adjustment. */
131
+ MANUAL = "MANUAL",
132
+ /** Reverting an inventory change. */
133
+ REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
134
+ }
135
+ /** @enumType */
136
+ type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
293
137
  interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
294
138
  /** Inventory item ID. */
295
139
  inventoryId: string;
@@ -455,6 +299,179 @@ interface AccountInfo {
455
299
  */
456
300
  siteId?: string | null;
457
301
  }
302
+ interface UpdateInventoryVariantsRequest {
303
+ /** Inventory item. */
304
+ inventoryItem: InventoryItemV2;
305
+ /** @internal */
306
+ reason?: ReasonTypeWithLiterals;
307
+ }
308
+ interface UpdateInventoryVariantsResponse {
309
+ }
310
+ interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
311
+ /** Change availability. */
312
+ setInStock?: boolean | null;
313
+ /** Set new quantity. */
314
+ setQuantity?: number | null;
315
+ /**
316
+ * Number to increment inventory by.
317
+ * @min 1
318
+ */
319
+ incrementBy?: number | null;
320
+ /**
321
+ * Number to decrement inventory by.
322
+ * @min 1
323
+ */
324
+ decrementBy?: number | null;
325
+ /** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
326
+ filter?: Record<string, any> | null;
327
+ /** @internal */
328
+ reason?: ReasonTypeWithLiterals;
329
+ /** @internal */
330
+ changeTrackingMethod?: boolean;
331
+ }
332
+ /** @oneof */
333
+ interface BulkUpdateInventoryVariantsRequestActionOneOf {
334
+ /** Change availability. */
335
+ setInStock?: boolean | null;
336
+ /** Set new quantity. */
337
+ setQuantity?: number | null;
338
+ /**
339
+ * Number to increment inventory by.
340
+ * @min 1
341
+ */
342
+ incrementBy?: number | null;
343
+ /**
344
+ * Number to decrement inventory by.
345
+ * @min 1
346
+ */
347
+ decrementBy?: number | null;
348
+ }
349
+ interface BulkUpdateInventoryVariantsResponse {
350
+ }
351
+ interface BulkUpdateInventoryItemsRequest {
352
+ /** Variants filter */
353
+ variantsFilter?: Record<string, any> | null;
354
+ /** Whether inventory is being tracked. */
355
+ trackInventory?: boolean | null;
356
+ }
357
+ interface BulkUpdateInventoryItemsResponse {
358
+ }
359
+ interface DecrementInventoryRequest {
360
+ /**
361
+ * @minSize 1
362
+ * @maxSize 300
363
+ */
364
+ decrementData?: DecrementData[];
365
+ /** @internal */
366
+ reason?: ReasonTypeWithLiterals;
367
+ /** @internal */
368
+ restrictInventoryValue?: boolean;
369
+ }
370
+ interface DecrementData extends DecrementDataIdOneOf {
371
+ /**
372
+ * Inventory item ID.
373
+ * @maxLength 36
374
+ */
375
+ inventoryId?: string;
376
+ /**
377
+ * Deprecated: use productId.
378
+ * @maxLength 36
379
+ * @deprecated Deprecated: use productId.
380
+ * @replacedBy product_id
381
+ * @targetRemovalDate 2024-12-31
382
+ */
383
+ externalId?: string;
384
+ /**
385
+ * Product ID.
386
+ * @maxLength 36
387
+ */
388
+ productId?: string;
389
+ /**
390
+ * Variant ID.
391
+ * @format GUID
392
+ */
393
+ variantId?: string;
394
+ /**
395
+ * Number to decrement inventory by.
396
+ * @min 1
397
+ */
398
+ decrementBy?: number;
399
+ /**
400
+ * Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
401
+ * If true and the item is available for preorder, we allow negative inventory.
402
+ * If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
403
+ */
404
+ preorderRequest?: boolean;
405
+ }
406
+ /** @oneof */
407
+ interface DecrementDataIdOneOf {
408
+ /**
409
+ * Inventory item ID.
410
+ * @maxLength 36
411
+ */
412
+ inventoryId?: string;
413
+ /**
414
+ * Deprecated: use productId.
415
+ * @maxLength 36
416
+ * @deprecated Deprecated: use productId.
417
+ * @replacedBy product_id
418
+ * @targetRemovalDate 2024-12-31
419
+ */
420
+ externalId?: string;
421
+ /**
422
+ * Product ID.
423
+ * @maxLength 36
424
+ */
425
+ productId?: string;
426
+ }
427
+ interface DecrementInventoryResponse {
428
+ }
429
+ interface IncrementInventoryRequest {
430
+ /**
431
+ * @minSize 1
432
+ * @maxSize 300
433
+ */
434
+ incrementData?: IncrementData[];
435
+ /** @internal */
436
+ reason?: ReasonTypeWithLiterals;
437
+ }
438
+ interface IncrementData extends IncrementDataIdOneOf {
439
+ /**
440
+ * Inventory item ID.
441
+ * @maxLength 36
442
+ */
443
+ inventoryId?: string;
444
+ /**
445
+ * Product ID.
446
+ * @maxLength 36
447
+ */
448
+ productId?: string;
449
+ /**
450
+ * Variant ID.
451
+ * @format GUID
452
+ */
453
+ variantId?: string;
454
+ /**
455
+ * Number to increment inventory by.
456
+ * @min 1
457
+ */
458
+ incrementBy?: number;
459
+ }
460
+ /** @oneof */
461
+ interface IncrementDataIdOneOf {
462
+ /**
463
+ * Inventory item ID.
464
+ * @maxLength 36
465
+ */
466
+ inventoryId?: string;
467
+ /**
468
+ * Product ID.
469
+ * @maxLength 36
470
+ */
471
+ productId?: string;
472
+ }
473
+ interface IncrementInventoryResponse {
474
+ }
458
475
 
459
476
  type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
460
477
  getUrl: (context: any) => string;
@@ -466,14 +483,14 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
466
483
  __responseType: Q;
467
484
  __originalResponseType: R;
468
485
  };
486
+ declare function getInventoryVariants(): __PublicMethodMetaInfo<'POST', {
487
+ inventoryId: string;
488
+ }, GetInventoryVariantsRequest$1, GetInventoryVariantsRequest, GetInventoryVariantsResponse$1, GetInventoryVariantsResponse>;
489
+ declare function queryInventory(): __PublicMethodMetaInfo<'POST', {}, QueryInventoryRequest$1, QueryInventoryRequest, QueryInventoryResponse$1, QueryInventoryResponse>;
469
490
  declare function updateInventoryVariants(): __PublicMethodMetaInfo<'PATCH', {
470
491
  inventoryItemProductId: string;
471
492
  }, UpdateInventoryVariantsRequest$1, UpdateInventoryVariantsRequest, UpdateInventoryVariantsResponse$1, UpdateInventoryVariantsResponse>;
472
493
  declare function decrementInventory(): __PublicMethodMetaInfo<'POST', {}, DecrementInventoryRequest$1, DecrementInventoryRequest, DecrementInventoryResponse$1, DecrementInventoryResponse>;
473
494
  declare function incrementInventory(): __PublicMethodMetaInfo<'POST', {}, IncrementInventoryRequest$1, IncrementInventoryRequest, IncrementInventoryResponse$1, IncrementInventoryResponse>;
474
- declare function getInventoryVariants(): __PublicMethodMetaInfo<'POST', {
475
- inventoryId: string;
476
- }, GetInventoryVariantsRequest$1, GetInventoryVariantsRequest, GetInventoryVariantsResponse$1, GetInventoryVariantsResponse>;
477
- declare function queryInventory(): __PublicMethodMetaInfo<'POST', {}, QueryInventoryRequest$1, QueryInventoryRequest, QueryInventoryResponse$1, QueryInventoryResponse>;
478
495
 
479
496
  export { type AccountInfo as AccountInfoOriginal, type BulkUpdateInventoryItemsRequest as BulkUpdateInventoryItemsRequestOriginal, type BulkUpdateInventoryItemsResponse as BulkUpdateInventoryItemsResponseOriginal, type BulkUpdateInventoryVariantsRequestActionOneOf as BulkUpdateInventoryVariantsRequestActionOneOfOriginal, type BulkUpdateInventoryVariantsRequest as BulkUpdateInventoryVariantsRequestOriginal, type BulkUpdateInventoryVariantsResponse as BulkUpdateInventoryVariantsResponseOriginal, type ChangedInventoryVariantData as ChangedInventoryVariantDataOriginal, type ChangedInventoryVariant as ChangedInventoryVariantOriginal, type DecrementDataIdOneOf as DecrementDataIdOneOfOriginal, type DecrementData as DecrementDataOriginal, type DecrementInventoryRequest as DecrementInventoryRequestOriginal, type DecrementInventoryResponse as DecrementInventoryResponseOriginal, type GetInventoryItemsRequest as GetInventoryItemsRequestOriginal, type GetInventoryItemsResponse as GetInventoryItemsResponseOriginal, type GetInventoryVariantsRequestIdOneOf as GetInventoryVariantsRequestIdOneOfOriginal, type GetInventoryVariantsRequest as GetInventoryVariantsRequestOriginal, type GetInventoryVariantsResponse as GetInventoryVariantsResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type IncrementDataIdOneOf as IncrementDataIdOneOfOriginal, type IncrementData as IncrementDataOriginal, type IncrementInventoryRequest as IncrementInventoryRequestOriginal, type IncrementInventoryResponse as IncrementInventoryResponseOriginal, type InventoryItemChanged as InventoryItemChangedOriginal, type InventoryItemV2 as InventoryItemV2Original, type InventoryVariantV2 as InventoryVariantV2Original, type InventoryVariantsChanged as InventoryVariantsChangedOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PagingMetadata as PagingMetadataOriginal, type Paging as PagingOriginal, type PreorderInfo as PreorderInfoOriginal, type QueryInventoryRequest as QueryInventoryRequestOriginal, type QueryInventoryResponse as QueryInventoryResponseOriginal, type Query as QueryOriginal, ReasonType as ReasonTypeOriginal, type ReasonTypeWithLiterals as ReasonTypeWithLiteralsOriginal, type UpdateInventoryVariantsRequest as UpdateInventoryVariantsRequestOriginal, type UpdateInventoryVariantsResponse as UpdateInventoryVariantsResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, decrementInventory, getInventoryVariants, incrementInventory, queryInventory, updateInventoryVariants };