@wix/auto_sdk_stores_inventory 1.0.84 → 1.0.86
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 +127 -121
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +197 -197
- package/build/cjs/index.typings.js +110 -104
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +178 -178
- package/build/cjs/meta.js +96 -90
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +21 -21
- package/build/es/index.mjs +127 -121
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +197 -197
- package/build/es/index.typings.mjs +110 -104
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +178 -178
- package/build/es/meta.mjs +96 -90
- 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 { 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.mjs';
|
|
2
2
|
import '@wix/sdk-types';
|
|
3
3
|
|
|
4
4
|
interface InventoryItemV2 {
|
|
@@ -68,179 +68,6 @@ 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
|
-
}
|
|
244
71
|
interface InventoryItemChanged {
|
|
245
72
|
/** Inventory item ID. */
|
|
246
73
|
inventoryItemId?: string;
|
|
@@ -295,6 +122,18 @@ interface ChangedInventoryVariantData {
|
|
|
295
122
|
/** Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level. */
|
|
296
123
|
availableForPreorder?: boolean;
|
|
297
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';
|
|
298
137
|
interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
|
|
299
138
|
/** Inventory item ID. */
|
|
300
139
|
inventoryId: string;
|
|
@@ -460,6 +299,167 @@ interface AccountInfo {
|
|
|
460
299
|
*/
|
|
461
300
|
siteId?: string | null;
|
|
462
301
|
}
|
|
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>;
|
|
474
478
|
declare function updateInventoryVariants(): __PublicMethodMetaInfo<'PATCH', {
|
|
475
479
|
inventoryItemProductId: string;
|
|
476
480
|
}, UpdateInventoryVariantsRequest$1, UpdateInventoryVariantsRequest, UpdateInventoryVariantsResponse$1, UpdateInventoryVariantsResponse>;
|
|
477
481
|
declare function decrementInventory(): __PublicMethodMetaInfo<'POST', {}, DecrementInventoryRequest$1, DecrementInventoryRequest, DecrementInventoryResponse$1, DecrementInventoryResponse>;
|
|
478
482
|
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,17 +5,6 @@ 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
|
-
"api._api_base_domain_": [
|
|
11
|
-
{
|
|
12
|
-
srcPath: "/inventory-read-api-proxy",
|
|
13
|
-
destPath: ""
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
};
|
|
17
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
18
|
-
}
|
|
19
8
|
function resolveWixInventoryApiV1InventoryWriteApiUrl(opts) {
|
|
20
9
|
const domainToMappings = {
|
|
21
10
|
_: [
|
|
@@ -95,7 +84,78 @@ function resolveWixInventoryApiV1InventoryWriteApiUrl(opts) {
|
|
|
95
84
|
};
|
|
96
85
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
97
86
|
}
|
|
87
|
+
function resolveWixInventoryApiV1InventoryReadApiUrl(opts) {
|
|
88
|
+
const domainToMappings = {
|
|
89
|
+
"api._api_base_domain_": [
|
|
90
|
+
{
|
|
91
|
+
srcPath: "/inventory-read-api-proxy",
|
|
92
|
+
destPath: ""
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
_: [
|
|
96
|
+
{
|
|
97
|
+
srcPath: "/stores-reader/v2/inventoryItems",
|
|
98
|
+
destPath: "/v2/inventoryItems"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
};
|
|
102
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
103
|
+
}
|
|
98
104
|
var PACKAGE_NAME = "@wix/auto_sdk_stores_inventory";
|
|
105
|
+
function getInventoryVariants(payload) {
|
|
106
|
+
function __getInventoryVariants({ host }) {
|
|
107
|
+
const metadata = {
|
|
108
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
109
|
+
method: "POST",
|
|
110
|
+
methodFqn: "wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants",
|
|
111
|
+
packageName: PACKAGE_NAME,
|
|
112
|
+
migrationOptions: {
|
|
113
|
+
optInTransformResponse: true
|
|
114
|
+
},
|
|
115
|
+
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
116
|
+
protoPath: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
117
|
+
data: payload,
|
|
118
|
+
host
|
|
119
|
+
}),
|
|
120
|
+
data: payload,
|
|
121
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
122
|
+
{
|
|
123
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
124
|
+
paths: TRANSFORM_PATHS_0
|
|
125
|
+
}
|
|
126
|
+
])
|
|
127
|
+
};
|
|
128
|
+
return metadata;
|
|
129
|
+
}
|
|
130
|
+
return __getInventoryVariants;
|
|
131
|
+
}
|
|
132
|
+
function queryInventory(payload) {
|
|
133
|
+
function __queryInventory({ host }) {
|
|
134
|
+
const metadata = {
|
|
135
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
136
|
+
method: "POST",
|
|
137
|
+
methodFqn: "wix.inventory.api.v1.InventoryReadApi.QueryInventory",
|
|
138
|
+
packageName: PACKAGE_NAME,
|
|
139
|
+
migrationOptions: {
|
|
140
|
+
optInTransformResponse: true
|
|
141
|
+
},
|
|
142
|
+
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
143
|
+
protoPath: "/v2/inventoryItems/query",
|
|
144
|
+
data: payload,
|
|
145
|
+
host
|
|
146
|
+
}),
|
|
147
|
+
data: payload,
|
|
148
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
149
|
+
{
|
|
150
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
151
|
+
paths: TRANSFORM_PATHS_1
|
|
152
|
+
}
|
|
153
|
+
])
|
|
154
|
+
};
|
|
155
|
+
return metadata;
|
|
156
|
+
}
|
|
157
|
+
return __queryInventory;
|
|
158
|
+
}
|
|
99
159
|
function updateInventoryVariants(payload) {
|
|
100
160
|
function __updateInventoryVariants({ host }) {
|
|
101
161
|
const serializedData = transformPaths(payload, [
|
|
@@ -165,60 +225,6 @@ function incrementInventory(payload) {
|
|
|
165
225
|
}
|
|
166
226
|
return __incrementInventory;
|
|
167
227
|
}
|
|
168
|
-
function getInventoryVariants(payload) {
|
|
169
|
-
function __getInventoryVariants({ host }) {
|
|
170
|
-
const metadata = {
|
|
171
|
-
entityFqdn: "wix.stores.v2.inventory",
|
|
172
|
-
method: "POST",
|
|
173
|
-
methodFqn: "wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants",
|
|
174
|
-
packageName: PACKAGE_NAME,
|
|
175
|
-
migrationOptions: {
|
|
176
|
-
optInTransformResponse: true
|
|
177
|
-
},
|
|
178
|
-
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
179
|
-
protoPath: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
180
|
-
data: payload,
|
|
181
|
-
host
|
|
182
|
-
}),
|
|
183
|
-
data: payload,
|
|
184
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
185
|
-
{
|
|
186
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
187
|
-
paths: TRANSFORM_PATHS_0
|
|
188
|
-
}
|
|
189
|
-
])
|
|
190
|
-
};
|
|
191
|
-
return metadata;
|
|
192
|
-
}
|
|
193
|
-
return __getInventoryVariants;
|
|
194
|
-
}
|
|
195
|
-
function queryInventory(payload) {
|
|
196
|
-
function __queryInventory({ host }) {
|
|
197
|
-
const metadata = {
|
|
198
|
-
entityFqdn: "wix.stores.v2.inventory",
|
|
199
|
-
method: "POST",
|
|
200
|
-
methodFqn: "wix.inventory.api.v1.InventoryReadApi.QueryInventory",
|
|
201
|
-
packageName: PACKAGE_NAME,
|
|
202
|
-
migrationOptions: {
|
|
203
|
-
optInTransformResponse: true
|
|
204
|
-
},
|
|
205
|
-
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
206
|
-
protoPath: "/v2/inventoryItems/query",
|
|
207
|
-
data: payload,
|
|
208
|
-
host
|
|
209
|
-
}),
|
|
210
|
-
data: payload,
|
|
211
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
212
|
-
{
|
|
213
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
214
|
-
paths: TRANSFORM_PATHS_1
|
|
215
|
-
}
|
|
216
|
-
])
|
|
217
|
-
};
|
|
218
|
-
return metadata;
|
|
219
|
-
}
|
|
220
|
-
return __queryInventory;
|
|
221
|
-
}
|
|
222
228
|
|
|
223
229
|
// src/stores-v2-inventory-inventory.types.ts
|
|
224
230
|
var ReasonType = /* @__PURE__ */ ((ReasonType2) => {
|
|
@@ -238,29 +244,27 @@ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
|
238
244
|
})(WebhookIdentityType || {});
|
|
239
245
|
|
|
240
246
|
// src/stores-v2-inventory-inventory.meta.ts
|
|
241
|
-
function
|
|
242
|
-
const payload = {
|
|
243
|
-
|
|
244
|
-
};
|
|
245
|
-
const getRequestOptions = updateInventoryVariants(payload);
|
|
247
|
+
function getInventoryVariants2() {
|
|
248
|
+
const payload = { inventoryId: ":inventoryId" };
|
|
249
|
+
const getRequestOptions = getInventoryVariants(payload);
|
|
246
250
|
const getUrl = (context) => {
|
|
247
251
|
const { url } = getRequestOptions(context);
|
|
248
252
|
return url;
|
|
249
253
|
};
|
|
250
254
|
return {
|
|
251
255
|
getUrl,
|
|
252
|
-
httpMethod: "
|
|
253
|
-
path: "/v2/inventoryItems/
|
|
254
|
-
pathParams: {
|
|
256
|
+
httpMethod: "POST",
|
|
257
|
+
path: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
258
|
+
pathParams: { inventoryId: "inventoryId" },
|
|
255
259
|
__requestType: null,
|
|
256
260
|
__originalRequestType: null,
|
|
257
261
|
__responseType: null,
|
|
258
262
|
__originalResponseType: null
|
|
259
263
|
};
|
|
260
264
|
}
|
|
261
|
-
function
|
|
265
|
+
function queryInventory2() {
|
|
262
266
|
const payload = {};
|
|
263
|
-
const getRequestOptions =
|
|
267
|
+
const getRequestOptions = queryInventory(payload);
|
|
264
268
|
const getUrl = (context) => {
|
|
265
269
|
const { url } = getRequestOptions(context);
|
|
266
270
|
return url;
|
|
@@ -268,7 +272,7 @@ function decrementInventory2() {
|
|
|
268
272
|
return {
|
|
269
273
|
getUrl,
|
|
270
274
|
httpMethod: "POST",
|
|
271
|
-
path: "/v2/inventoryItems/
|
|
275
|
+
path: "/v2/inventoryItems/query",
|
|
272
276
|
pathParams: {},
|
|
273
277
|
__requestType: null,
|
|
274
278
|
__originalRequestType: null,
|
|
@@ -276,27 +280,29 @@ function decrementInventory2() {
|
|
|
276
280
|
__originalResponseType: null
|
|
277
281
|
};
|
|
278
282
|
}
|
|
279
|
-
function
|
|
280
|
-
const payload = {
|
|
281
|
-
|
|
283
|
+
function updateInventoryVariants2() {
|
|
284
|
+
const payload = {
|
|
285
|
+
inventoryItem: { productId: ":inventoryItemProductId" }
|
|
286
|
+
};
|
|
287
|
+
const getRequestOptions = updateInventoryVariants(payload);
|
|
282
288
|
const getUrl = (context) => {
|
|
283
289
|
const { url } = getRequestOptions(context);
|
|
284
290
|
return url;
|
|
285
291
|
};
|
|
286
292
|
return {
|
|
287
293
|
getUrl,
|
|
288
|
-
httpMethod: "
|
|
289
|
-
path: "/v2/inventoryItems/
|
|
290
|
-
pathParams: {},
|
|
294
|
+
httpMethod: "PATCH",
|
|
295
|
+
path: "/v2/inventoryItems/product/{inventoryItem.productId}",
|
|
296
|
+
pathParams: { inventoryItemProductId: "inventoryItemProductId" },
|
|
291
297
|
__requestType: null,
|
|
292
298
|
__originalRequestType: null,
|
|
293
299
|
__responseType: null,
|
|
294
300
|
__originalResponseType: null
|
|
295
301
|
};
|
|
296
302
|
}
|
|
297
|
-
function
|
|
298
|
-
const payload = {
|
|
299
|
-
const getRequestOptions =
|
|
303
|
+
function decrementInventory2() {
|
|
304
|
+
const payload = {};
|
|
305
|
+
const getRequestOptions = decrementInventory(payload);
|
|
300
306
|
const getUrl = (context) => {
|
|
301
307
|
const { url } = getRequestOptions(context);
|
|
302
308
|
return url;
|
|
@@ -304,17 +310,17 @@ function getInventoryVariants2() {
|
|
|
304
310
|
return {
|
|
305
311
|
getUrl,
|
|
306
312
|
httpMethod: "POST",
|
|
307
|
-
path: "/v2/inventoryItems/
|
|
308
|
-
pathParams: {
|
|
313
|
+
path: "/v2/inventoryItems/decrement",
|
|
314
|
+
pathParams: {},
|
|
309
315
|
__requestType: null,
|
|
310
316
|
__originalRequestType: null,
|
|
311
317
|
__responseType: null,
|
|
312
318
|
__originalResponseType: null
|
|
313
319
|
};
|
|
314
320
|
}
|
|
315
|
-
function
|
|
321
|
+
function incrementInventory2() {
|
|
316
322
|
const payload = {};
|
|
317
|
-
const getRequestOptions =
|
|
323
|
+
const getRequestOptions = incrementInventory(payload);
|
|
318
324
|
const getUrl = (context) => {
|
|
319
325
|
const { url } = getRequestOptions(context);
|
|
320
326
|
return url;
|
|
@@ -322,7 +328,7 @@ function queryInventory2() {
|
|
|
322
328
|
return {
|
|
323
329
|
getUrl,
|
|
324
330
|
httpMethod: "POST",
|
|
325
|
-
path: "/v2/inventoryItems/
|
|
331
|
+
path: "/v2/inventoryItems/increment",
|
|
326
332
|
pathParams: {},
|
|
327
333
|
__requestType: null,
|
|
328
334
|
__originalRequestType: null,
|