@wix/auto_sdk_stores_inventory 1.0.89 → 1.0.90
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/index.d.ts +21 -21
- package/build/cjs/index.js +133 -133
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +197 -197
- package/build/cjs/index.typings.js +116 -116
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +178 -178
- package/build/cjs/meta.js +102 -102
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +21 -21
- package/build/es/index.mjs +133 -133
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +197 -197
- package/build/es/index.typings.mjs +116 -116
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +178 -178
- package/build/es/meta.mjs +102 -102
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +21 -21
- package/build/internal/cjs/index.typings.d.ts +242 -242
- package/build/internal/cjs/meta.d.ts +190 -190
- package/build/internal/es/index.d.mts +21 -21
- package/build/internal/es/index.typings.d.mts +242 -242
- package/build/internal/es/meta.d.mts +190 -190
- package/package.json +2 -2
package/build/es/meta.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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.mjs';
|
|
2
2
|
import '@wix/sdk-types';
|
|
3
3
|
|
|
4
4
|
interface InventoryItemV2 {
|
|
@@ -68,6 +68,179 @@ interface PreorderInfo {
|
|
|
68
68
|
*/
|
|
69
69
|
limit?: number | null;
|
|
70
70
|
}
|
|
71
|
+
interface UpdateInventoryVariantsRequest {
|
|
72
|
+
/** Inventory item. */
|
|
73
|
+
inventoryItem: InventoryItemV2;
|
|
74
|
+
}
|
|
75
|
+
declare enum ReasonType {
|
|
76
|
+
/** Unknown reason. */
|
|
77
|
+
UNKNOWN = "UNKNOWN",
|
|
78
|
+
/** Order related. */
|
|
79
|
+
ORDER = "ORDER",
|
|
80
|
+
/** Manual adjustment. */
|
|
81
|
+
MANUAL = "MANUAL",
|
|
82
|
+
/** Reverting an inventory change. */
|
|
83
|
+
REVERT_INVENTORY_CHANGE = "REVERT_INVENTORY_CHANGE"
|
|
84
|
+
}
|
|
85
|
+
/** @enumType */
|
|
86
|
+
type ReasonTypeWithLiterals = ReasonType | 'UNKNOWN' | 'ORDER' | 'MANUAL' | 'REVERT_INVENTORY_CHANGE';
|
|
87
|
+
interface UpdateInventoryVariantsResponse {
|
|
88
|
+
}
|
|
89
|
+
interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
90
|
+
/** Change availability. */
|
|
91
|
+
setInStock?: boolean | null;
|
|
92
|
+
/** Set new quantity. */
|
|
93
|
+
setQuantity?: number | null;
|
|
94
|
+
/**
|
|
95
|
+
* Number to increment inventory by.
|
|
96
|
+
* @min 1
|
|
97
|
+
*/
|
|
98
|
+
incrementBy?: number | null;
|
|
99
|
+
/**
|
|
100
|
+
* Number to decrement inventory by.
|
|
101
|
+
* @min 1
|
|
102
|
+
*/
|
|
103
|
+
decrementBy?: number | null;
|
|
104
|
+
/** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
105
|
+
filter?: Record<string, any> | null;
|
|
106
|
+
}
|
|
107
|
+
/** @oneof */
|
|
108
|
+
interface BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
109
|
+
/** Change availability. */
|
|
110
|
+
setInStock?: boolean | null;
|
|
111
|
+
/** Set new quantity. */
|
|
112
|
+
setQuantity?: number | null;
|
|
113
|
+
/**
|
|
114
|
+
* Number to increment inventory by.
|
|
115
|
+
* @min 1
|
|
116
|
+
*/
|
|
117
|
+
incrementBy?: number | null;
|
|
118
|
+
/**
|
|
119
|
+
* Number to decrement inventory by.
|
|
120
|
+
* @min 1
|
|
121
|
+
*/
|
|
122
|
+
decrementBy?: number | null;
|
|
123
|
+
}
|
|
124
|
+
interface BulkUpdateInventoryVariantsResponse {
|
|
125
|
+
}
|
|
126
|
+
interface BulkUpdateInventoryItemsRequest {
|
|
127
|
+
/** Variants filter */
|
|
128
|
+
variantsFilter?: Record<string, any> | null;
|
|
129
|
+
/** Whether inventory is being tracked. */
|
|
130
|
+
trackInventory?: boolean | null;
|
|
131
|
+
}
|
|
132
|
+
interface BulkUpdateInventoryItemsResponse {
|
|
133
|
+
}
|
|
134
|
+
interface DecrementInventoryRequest {
|
|
135
|
+
/**
|
|
136
|
+
* @minSize 1
|
|
137
|
+
* @maxSize 300
|
|
138
|
+
*/
|
|
139
|
+
decrementData?: DecrementData[];
|
|
140
|
+
}
|
|
141
|
+
interface DecrementData extends DecrementDataIdOneOf {
|
|
142
|
+
/**
|
|
143
|
+
* Inventory item ID.
|
|
144
|
+
* @maxLength 36
|
|
145
|
+
*/
|
|
146
|
+
inventoryId?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Deprecated: use productId.
|
|
149
|
+
* @maxLength 36
|
|
150
|
+
* @deprecated Deprecated: use productId.
|
|
151
|
+
* @replacedBy product_id
|
|
152
|
+
* @targetRemovalDate 2024-12-31
|
|
153
|
+
*/
|
|
154
|
+
externalId?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Product ID.
|
|
157
|
+
* @maxLength 36
|
|
158
|
+
*/
|
|
159
|
+
productId?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Variant ID.
|
|
162
|
+
* @format GUID
|
|
163
|
+
*/
|
|
164
|
+
variantId?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Number to decrement inventory by.
|
|
167
|
+
* @min 1
|
|
168
|
+
*/
|
|
169
|
+
decrementBy?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
172
|
+
* If true and the item is available for preorder, we allow negative inventory.
|
|
173
|
+
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
174
|
+
*/
|
|
175
|
+
preorderRequest?: boolean;
|
|
176
|
+
}
|
|
177
|
+
/** @oneof */
|
|
178
|
+
interface DecrementDataIdOneOf {
|
|
179
|
+
/**
|
|
180
|
+
* Inventory item ID.
|
|
181
|
+
* @maxLength 36
|
|
182
|
+
*/
|
|
183
|
+
inventoryId?: string;
|
|
184
|
+
/**
|
|
185
|
+
* Deprecated: use productId.
|
|
186
|
+
* @maxLength 36
|
|
187
|
+
* @deprecated Deprecated: use productId.
|
|
188
|
+
* @replacedBy product_id
|
|
189
|
+
* @targetRemovalDate 2024-12-31
|
|
190
|
+
*/
|
|
191
|
+
externalId?: string;
|
|
192
|
+
/**
|
|
193
|
+
* Product ID.
|
|
194
|
+
* @maxLength 36
|
|
195
|
+
*/
|
|
196
|
+
productId?: string;
|
|
197
|
+
}
|
|
198
|
+
interface DecrementInventoryResponse {
|
|
199
|
+
}
|
|
200
|
+
interface IncrementInventoryRequest {
|
|
201
|
+
/**
|
|
202
|
+
* @minSize 1
|
|
203
|
+
* @maxSize 300
|
|
204
|
+
*/
|
|
205
|
+
incrementData?: IncrementData[];
|
|
206
|
+
}
|
|
207
|
+
interface IncrementData extends IncrementDataIdOneOf {
|
|
208
|
+
/**
|
|
209
|
+
* Inventory item ID.
|
|
210
|
+
* @maxLength 36
|
|
211
|
+
*/
|
|
212
|
+
inventoryId?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Product ID.
|
|
215
|
+
* @maxLength 36
|
|
216
|
+
*/
|
|
217
|
+
productId?: string;
|
|
218
|
+
/**
|
|
219
|
+
* Variant ID.
|
|
220
|
+
* @format GUID
|
|
221
|
+
*/
|
|
222
|
+
variantId?: string;
|
|
223
|
+
/**
|
|
224
|
+
* Number to increment inventory by.
|
|
225
|
+
* @min 1
|
|
226
|
+
*/
|
|
227
|
+
incrementBy?: number;
|
|
228
|
+
}
|
|
229
|
+
/** @oneof */
|
|
230
|
+
interface IncrementDataIdOneOf {
|
|
231
|
+
/**
|
|
232
|
+
* Inventory item ID.
|
|
233
|
+
* @maxLength 36
|
|
234
|
+
*/
|
|
235
|
+
inventoryId?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Product ID.
|
|
238
|
+
* @maxLength 36
|
|
239
|
+
*/
|
|
240
|
+
productId?: string;
|
|
241
|
+
}
|
|
242
|
+
interface IncrementInventoryResponse {
|
|
243
|
+
}
|
|
71
244
|
interface InventoryItemChanged {
|
|
72
245
|
/** Inventory item ID. */
|
|
73
246
|
inventoryItemId?: string;
|
|
@@ -122,18 +295,6 @@ interface ChangedInventoryVariantData {
|
|
|
122
295
|
/** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
|
|
123
296
|
availableForPreorder?: boolean;
|
|
124
297
|
}
|
|
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';
|
|
137
298
|
interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
|
|
138
299
|
/** Inventory item ID. */
|
|
139
300
|
inventoryId: string;
|
|
@@ -299,167 +460,6 @@ interface AccountInfo {
|
|
|
299
460
|
*/
|
|
300
461
|
siteId?: string | null;
|
|
301
462
|
}
|
|
302
|
-
interface UpdateInventoryVariantsRequest {
|
|
303
|
-
/** Inventory item. */
|
|
304
|
-
inventoryItem: InventoryItemV2;
|
|
305
|
-
}
|
|
306
|
-
interface UpdateInventoryVariantsResponse {
|
|
307
|
-
}
|
|
308
|
-
interface BulkUpdateInventoryVariantsRequest extends BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
309
|
-
/** Change availability. */
|
|
310
|
-
setInStock?: boolean | null;
|
|
311
|
-
/** Set new quantity. */
|
|
312
|
-
setQuantity?: number | null;
|
|
313
|
-
/**
|
|
314
|
-
* Number to increment inventory by.
|
|
315
|
-
* @min 1
|
|
316
|
-
*/
|
|
317
|
-
incrementBy?: number | null;
|
|
318
|
-
/**
|
|
319
|
-
* Number to decrement inventory by.
|
|
320
|
-
* @min 1
|
|
321
|
-
*/
|
|
322
|
-
decrementBy?: number | null;
|
|
323
|
-
/** Variants filter. Learn more about [API query language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). */
|
|
324
|
-
filter?: Record<string, any> | null;
|
|
325
|
-
}
|
|
326
|
-
/** @oneof */
|
|
327
|
-
interface BulkUpdateInventoryVariantsRequestActionOneOf {
|
|
328
|
-
/** Change availability. */
|
|
329
|
-
setInStock?: boolean | null;
|
|
330
|
-
/** Set new quantity. */
|
|
331
|
-
setQuantity?: number | null;
|
|
332
|
-
/**
|
|
333
|
-
* Number to increment inventory by.
|
|
334
|
-
* @min 1
|
|
335
|
-
*/
|
|
336
|
-
incrementBy?: number | null;
|
|
337
|
-
/**
|
|
338
|
-
* Number to decrement inventory by.
|
|
339
|
-
* @min 1
|
|
340
|
-
*/
|
|
341
|
-
decrementBy?: number | null;
|
|
342
|
-
}
|
|
343
|
-
interface BulkUpdateInventoryVariantsResponse {
|
|
344
|
-
}
|
|
345
|
-
interface BulkUpdateInventoryItemsRequest {
|
|
346
|
-
/** Variants filter */
|
|
347
|
-
variantsFilter?: Record<string, any> | null;
|
|
348
|
-
/** Whether inventory is being tracked. */
|
|
349
|
-
trackInventory?: boolean | null;
|
|
350
|
-
}
|
|
351
|
-
interface BulkUpdateInventoryItemsResponse {
|
|
352
|
-
}
|
|
353
|
-
interface DecrementInventoryRequest {
|
|
354
|
-
/**
|
|
355
|
-
* @minSize 1
|
|
356
|
-
* @maxSize 300
|
|
357
|
-
*/
|
|
358
|
-
decrementData?: DecrementData[];
|
|
359
|
-
}
|
|
360
|
-
interface DecrementData extends DecrementDataIdOneOf {
|
|
361
|
-
/**
|
|
362
|
-
* Inventory item ID.
|
|
363
|
-
* @maxLength 36
|
|
364
|
-
*/
|
|
365
|
-
inventoryId?: string;
|
|
366
|
-
/**
|
|
367
|
-
* Deprecated: use productId.
|
|
368
|
-
* @maxLength 36
|
|
369
|
-
* @deprecated Deprecated: use productId.
|
|
370
|
-
* @replacedBy product_id
|
|
371
|
-
* @targetRemovalDate 2024-12-31
|
|
372
|
-
*/
|
|
373
|
-
externalId?: string;
|
|
374
|
-
/**
|
|
375
|
-
* Product ID.
|
|
376
|
-
* @maxLength 36
|
|
377
|
-
*/
|
|
378
|
-
productId?: string;
|
|
379
|
-
/**
|
|
380
|
-
* Variant ID.
|
|
381
|
-
* @format GUID
|
|
382
|
-
*/
|
|
383
|
-
variantId?: string;
|
|
384
|
-
/**
|
|
385
|
-
* Number to decrement inventory by.
|
|
386
|
-
* @min 1
|
|
387
|
-
*/
|
|
388
|
-
decrementBy?: number;
|
|
389
|
-
/**
|
|
390
|
-
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
391
|
-
* If true and the item is available for preorder, we allow negative inventory.
|
|
392
|
-
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
393
|
-
*/
|
|
394
|
-
preorderRequest?: boolean;
|
|
395
|
-
}
|
|
396
|
-
/** @oneof */
|
|
397
|
-
interface DecrementDataIdOneOf {
|
|
398
|
-
/**
|
|
399
|
-
* Inventory item ID.
|
|
400
|
-
* @maxLength 36
|
|
401
|
-
*/
|
|
402
|
-
inventoryId?: string;
|
|
403
|
-
/**
|
|
404
|
-
* Deprecated: use productId.
|
|
405
|
-
* @maxLength 36
|
|
406
|
-
* @deprecated Deprecated: use productId.
|
|
407
|
-
* @replacedBy product_id
|
|
408
|
-
* @targetRemovalDate 2024-12-31
|
|
409
|
-
*/
|
|
410
|
-
externalId?: string;
|
|
411
|
-
/**
|
|
412
|
-
* Product ID.
|
|
413
|
-
* @maxLength 36
|
|
414
|
-
*/
|
|
415
|
-
productId?: string;
|
|
416
|
-
}
|
|
417
|
-
interface DecrementInventoryResponse {
|
|
418
|
-
}
|
|
419
|
-
interface IncrementInventoryRequest {
|
|
420
|
-
/**
|
|
421
|
-
* @minSize 1
|
|
422
|
-
* @maxSize 300
|
|
423
|
-
*/
|
|
424
|
-
incrementData?: IncrementData[];
|
|
425
|
-
}
|
|
426
|
-
interface IncrementData extends IncrementDataIdOneOf {
|
|
427
|
-
/**
|
|
428
|
-
* Inventory item ID.
|
|
429
|
-
* @maxLength 36
|
|
430
|
-
*/
|
|
431
|
-
inventoryId?: string;
|
|
432
|
-
/**
|
|
433
|
-
* Product ID.
|
|
434
|
-
* @maxLength 36
|
|
435
|
-
*/
|
|
436
|
-
productId?: string;
|
|
437
|
-
/**
|
|
438
|
-
* Variant ID.
|
|
439
|
-
* @format GUID
|
|
440
|
-
*/
|
|
441
|
-
variantId?: string;
|
|
442
|
-
/**
|
|
443
|
-
* Number to increment inventory by.
|
|
444
|
-
* @min 1
|
|
445
|
-
*/
|
|
446
|
-
incrementBy?: number;
|
|
447
|
-
}
|
|
448
|
-
/** @oneof */
|
|
449
|
-
interface IncrementDataIdOneOf {
|
|
450
|
-
/**
|
|
451
|
-
* Inventory item ID.
|
|
452
|
-
* @maxLength 36
|
|
453
|
-
*/
|
|
454
|
-
inventoryId?: string;
|
|
455
|
-
/**
|
|
456
|
-
* Product ID.
|
|
457
|
-
* @maxLength 36
|
|
458
|
-
*/
|
|
459
|
-
productId?: string;
|
|
460
|
-
}
|
|
461
|
-
interface IncrementInventoryResponse {
|
|
462
|
-
}
|
|
463
463
|
|
|
464
464
|
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
465
465
|
getUrl: (context: any) => string;
|
|
@@ -471,14 +471,14 @@ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q
|
|
|
471
471
|
__responseType: Q;
|
|
472
472
|
__originalResponseType: R;
|
|
473
473
|
};
|
|
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
474
|
declare function updateInventoryVariants(): __PublicMethodMetaInfo<'PATCH', {
|
|
479
475
|
inventoryItemProductId: string;
|
|
480
476
|
}, UpdateInventoryVariantsRequest$1, UpdateInventoryVariantsRequest, UpdateInventoryVariantsResponse$1, UpdateInventoryVariantsResponse>;
|
|
481
477
|
declare function decrementInventory(): __PublicMethodMetaInfo<'POST', {}, DecrementInventoryRequest$1, DecrementInventoryRequest, DecrementInventoryResponse$1, DecrementInventoryResponse>;
|
|
482
478
|
declare function incrementInventory(): __PublicMethodMetaInfo<'POST', {}, IncrementInventoryRequest$1, IncrementInventoryRequest, IncrementInventoryResponse$1, IncrementInventoryResponse>;
|
|
479
|
+
declare function getInventoryVariants(): __PublicMethodMetaInfo<'POST', {
|
|
480
|
+
inventoryId: string;
|
|
481
|
+
}, GetInventoryVariantsRequest$1, GetInventoryVariantsRequest, GetInventoryVariantsResponse$1, GetInventoryVariantsResponse>;
|
|
482
|
+
declare function queryInventory(): __PublicMethodMetaInfo<'POST', {}, QueryInventoryRequest$1, QueryInventoryRequest, QueryInventoryResponse$1, QueryInventoryResponse>;
|
|
483
483
|
|
|
484
484
|
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 };
|
package/build/es/meta.mjs
CHANGED
|
@@ -5,6 +5,29 @@ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths
|
|
|
5
5
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
6
6
|
var TRANSFORM_PATHS_0 = [{ path: "inventoryItem.lastUpdated" }];
|
|
7
7
|
var TRANSFORM_PATHS_1 = [{ path: "inventoryItems.lastUpdated" }];
|
|
8
|
+
function resolveWixInventoryApiV1InventoryReadApiUrl(opts) {
|
|
9
|
+
const domainToMappings = {
|
|
10
|
+
"www.wixapis.com": [
|
|
11
|
+
{
|
|
12
|
+
srcPath: "/stores-reader/v2/inventoryItems",
|
|
13
|
+
destPath: "/v2/inventoryItems"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"api._api_base_domain_": [
|
|
17
|
+
{
|
|
18
|
+
srcPath: "/inventory-read-api-proxy",
|
|
19
|
+
destPath: ""
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
_: [
|
|
23
|
+
{
|
|
24
|
+
srcPath: "/stores-reader/v2/inventoryItems",
|
|
25
|
+
destPath: "/v2/inventoryItems"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
};
|
|
29
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
30
|
+
}
|
|
8
31
|
function resolveWixInventoryApiV1InventoryWriteApiUrl(opts) {
|
|
9
32
|
const domainToMappings = {
|
|
10
33
|
_: [
|
|
@@ -88,84 +111,7 @@ function resolveWixInventoryApiV1InventoryWriteApiUrl(opts) {
|
|
|
88
111
|
};
|
|
89
112
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
90
113
|
}
|
|
91
|
-
function resolveWixInventoryApiV1InventoryReadApiUrl(opts) {
|
|
92
|
-
const domainToMappings = {
|
|
93
|
-
"www.wixapis.com": [
|
|
94
|
-
{
|
|
95
|
-
srcPath: "/stores-reader/v2/inventoryItems",
|
|
96
|
-
destPath: "/v2/inventoryItems"
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
"api._api_base_domain_": [
|
|
100
|
-
{
|
|
101
|
-
srcPath: "/inventory-read-api-proxy",
|
|
102
|
-
destPath: ""
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
_: [
|
|
106
|
-
{
|
|
107
|
-
srcPath: "/stores-reader/v2/inventoryItems",
|
|
108
|
-
destPath: "/v2/inventoryItems"
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
};
|
|
112
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
113
|
-
}
|
|
114
114
|
var PACKAGE_NAME = "@wix/auto_sdk_stores_inventory";
|
|
115
|
-
function getInventoryVariants(payload) {
|
|
116
|
-
function __getInventoryVariants({ host }) {
|
|
117
|
-
const metadata = {
|
|
118
|
-
entityFqdn: "wix.stores.v2.inventory",
|
|
119
|
-
method: "POST",
|
|
120
|
-
methodFqn: "wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants",
|
|
121
|
-
packageName: PACKAGE_NAME,
|
|
122
|
-
migrationOptions: {
|
|
123
|
-
optInTransformResponse: true
|
|
124
|
-
},
|
|
125
|
-
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
126
|
-
protoPath: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
127
|
-
data: payload,
|
|
128
|
-
host
|
|
129
|
-
}),
|
|
130
|
-
data: payload,
|
|
131
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
132
|
-
{
|
|
133
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
134
|
-
paths: TRANSFORM_PATHS_0
|
|
135
|
-
}
|
|
136
|
-
])
|
|
137
|
-
};
|
|
138
|
-
return metadata;
|
|
139
|
-
}
|
|
140
|
-
return __getInventoryVariants;
|
|
141
|
-
}
|
|
142
|
-
function queryInventory(payload) {
|
|
143
|
-
function __queryInventory({ host }) {
|
|
144
|
-
const metadata = {
|
|
145
|
-
entityFqdn: "wix.stores.v2.inventory",
|
|
146
|
-
method: "POST",
|
|
147
|
-
methodFqn: "wix.inventory.api.v1.InventoryReadApi.QueryInventory",
|
|
148
|
-
packageName: PACKAGE_NAME,
|
|
149
|
-
migrationOptions: {
|
|
150
|
-
optInTransformResponse: true
|
|
151
|
-
},
|
|
152
|
-
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
153
|
-
protoPath: "/v2/inventoryItems/query",
|
|
154
|
-
data: payload,
|
|
155
|
-
host
|
|
156
|
-
}),
|
|
157
|
-
data: payload,
|
|
158
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
159
|
-
{
|
|
160
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
161
|
-
paths: TRANSFORM_PATHS_1
|
|
162
|
-
}
|
|
163
|
-
])
|
|
164
|
-
};
|
|
165
|
-
return metadata;
|
|
166
|
-
}
|
|
167
|
-
return __queryInventory;
|
|
168
|
-
}
|
|
169
115
|
function updateInventoryVariants(payload) {
|
|
170
116
|
function __updateInventoryVariants({ host }) {
|
|
171
117
|
const serializedData = transformPaths(payload, [
|
|
@@ -235,6 +181,60 @@ function incrementInventory(payload) {
|
|
|
235
181
|
}
|
|
236
182
|
return __incrementInventory;
|
|
237
183
|
}
|
|
184
|
+
function getInventoryVariants(payload) {
|
|
185
|
+
function __getInventoryVariants({ host }) {
|
|
186
|
+
const metadata = {
|
|
187
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
188
|
+
method: "POST",
|
|
189
|
+
methodFqn: "wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants",
|
|
190
|
+
packageName: PACKAGE_NAME,
|
|
191
|
+
migrationOptions: {
|
|
192
|
+
optInTransformResponse: true
|
|
193
|
+
},
|
|
194
|
+
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
195
|
+
protoPath: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
196
|
+
data: payload,
|
|
197
|
+
host
|
|
198
|
+
}),
|
|
199
|
+
data: payload,
|
|
200
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
201
|
+
{
|
|
202
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
203
|
+
paths: TRANSFORM_PATHS_0
|
|
204
|
+
}
|
|
205
|
+
])
|
|
206
|
+
};
|
|
207
|
+
return metadata;
|
|
208
|
+
}
|
|
209
|
+
return __getInventoryVariants;
|
|
210
|
+
}
|
|
211
|
+
function queryInventory(payload) {
|
|
212
|
+
function __queryInventory({ host }) {
|
|
213
|
+
const metadata = {
|
|
214
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
215
|
+
method: "POST",
|
|
216
|
+
methodFqn: "wix.inventory.api.v1.InventoryReadApi.QueryInventory",
|
|
217
|
+
packageName: PACKAGE_NAME,
|
|
218
|
+
migrationOptions: {
|
|
219
|
+
optInTransformResponse: true
|
|
220
|
+
},
|
|
221
|
+
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
222
|
+
protoPath: "/v2/inventoryItems/query",
|
|
223
|
+
data: payload,
|
|
224
|
+
host
|
|
225
|
+
}),
|
|
226
|
+
data: payload,
|
|
227
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
228
|
+
{
|
|
229
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
230
|
+
paths: TRANSFORM_PATHS_1
|
|
231
|
+
}
|
|
232
|
+
])
|
|
233
|
+
};
|
|
234
|
+
return metadata;
|
|
235
|
+
}
|
|
236
|
+
return __queryInventory;
|
|
237
|
+
}
|
|
238
238
|
|
|
239
239
|
// src/stores-v2-inventory-inventory.types.ts
|
|
240
240
|
var ReasonType = /* @__PURE__ */ ((ReasonType2) => {
|
|
@@ -254,27 +254,29 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
254
254
|
})(WebhookIdentityType || {});
|
|
255
255
|
|
|
256
256
|
// src/stores-v2-inventory-inventory.meta.ts
|
|
257
|
-
function
|
|
258
|
-
const payload = {
|
|
259
|
-
|
|
257
|
+
function updateInventoryVariants2() {
|
|
258
|
+
const payload = {
|
|
259
|
+
inventoryItem: { productId: ":inventoryItemProductId" }
|
|
260
|
+
};
|
|
261
|
+
const getRequestOptions = updateInventoryVariants(payload);
|
|
260
262
|
const getUrl = (context) => {
|
|
261
263
|
const { url } = getRequestOptions(context);
|
|
262
264
|
return url;
|
|
263
265
|
};
|
|
264
266
|
return {
|
|
265
267
|
getUrl,
|
|
266
|
-
httpMethod: "
|
|
267
|
-
path: "/v2/inventoryItems/{
|
|
268
|
-
pathParams: {
|
|
268
|
+
httpMethod: "PATCH",
|
|
269
|
+
path: "/v2/inventoryItems/product/{inventoryItem.productId}",
|
|
270
|
+
pathParams: { inventoryItemProductId: "inventoryItemProductId" },
|
|
269
271
|
__requestType: null,
|
|
270
272
|
__originalRequestType: null,
|
|
271
273
|
__responseType: null,
|
|
272
274
|
__originalResponseType: null
|
|
273
275
|
};
|
|
274
276
|
}
|
|
275
|
-
function
|
|
277
|
+
function decrementInventory2() {
|
|
276
278
|
const payload = {};
|
|
277
|
-
const getRequestOptions =
|
|
279
|
+
const getRequestOptions = decrementInventory(payload);
|
|
278
280
|
const getUrl = (context) => {
|
|
279
281
|
const { url } = getRequestOptions(context);
|
|
280
282
|
return url;
|
|
@@ -282,7 +284,7 @@ function queryInventory2() {
|
|
|
282
284
|
return {
|
|
283
285
|
getUrl,
|
|
284
286
|
httpMethod: "POST",
|
|
285
|
-
path: "/v2/inventoryItems/
|
|
287
|
+
path: "/v2/inventoryItems/decrement",
|
|
286
288
|
pathParams: {},
|
|
287
289
|
__requestType: null,
|
|
288
290
|
__originalRequestType: null,
|
|
@@ -290,29 +292,27 @@ function queryInventory2() {
|
|
|
290
292
|
__originalResponseType: null
|
|
291
293
|
};
|
|
292
294
|
}
|
|
293
|
-
function
|
|
294
|
-
const payload = {
|
|
295
|
-
|
|
296
|
-
};
|
|
297
|
-
const getRequestOptions = updateInventoryVariants(payload);
|
|
295
|
+
function incrementInventory2() {
|
|
296
|
+
const payload = {};
|
|
297
|
+
const getRequestOptions = incrementInventory(payload);
|
|
298
298
|
const getUrl = (context) => {
|
|
299
299
|
const { url } = getRequestOptions(context);
|
|
300
300
|
return url;
|
|
301
301
|
};
|
|
302
302
|
return {
|
|
303
303
|
getUrl,
|
|
304
|
-
httpMethod: "
|
|
305
|
-
path: "/v2/inventoryItems/
|
|
306
|
-
pathParams: {
|
|
304
|
+
httpMethod: "POST",
|
|
305
|
+
path: "/v2/inventoryItems/increment",
|
|
306
|
+
pathParams: {},
|
|
307
307
|
__requestType: null,
|
|
308
308
|
__originalRequestType: null,
|
|
309
309
|
__responseType: null,
|
|
310
310
|
__originalResponseType: null
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
const payload = {};
|
|
315
|
-
const getRequestOptions =
|
|
313
|
+
function getInventoryVariants2() {
|
|
314
|
+
const payload = { inventoryId: ":inventoryId" };
|
|
315
|
+
const getRequestOptions = getInventoryVariants(payload);
|
|
316
316
|
const getUrl = (context) => {
|
|
317
317
|
const { url } = getRequestOptions(context);
|
|
318
318
|
return url;
|
|
@@ -320,17 +320,17 @@ function decrementInventory2() {
|
|
|
320
320
|
return {
|
|
321
321
|
getUrl,
|
|
322
322
|
httpMethod: "POST",
|
|
323
|
-
path: "/v2/inventoryItems/
|
|
324
|
-
pathParams: {},
|
|
323
|
+
path: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
324
|
+
pathParams: { inventoryId: "inventoryId" },
|
|
325
325
|
__requestType: null,
|
|
326
326
|
__originalRequestType: null,
|
|
327
327
|
__responseType: null,
|
|
328
328
|
__originalResponseType: null
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function queryInventory2() {
|
|
332
332
|
const payload = {};
|
|
333
|
-
const getRequestOptions =
|
|
333
|
+
const getRequestOptions = queryInventory(payload);
|
|
334
334
|
const getUrl = (context) => {
|
|
335
335
|
const { url } = getRequestOptions(context);
|
|
336
336
|
return url;
|
|
@@ -338,7 +338,7 @@ function incrementInventory2() {
|
|
|
338
338
|
return {
|
|
339
339
|
getUrl,
|
|
340
340
|
httpMethod: "POST",
|
|
341
|
-
path: "/v2/inventoryItems/
|
|
341
|
+
path: "/v2/inventoryItems/query",
|
|
342
342
|
pathParams: {},
|
|
343
343
|
__requestType: null,
|
|
344
344
|
__originalRequestType: null,
|