@wix/auto_sdk_stores_inventory 1.0.0 → 1.0.2
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.
- package/build/cjs/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/cjs/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/cjs/src/stores-v2-inventory-inventory.http.js +118 -118
- package/build/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/cjs/src/stores-v2-inventory-inventory.meta.js +31 -31
- package/build/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.public.d.ts +18 -18
- package/build/cjs/src/stores-v2-inventory-inventory.public.js +13 -13
- package/build/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.universal.d.ts +278 -165
- package/build/cjs/src/stores-v2-inventory-inventory.universal.js +91 -91
- package/build/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/es/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/es/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/es/src/stores-v2-inventory-inventory.http.js +115 -115
- package/build/es/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/es/src/stores-v2-inventory-inventory.meta.js +25 -25
- package/build/es/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.public.d.ts +18 -18
- package/build/es/src/stores-v2-inventory-inventory.public.js +10 -10
- package/build/es/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/es/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.universal.d.ts +278 -165
- package/build/es/src/stores-v2-inventory-inventory.universal.js +85 -85
- package/build/es/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js +118 -118
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js +31 -31
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.d.ts +18 -18
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js +13 -13
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/internal/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.d.ts +311 -189
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js +91 -91
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/internal/es/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/internal/es/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/internal/es/src/stores-v2-inventory-inventory.http.js +115 -115
- package/build/internal/es/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.js +25 -25
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.public.d.ts +18 -18
- package/build/internal/es/src/stores-v2-inventory-inventory.public.js +10 -10
- package/build/internal/es/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/internal/es/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.d.ts +311 -189
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.js +85 -85
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -49,11 +49,193 @@ export interface InventoryVariantV2 {
|
|
|
49
49
|
export interface PreorderInfo {
|
|
50
50
|
/** Whether the item is available for preorder. */
|
|
51
51
|
enabled?: boolean;
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* A message the buyer will see when the item is out of stock and preorder is enabled.
|
|
54
|
+
* @minLength 1
|
|
55
|
+
* @maxLength 250
|
|
56
|
+
*/
|
|
53
57
|
message?: string | null;
|
|
54
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Number of products that can be preordered after stock reaches zero.
|
|
60
|
+
* @max 100000
|
|
61
|
+
*/
|
|
55
62
|
limit?: number | null;
|
|
56
63
|
}
|
|
64
|
+
export interface UpdateInventoryVariantsRequest {
|
|
65
|
+
/** Inventory item. */
|
|
66
|
+
inventoryItem: InventoryItemV2;
|
|
67
|
+
}
|
|
68
|
+
export declare enum ReasonType {
|
|
69
|
+
/** Unknown reason. */
|
|
70
|
+
UNKNOWN = "UNKNOWN",
|
|
71
|
+
/** Order related. */
|
|
72
|
+
ORDER = "ORDER",
|
|
73
|
+
/** Manual adjustment. */
|
|
74
|
+
MANUAL = "MANUAL",
|
|
75
|
+
/** Reverting an inventory change. */
|
|
76
|
+
REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
|
|
77
|
+
}
|
|
78
|
+
export interface UpdateInventoryVariantsResponse {
|
|
79
|
+
}
|
|
80
|
+
export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
81
|
+
/** Change availability. */
|
|
82
|
+
setInStock?: boolean | null;
|
|
83
|
+
/** Set new quantity. */
|
|
84
|
+
setQuantity?: number | null;
|
|
85
|
+
/**
|
|
86
|
+
* Number to increment inventory by.
|
|
87
|
+
* @min 1
|
|
88
|
+
*/
|
|
89
|
+
incrementBy?: number | null;
|
|
90
|
+
/**
|
|
91
|
+
* Number to decrement inventory by.
|
|
92
|
+
* @min 1
|
|
93
|
+
*/
|
|
94
|
+
decrementBy?: number | null;
|
|
95
|
+
/** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
96
|
+
filter?: Record<string, any> | null;
|
|
97
|
+
}
|
|
98
|
+
/** @oneof */
|
|
99
|
+
export interface BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
100
|
+
/** Change availability. */
|
|
101
|
+
setInStock?: boolean | null;
|
|
102
|
+
/** Set new quantity. */
|
|
103
|
+
setQuantity?: number | null;
|
|
104
|
+
/**
|
|
105
|
+
* Number to increment inventory by.
|
|
106
|
+
* @min 1
|
|
107
|
+
*/
|
|
108
|
+
incrementBy?: number | null;
|
|
109
|
+
/**
|
|
110
|
+
* Number to decrement inventory by.
|
|
111
|
+
* @min 1
|
|
112
|
+
*/
|
|
113
|
+
decrementBy?: number | null;
|
|
114
|
+
}
|
|
115
|
+
export interface BulkUpdateInventoryVariantsResponse {
|
|
116
|
+
}
|
|
117
|
+
export interface BulkUpdateInventoryItemsRequest {
|
|
118
|
+
/** Variants filter */
|
|
119
|
+
variantsFilter?: Record<string, any> | null;
|
|
120
|
+
/** Whether inventory is being tracked. */
|
|
121
|
+
trackInventory?: boolean | null;
|
|
122
|
+
}
|
|
123
|
+
export interface BulkUpdateInventoryItemsResponse {
|
|
124
|
+
}
|
|
125
|
+
export interface DecrementInventoryRequest {
|
|
126
|
+
/**
|
|
127
|
+
* Item or product to decrement.
|
|
128
|
+
* @minSize 1
|
|
129
|
+
* @maxSize 300
|
|
130
|
+
*/
|
|
131
|
+
decrementData?: DecrementData[];
|
|
132
|
+
}
|
|
133
|
+
export interface DecrementData extends DecrementDataIdOneOf {
|
|
134
|
+
/**
|
|
135
|
+
* Inventory item ID.
|
|
136
|
+
* @maxLength 36
|
|
137
|
+
*/
|
|
138
|
+
inventoryId?: string;
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
* @internal
|
|
142
|
+
* @maxLength 36
|
|
143
|
+
* @deprecated Deprecated: use productId.
|
|
144
|
+
* @replacedBy product_id
|
|
145
|
+
* @targetRemovalDate 2024-12-31
|
|
146
|
+
*/
|
|
147
|
+
externalId?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Product ID.
|
|
150
|
+
* @maxLength 36
|
|
151
|
+
*/
|
|
152
|
+
productId?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Variant ID.
|
|
155
|
+
* @format GUID
|
|
156
|
+
*/
|
|
157
|
+
variantId?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Number to decrement inventory by.
|
|
160
|
+
* @min 1
|
|
161
|
+
*/
|
|
162
|
+
decrementBy?: number;
|
|
163
|
+
/**
|
|
164
|
+
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
165
|
+
* If true and the item is available for preorder, we allow negative inventory.
|
|
166
|
+
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
167
|
+
*/
|
|
168
|
+
preorderRequest?: boolean;
|
|
169
|
+
}
|
|
170
|
+
/** @oneof */
|
|
171
|
+
export interface DecrementDataIdOneOf {
|
|
172
|
+
/**
|
|
173
|
+
* Inventory item ID.
|
|
174
|
+
* @maxLength 36
|
|
175
|
+
*/
|
|
176
|
+
inventoryId?: string;
|
|
177
|
+
/**
|
|
178
|
+
* @internal
|
|
179
|
+
* @internal
|
|
180
|
+
* @maxLength 36
|
|
181
|
+
* @deprecated Deprecated: use productId.
|
|
182
|
+
* @replacedBy product_id
|
|
183
|
+
* @targetRemovalDate 2024-12-31
|
|
184
|
+
*/
|
|
185
|
+
externalId?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Product ID.
|
|
188
|
+
* @maxLength 36
|
|
189
|
+
*/
|
|
190
|
+
productId?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface DecrementInventoryResponse {
|
|
193
|
+
}
|
|
194
|
+
export interface IncrementInventoryRequest {
|
|
195
|
+
/**
|
|
196
|
+
* Item or product to increment.
|
|
197
|
+
* @minSize 1
|
|
198
|
+
* @maxSize 300
|
|
199
|
+
*/
|
|
200
|
+
incrementData?: IncrementData[];
|
|
201
|
+
}
|
|
202
|
+
export 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
|
+
export 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
|
+
export interface IncrementInventoryResponse {
|
|
238
|
+
}
|
|
57
239
|
export interface InventoryItemChanged {
|
|
58
240
|
/** Inventory item ID. */
|
|
59
241
|
inventoryItemId?: string;
|
|
@@ -110,16 +292,6 @@ export interface ChangedInventoryVariantData {
|
|
|
110
292
|
/** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
|
|
111
293
|
availableForPreorder?: boolean;
|
|
112
294
|
}
|
|
113
|
-
export declare enum ReasonType {
|
|
114
|
-
/** Unknown reason. */
|
|
115
|
-
UNKNOWN = "UNKNOWN",
|
|
116
|
-
/** Order related. */
|
|
117
|
-
ORDER = "ORDER",
|
|
118
|
-
/** Manual adjustment. */
|
|
119
|
-
MANUAL = "MANUAL",
|
|
120
|
-
/** Reverting an inventory change. */
|
|
121
|
-
REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
|
|
122
|
-
}
|
|
123
295
|
export interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
|
|
124
296
|
/** Inventory item ID. */
|
|
125
297
|
inventoryId: string;
|
|
@@ -176,7 +348,10 @@ export interface Query {
|
|
|
176
348
|
sort?: string | null;
|
|
177
349
|
}
|
|
178
350
|
export interface Paging {
|
|
179
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* Amount of items to load per page
|
|
353
|
+
* @max 100
|
|
354
|
+
*/
|
|
180
355
|
limit?: number | null;
|
|
181
356
|
/** Number of items to skip in the display (relevant for all pages after the first) */
|
|
182
357
|
offset?: number | null;
|
|
@@ -196,9 +371,15 @@ export interface PagingMetadata {
|
|
|
196
371
|
offset?: number;
|
|
197
372
|
}
|
|
198
373
|
export interface MessageEnvelope {
|
|
199
|
-
/**
|
|
374
|
+
/**
|
|
375
|
+
* App instance ID.
|
|
376
|
+
* @format GUID
|
|
377
|
+
*/
|
|
200
378
|
instanceId?: string | null;
|
|
201
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Event type.
|
|
381
|
+
* @maxLength 150
|
|
382
|
+
*/
|
|
202
383
|
eventType?: string;
|
|
203
384
|
/** The identification type and identity data. */
|
|
204
385
|
identity?: IdentificationData;
|
|
@@ -206,26 +387,50 @@ export interface MessageEnvelope {
|
|
|
206
387
|
data?: string;
|
|
207
388
|
}
|
|
208
389
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
209
|
-
/**
|
|
390
|
+
/**
|
|
391
|
+
* ID of a site visitor that has not logged in to the site.
|
|
392
|
+
* @format GUID
|
|
393
|
+
*/
|
|
210
394
|
anonymousVisitorId?: string;
|
|
211
|
-
/**
|
|
395
|
+
/**
|
|
396
|
+
* ID of a site visitor that has logged in to the site.
|
|
397
|
+
* @format GUID
|
|
398
|
+
*/
|
|
212
399
|
memberId?: string;
|
|
213
|
-
/**
|
|
400
|
+
/**
|
|
401
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
402
|
+
* @format GUID
|
|
403
|
+
*/
|
|
214
404
|
wixUserId?: string;
|
|
215
|
-
/**
|
|
405
|
+
/**
|
|
406
|
+
* ID of an app.
|
|
407
|
+
* @format GUID
|
|
408
|
+
*/
|
|
216
409
|
appId?: string;
|
|
217
410
|
/** @readonly */
|
|
218
411
|
identityType?: WebhookIdentityType;
|
|
219
412
|
}
|
|
220
413
|
/** @oneof */
|
|
221
414
|
export interface IdentificationDataIdOneOf {
|
|
222
|
-
/**
|
|
415
|
+
/**
|
|
416
|
+
* ID of a site visitor that has not logged in to the site.
|
|
417
|
+
* @format GUID
|
|
418
|
+
*/
|
|
223
419
|
anonymousVisitorId?: string;
|
|
224
|
-
/**
|
|
420
|
+
/**
|
|
421
|
+
* ID of a site visitor that has logged in to the site.
|
|
422
|
+
* @format GUID
|
|
423
|
+
*/
|
|
225
424
|
memberId?: string;
|
|
226
|
-
/**
|
|
425
|
+
/**
|
|
426
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
427
|
+
* @format GUID
|
|
428
|
+
*/
|
|
227
429
|
wixUserId?: string;
|
|
228
|
-
/**
|
|
430
|
+
/**
|
|
431
|
+
* ID of an app.
|
|
432
|
+
* @format GUID
|
|
433
|
+
*/
|
|
229
434
|
appId?: string;
|
|
230
435
|
}
|
|
231
436
|
export declare enum WebhookIdentityType {
|
|
@@ -235,113 +440,6 @@ export declare enum WebhookIdentityType {
|
|
|
235
440
|
WIX_USER = "WIX_USER",
|
|
236
441
|
APP = "APP"
|
|
237
442
|
}
|
|
238
|
-
export interface UpdateInventoryVariantsRequest {
|
|
239
|
-
/** Inventory item. */
|
|
240
|
-
inventoryItem: InventoryItemV2;
|
|
241
|
-
}
|
|
242
|
-
export interface UpdateInventoryVariantsResponse {
|
|
243
|
-
}
|
|
244
|
-
export interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
245
|
-
/** Change availability. */
|
|
246
|
-
setInStock?: boolean | null;
|
|
247
|
-
/** Set new quantity. */
|
|
248
|
-
setQuantity?: number | null;
|
|
249
|
-
/** Number to increment inventory by. */
|
|
250
|
-
incrementBy?: number | null;
|
|
251
|
-
/** Number to decrement inventory by. */
|
|
252
|
-
decrementBy?: number | null;
|
|
253
|
-
/** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
254
|
-
filter?: Record<string, any> | null;
|
|
255
|
-
}
|
|
256
|
-
/** @oneof */
|
|
257
|
-
export interface BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
258
|
-
/** Change availability. */
|
|
259
|
-
setInStock?: boolean | null;
|
|
260
|
-
/** Set new quantity. */
|
|
261
|
-
setQuantity?: number | null;
|
|
262
|
-
/** Number to increment inventory by. */
|
|
263
|
-
incrementBy?: number | null;
|
|
264
|
-
/** Number to decrement inventory by. */
|
|
265
|
-
decrementBy?: number | null;
|
|
266
|
-
}
|
|
267
|
-
export interface BulkUpdateInventoryVariantsResponse {
|
|
268
|
-
}
|
|
269
|
-
export interface BulkUpdateInventoryItemsRequest {
|
|
270
|
-
/** Variants filter */
|
|
271
|
-
variantsFilter?: Record<string, any> | null;
|
|
272
|
-
/** Whether inventory is being tracked. */
|
|
273
|
-
trackInventory?: boolean | null;
|
|
274
|
-
}
|
|
275
|
-
export interface BulkUpdateInventoryItemsResponse {
|
|
276
|
-
}
|
|
277
|
-
export interface DecrementInventoryRequest {
|
|
278
|
-
/** Item or product to decrement. */
|
|
279
|
-
decrementData?: DecrementData[];
|
|
280
|
-
}
|
|
281
|
-
export interface DecrementData extends DecrementDataIdOneOf {
|
|
282
|
-
/** Inventory item ID. */
|
|
283
|
-
inventoryId?: string;
|
|
284
|
-
/**
|
|
285
|
-
* @internal
|
|
286
|
-
* @internal
|
|
287
|
-
* @deprecated Deprecated: use productId.
|
|
288
|
-
* @replacedBy product_id
|
|
289
|
-
* @targetRemovalDate 2024-12-31
|
|
290
|
-
*/
|
|
291
|
-
externalId?: string;
|
|
292
|
-
/** Product ID. */
|
|
293
|
-
productId?: string;
|
|
294
|
-
/** Variant ID. */
|
|
295
|
-
variantId?: string;
|
|
296
|
-
/** Number to decrement inventory by. */
|
|
297
|
-
decrementBy?: number;
|
|
298
|
-
/**
|
|
299
|
-
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
300
|
-
* If true and the item is available for preorder, we allow negative inventory.
|
|
301
|
-
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
302
|
-
*/
|
|
303
|
-
preorderRequest?: boolean;
|
|
304
|
-
}
|
|
305
|
-
/** @oneof */
|
|
306
|
-
export interface DecrementDataIdOneOf {
|
|
307
|
-
/** Inventory item ID. */
|
|
308
|
-
inventoryId?: string;
|
|
309
|
-
/**
|
|
310
|
-
* @internal
|
|
311
|
-
* @internal
|
|
312
|
-
* @deprecated Deprecated: use productId.
|
|
313
|
-
* @replacedBy product_id
|
|
314
|
-
* @targetRemovalDate 2024-12-31
|
|
315
|
-
*/
|
|
316
|
-
externalId?: string;
|
|
317
|
-
/** Product ID. */
|
|
318
|
-
productId?: string;
|
|
319
|
-
}
|
|
320
|
-
export interface DecrementInventoryResponse {
|
|
321
|
-
}
|
|
322
|
-
export interface IncrementInventoryRequest {
|
|
323
|
-
/** Item or product to increment. */
|
|
324
|
-
incrementData?: IncrementData[];
|
|
325
|
-
}
|
|
326
|
-
export interface IncrementData extends IncrementDataIdOneOf {
|
|
327
|
-
/** Inventory item ID. */
|
|
328
|
-
inventoryId?: string;
|
|
329
|
-
/** Product ID. */
|
|
330
|
-
productId?: string;
|
|
331
|
-
/** Variant ID. */
|
|
332
|
-
variantId?: string;
|
|
333
|
-
/** Number to increment inventory by. */
|
|
334
|
-
incrementBy?: number;
|
|
335
|
-
}
|
|
336
|
-
/** @oneof */
|
|
337
|
-
export interface IncrementDataIdOneOf {
|
|
338
|
-
/** Inventory item ID. */
|
|
339
|
-
inventoryId?: string;
|
|
340
|
-
/** Product ID. */
|
|
341
|
-
productId?: string;
|
|
342
|
-
}
|
|
343
|
-
export interface IncrementInventoryResponse {
|
|
344
|
-
}
|
|
345
443
|
interface InventoryVariantV2NonNullableFields {
|
|
346
444
|
variantId: string;
|
|
347
445
|
availableForPreorder: boolean;
|
|
@@ -367,9 +465,15 @@ export interface QueryInventoryResponseNonNullableFields {
|
|
|
367
465
|
totalResults: number;
|
|
368
466
|
}
|
|
369
467
|
export interface BaseEventMetadata {
|
|
370
|
-
/**
|
|
468
|
+
/**
|
|
469
|
+
* App instance ID.
|
|
470
|
+
* @format GUID
|
|
471
|
+
*/
|
|
371
472
|
instanceId?: string | null;
|
|
372
|
-
/**
|
|
473
|
+
/**
|
|
474
|
+
* Event type.
|
|
475
|
+
* @maxLength 150
|
|
476
|
+
*/
|
|
373
477
|
eventType?: string;
|
|
374
478
|
/** The identification type and identity data. */
|
|
375
479
|
identity?: IdentificationData;
|
|
@@ -391,6 +495,8 @@ export interface InventoryItemChangedEnvelope {
|
|
|
391
495
|
* @permissionId WIX_STORES.READ_INVENTORY
|
|
392
496
|
* @webhook
|
|
393
497
|
* @eventType com.wix.ecommerce.inventory.api.v1.InventoryItemChanged
|
|
498
|
+
* @serviceIdentifier wix.inventory.api.v1.InventoryReadApi
|
|
499
|
+
* @slug inventory_item_changed
|
|
394
500
|
*/
|
|
395
501
|
export declare function onInventoryItemChanged(handler: (event: InventoryItemChangedEnvelope) => void | Promise<void>): void;
|
|
396
502
|
export interface InventoryVariantsChangedEnvelope {
|
|
@@ -410,65 +516,10 @@ export interface InventoryVariantsChangedEnvelope {
|
|
|
410
516
|
* @permissionId WIX_STORES.READ_INVENTORY
|
|
411
517
|
* @webhook
|
|
412
518
|
* @eventType com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged
|
|
519
|
+
* @serviceIdentifier wix.inventory.api.v1.InventoryReadApi
|
|
520
|
+
* @slug inventory_variants_changed
|
|
413
521
|
*/
|
|
414
522
|
export declare function onInventoryVariantsChanged(handler: (event: InventoryVariantsChangedEnvelope) => void | Promise<void>): void;
|
|
415
|
-
/**
|
|
416
|
-
* Gets inventory variant information based on the specified option choices.
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
420
|
-
* @param inventoryId - Inventory item ID.
|
|
421
|
-
* @public
|
|
422
|
-
* @requiredField inventoryId
|
|
423
|
-
* @permissionId WIX_STORES.READ_INVENTORY
|
|
424
|
-
* @permissionScope Manage Stores - all permissions
|
|
425
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
426
|
-
* @permissionScope Manage Products
|
|
427
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
428
|
-
* @permissionScope Read Stores - all read permissions
|
|
429
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
430
|
-
* @permissionScope Read Products
|
|
431
|
-
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
432
|
-
* @applicableIdentity APP
|
|
433
|
-
* @applicableIdentity VISITOR
|
|
434
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
435
|
-
*/
|
|
436
|
-
export declare function getInventoryVariants(inventoryId: string, options?: GetInventoryVariantsOptions): Promise<GetInventoryVariantsResponse & GetInventoryVariantsResponseNonNullableFields>;
|
|
437
|
-
export interface GetInventoryVariantsOptions extends GetInventoryVariantsRequestIdOneOf {
|
|
438
|
-
/**
|
|
439
|
-
* @internal
|
|
440
|
-
* @internal
|
|
441
|
-
* @deprecated Deprecated (use productID instead).
|
|
442
|
-
* @replacedBy product_id
|
|
443
|
-
* @targetRemovalDate 2024-12-31
|
|
444
|
-
*/
|
|
445
|
-
externalId?: string;
|
|
446
|
-
/** Product ID. */
|
|
447
|
-
productId?: string;
|
|
448
|
-
/** Variant IDs to query for this inventory item (optional). */
|
|
449
|
-
variantIds?: string[];
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Returns a list of inventory items, given the provided paging, sorting and filtering.
|
|
453
|
-
* @public
|
|
454
|
-
* @permissionId WIX_STORES.READ_INVENTORY
|
|
455
|
-
* @permissionScope Manage Stores - all permissions
|
|
456
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
457
|
-
* @permissionScope Manage Products
|
|
458
|
-
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
459
|
-
* @permissionScope Read Stores - all read permissions
|
|
460
|
-
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
461
|
-
* @permissionScope Read Products
|
|
462
|
-
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
463
|
-
* @applicableIdentity APP
|
|
464
|
-
* @applicableIdentity VISITOR
|
|
465
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
466
|
-
*/
|
|
467
|
-
export declare function queryInventory(options?: QueryInventoryOptions): Promise<QueryInventoryResponse & QueryInventoryResponseNonNullableFields>;
|
|
468
|
-
export interface QueryInventoryOptions {
|
|
469
|
-
/** Information about paging, filters, sorting. */
|
|
470
|
-
query?: Query;
|
|
471
|
-
}
|
|
472
523
|
/**
|
|
473
524
|
* Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
|
|
474
525
|
*
|
|
@@ -560,4 +611,75 @@ export declare function decrementInventory(decrementData: DecrementData[]): Prom
|
|
|
560
611
|
* @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
|
|
561
612
|
*/
|
|
562
613
|
export declare function incrementInventory(incrementData: IncrementData[]): Promise<void>;
|
|
614
|
+
/**
|
|
615
|
+
* Gets inventory variant information based on the specified option choices.
|
|
616
|
+
*
|
|
617
|
+
*
|
|
618
|
+
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
619
|
+
* @param inventoryId - Inventory item ID.
|
|
620
|
+
* @public
|
|
621
|
+
* @requiredField inventoryId
|
|
622
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
623
|
+
* @permissionScope Manage Stores - all permissions
|
|
624
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
625
|
+
* @permissionScope Manage Products
|
|
626
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
627
|
+
* @permissionScope Read Stores - all read permissions
|
|
628
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
629
|
+
* @permissionScope Read Products
|
|
630
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
631
|
+
* @applicableIdentity APP
|
|
632
|
+
* @applicableIdentity VISITOR
|
|
633
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
634
|
+
*/
|
|
635
|
+
export declare function getInventoryVariants(inventoryId: string, options?: GetInventoryVariantsOptions): Promise<GetInventoryVariantsResponse & GetInventoryVariantsResponseNonNullableFields>;
|
|
636
|
+
export interface GetInventoryVariantsOptions extends GetInventoryVariantsOptionsIdOneOf {
|
|
637
|
+
/**
|
|
638
|
+
* @internal
|
|
639
|
+
* @internal
|
|
640
|
+
* @deprecated Deprecated (use productID instead).
|
|
641
|
+
* @replacedBy product_id
|
|
642
|
+
* @targetRemovalDate 2024-12-31
|
|
643
|
+
*/
|
|
644
|
+
externalId?: string;
|
|
645
|
+
/** Product ID. */
|
|
646
|
+
productId?: string;
|
|
647
|
+
/** Variant IDs to query for this inventory item (optional). */
|
|
648
|
+
variantIds?: string[];
|
|
649
|
+
}
|
|
650
|
+
/** @oneof */
|
|
651
|
+
interface GetInventoryVariantsOptionsIdOneOf {
|
|
652
|
+
/** Inventory item ID. */
|
|
653
|
+
inventoryId?: string;
|
|
654
|
+
/**
|
|
655
|
+
* @internal
|
|
656
|
+
* @deprecated Deprecated (use productID instead).
|
|
657
|
+
* @replacedBy product_id
|
|
658
|
+
* @targetRemovalDate 2024-12-31
|
|
659
|
+
*/
|
|
660
|
+
externalId?: string;
|
|
661
|
+
/** Product ID. */
|
|
662
|
+
productId?: string;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Returns a list of inventory items, given the provided paging, sorting and filtering.
|
|
666
|
+
* @public
|
|
667
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
668
|
+
* @permissionScope Manage Stores - all permissions
|
|
669
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
670
|
+
* @permissionScope Manage Products
|
|
671
|
+
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
672
|
+
* @permissionScope Read Stores - all read permissions
|
|
673
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
674
|
+
* @permissionScope Read Products
|
|
675
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
676
|
+
* @applicableIdentity APP
|
|
677
|
+
* @applicableIdentity VISITOR
|
|
678
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
679
|
+
*/
|
|
680
|
+
export declare function queryInventory(options?: QueryInventoryOptions): Promise<QueryInventoryResponse & QueryInventoryResponseNonNullableFields>;
|
|
681
|
+
export interface QueryInventoryOptions {
|
|
682
|
+
/** Information about paging, filters, sorting. */
|
|
683
|
+
query?: Query;
|
|
684
|
+
}
|
|
563
685
|
export {};
|