@wix/auto_sdk_stores_inventory 1.0.11 → 1.0.13
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/index.d.mts +74 -0
- package/build/index.d.ts +74 -0
- package/build/index.js +541 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +509 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +74 -0
- package/build/internal/index.d.ts +74 -0
- package/build/internal/index.js +541 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +509 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/internal/meta.d.mts +268 -0
- package/build/internal/meta.d.ts +268 -0
- package/build/internal/meta.js +391 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +360 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/internal/{cjs/src/stores-v2-inventory-inventory.types.d.ts → stores-v2-inventory-inventory.universal-CAYc4_b7.d.mts} +146 -51
- package/build/internal/{es/src/stores-v2-inventory-inventory.types.d.ts → stores-v2-inventory-inventory.universal-CAYc4_b7.d.ts} +146 -51
- package/build/meta.d.mts +268 -0
- package/build/meta.d.ts +268 -0
- package/build/meta.js +391 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +360 -0
- package/build/meta.mjs.map +1 -0
- package/build/{es/src/stores-v2-inventory-inventory.types.d.ts → stores-v2-inventory-inventory.universal-BltJPMge.d.mts} +108 -96
- package/build/{cjs/src/stores-v2-inventory-inventory.types.d.ts → stores-v2-inventory-inventory.universal-BltJPMge.d.ts} +108 -96
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory-inventory.context.d.ts +0 -20
- package/build/cjs/src/stores-v2-inventory-inventory.context.js +0 -25
- package/build/cjs/src/stores-v2-inventory-inventory.context.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory-inventory.http.d.ts +0 -31
- package/build/cjs/src/stores-v2-inventory-inventory.http.js +0 -291
- package/build/cjs/src/stores-v2-inventory-inventory.http.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory-inventory.meta.d.ts +0 -21
- package/build/cjs/src/stores-v2-inventory-inventory.meta.js +0 -125
- package/build/cjs/src/stores-v2-inventory-inventory.meta.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory-inventory.public.d.ts +0 -60
- package/build/cjs/src/stores-v2-inventory-inventory.public.js +0 -60
- package/build/cjs/src/stores-v2-inventory-inventory.public.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory-inventory.types.js +0 -23
- package/build/cjs/src/stores-v2-inventory-inventory.types.js.map +0 -1
- package/build/cjs/src/stores-v2-inventory-inventory.universal.d.ts +0 -600
- package/build/cjs/src/stores-v2-inventory-inventory.universal.js +0 -277
- package/build/cjs/src/stores-v2-inventory-inventory.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/stores-v2-inventory-inventory.context.d.ts +0 -20
- package/build/es/src/stores-v2-inventory-inventory.context.js +0 -20
- package/build/es/src/stores-v2-inventory-inventory.context.js.map +0 -1
- package/build/es/src/stores-v2-inventory-inventory.http.d.ts +0 -31
- package/build/es/src/stores-v2-inventory-inventory.http.js +0 -283
- package/build/es/src/stores-v2-inventory-inventory.http.js.map +0 -1
- package/build/es/src/stores-v2-inventory-inventory.meta.d.ts +0 -21
- package/build/es/src/stores-v2-inventory-inventory.meta.js +0 -94
- package/build/es/src/stores-v2-inventory-inventory.meta.js.map +0 -1
- package/build/es/src/stores-v2-inventory-inventory.public.d.ts +0 -60
- package/build/es/src/stores-v2-inventory-inventory.public.js +0 -50
- package/build/es/src/stores-v2-inventory-inventory.public.js.map +0 -1
- package/build/es/src/stores-v2-inventory-inventory.types.js +0 -20
- package/build/es/src/stores-v2-inventory-inventory.types.js.map +0 -1
- package/build/es/src/stores-v2-inventory-inventory.universal.d.ts +0 -600
- package/build/es/src/stores-v2-inventory-inventory.universal.js +0 -246
- package/build/es/src/stores-v2-inventory-inventory.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.d.ts +0 -20
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js +0 -25
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js.map +0 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.d.ts +0 -31
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js +0 -291
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js.map +0 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.d.ts +0 -21
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js +0 -125
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js.map +0 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.d.ts +0 -60
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js +0 -60
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js.map +0 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.types.js +0 -23
- package/build/internal/cjs/src/stores-v2-inventory-inventory.types.js.map +0 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.d.ts +0 -683
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js +0 -277
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.context.d.ts +0 -20
- package/build/internal/es/src/stores-v2-inventory-inventory.context.js +0 -20
- package/build/internal/es/src/stores-v2-inventory-inventory.context.js.map +0 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.http.d.ts +0 -31
- package/build/internal/es/src/stores-v2-inventory-inventory.http.js +0 -283
- package/build/internal/es/src/stores-v2-inventory-inventory.http.js.map +0 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.d.ts +0 -21
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.js +0 -94
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.js.map +0 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.public.d.ts +0 -60
- package/build/internal/es/src/stores-v2-inventory-inventory.public.js +0 -50
- package/build/internal/es/src/stores-v2-inventory-inventory.public.js.map +0 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.types.js +0 -20
- package/build/internal/es/src/stores-v2-inventory-inventory.types.js.map +0 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.d.ts +0 -683
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.js +0 -246
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.js.map +0 -1
package/build/meta.d.ts
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { g as UpdateInventoryVariantsRequest$1, h as UpdateInventoryVariantsResponse$1, m as DecrementInventoryRequest$1, o as DecrementInventoryResponse$1, p as IncrementInventoryRequest$1, r as IncrementInventoryResponse$1, v as GetInventoryVariantsRequest$1, a as GetInventoryVariantsResponse$1, z as QueryInventoryRequest$1, b as QueryInventoryResponse$1 } from './stores-v2-inventory-inventory.universal-BltJPMge.js';
|
|
2
|
+
|
|
3
|
+
interface InventoryItemV2 {
|
|
4
|
+
/** Inventory item ID. */
|
|
5
|
+
id?: string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Deprecated: use productId.
|
|
8
|
+
* @readonly
|
|
9
|
+
* @deprecated Deprecated: use productId.
|
|
10
|
+
* @replacedBy product_id
|
|
11
|
+
* @targetRemovalDate 2024-12-31
|
|
12
|
+
*/
|
|
13
|
+
externalId?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Product ID.
|
|
16
|
+
* @readonly
|
|
17
|
+
*/
|
|
18
|
+
productId?: string | null;
|
|
19
|
+
/** Whether quantity is being tracked. */
|
|
20
|
+
trackQuantity?: boolean | null;
|
|
21
|
+
/** Variants associated with this inventory item. */
|
|
22
|
+
variants?: InventoryVariantV2[];
|
|
23
|
+
/**
|
|
24
|
+
* Last updated timestamp.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
lastUpdated?: Date | null;
|
|
28
|
+
/**
|
|
29
|
+
* Inventory’s unique numeric ID (assigned in ascending order).
|
|
30
|
+
* Primarily for sorting and filtering when crawling all inventories.
|
|
31
|
+
* @readonly
|
|
32
|
+
*/
|
|
33
|
+
numericId?: string;
|
|
34
|
+
/** Preorder information. */
|
|
35
|
+
preorderInfo?: PreorderInfo;
|
|
36
|
+
}
|
|
37
|
+
interface InventoryVariantV2 {
|
|
38
|
+
/** Variant ID. */
|
|
39
|
+
variantId?: string;
|
|
40
|
+
/** Whether the product is listed as in stock. */
|
|
41
|
+
inStock?: boolean | null;
|
|
42
|
+
/** Quantity currently left in inventory. */
|
|
43
|
+
quantity?: number | null;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the variant is available for preorder. When `true`, the variant is out of stock and preorder is enabled on inventory level.
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
availableForPreorder?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface PreorderInfo {
|
|
51
|
+
/** Whether the item is available for preorder. */
|
|
52
|
+
enabled?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* A message the buyer will see when the item is out of stock and preorder is enabled.
|
|
55
|
+
* @minLength 1
|
|
56
|
+
* @maxLength 250
|
|
57
|
+
*/
|
|
58
|
+
message?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Number of products that can be preordered after stock reaches zero.
|
|
61
|
+
* @max 100000
|
|
62
|
+
*/
|
|
63
|
+
limit?: number | null;
|
|
64
|
+
}
|
|
65
|
+
interface UpdateInventoryVariantsRequest {
|
|
66
|
+
/** Inventory item. */
|
|
67
|
+
inventoryItem: InventoryItemV2;
|
|
68
|
+
}
|
|
69
|
+
interface UpdateInventoryVariantsResponse {
|
|
70
|
+
}
|
|
71
|
+
interface DecrementInventoryRequest {
|
|
72
|
+
/**
|
|
73
|
+
* @minSize 1
|
|
74
|
+
* @maxSize 300
|
|
75
|
+
*/
|
|
76
|
+
decrementData?: DecrementData[];
|
|
77
|
+
}
|
|
78
|
+
interface DecrementData extends DecrementDataIdOneOf {
|
|
79
|
+
/**
|
|
80
|
+
* Inventory item ID.
|
|
81
|
+
* @maxLength 36
|
|
82
|
+
*/
|
|
83
|
+
inventoryId?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Deprecated: use productId.
|
|
86
|
+
* @maxLength 36
|
|
87
|
+
* @deprecated Deprecated: use productId.
|
|
88
|
+
* @replacedBy product_id
|
|
89
|
+
* @targetRemovalDate 2024-12-31
|
|
90
|
+
*/
|
|
91
|
+
externalId?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Product ID.
|
|
94
|
+
* @maxLength 36
|
|
95
|
+
*/
|
|
96
|
+
productId?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Variant ID.
|
|
99
|
+
* @format GUID
|
|
100
|
+
*/
|
|
101
|
+
variantId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Number to decrement inventory by.
|
|
104
|
+
* @min 1
|
|
105
|
+
*/
|
|
106
|
+
decrementBy?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Whether the request to decrement the item's inventory was made as part of a purchase that includes preorder items.
|
|
109
|
+
* If true and the item is available for preorder, we allow negative inventory.
|
|
110
|
+
* If false and the item is not available for preorder, we allow regular buy flow (no negative inventory).
|
|
111
|
+
*/
|
|
112
|
+
preorderRequest?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/** @oneof */
|
|
115
|
+
interface DecrementDataIdOneOf {
|
|
116
|
+
/**
|
|
117
|
+
* Inventory item ID.
|
|
118
|
+
* @maxLength 36
|
|
119
|
+
*/
|
|
120
|
+
inventoryId?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Deprecated: use productId.
|
|
123
|
+
* @maxLength 36
|
|
124
|
+
* @deprecated Deprecated: use productId.
|
|
125
|
+
* @replacedBy product_id
|
|
126
|
+
* @targetRemovalDate 2024-12-31
|
|
127
|
+
*/
|
|
128
|
+
externalId?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Product ID.
|
|
131
|
+
* @maxLength 36
|
|
132
|
+
*/
|
|
133
|
+
productId?: string;
|
|
134
|
+
}
|
|
135
|
+
interface DecrementInventoryResponse {
|
|
136
|
+
}
|
|
137
|
+
interface IncrementInventoryRequest {
|
|
138
|
+
/**
|
|
139
|
+
* @minSize 1
|
|
140
|
+
* @maxSize 300
|
|
141
|
+
*/
|
|
142
|
+
incrementData?: IncrementData[];
|
|
143
|
+
}
|
|
144
|
+
interface IncrementData extends IncrementDataIdOneOf {
|
|
145
|
+
/**
|
|
146
|
+
* Inventory item ID.
|
|
147
|
+
* @maxLength 36
|
|
148
|
+
*/
|
|
149
|
+
inventoryId?: 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 increment inventory by.
|
|
162
|
+
* @min 1
|
|
163
|
+
*/
|
|
164
|
+
incrementBy?: number;
|
|
165
|
+
}
|
|
166
|
+
/** @oneof */
|
|
167
|
+
interface IncrementDataIdOneOf {
|
|
168
|
+
/**
|
|
169
|
+
* Inventory item ID.
|
|
170
|
+
* @maxLength 36
|
|
171
|
+
*/
|
|
172
|
+
inventoryId?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Product ID.
|
|
175
|
+
* @maxLength 36
|
|
176
|
+
*/
|
|
177
|
+
productId?: string;
|
|
178
|
+
}
|
|
179
|
+
interface IncrementInventoryResponse {
|
|
180
|
+
}
|
|
181
|
+
interface GetInventoryVariantsRequest extends GetInventoryVariantsRequestIdOneOf {
|
|
182
|
+
/** Inventory item ID. */
|
|
183
|
+
inventoryId: string;
|
|
184
|
+
/**
|
|
185
|
+
* Deprecated (use productID instead).
|
|
186
|
+
* @deprecated Deprecated (use productID instead).
|
|
187
|
+
* @replacedBy product_id
|
|
188
|
+
* @targetRemovalDate 2024-12-31
|
|
189
|
+
*/
|
|
190
|
+
externalId?: string;
|
|
191
|
+
/** Product ID. */
|
|
192
|
+
productId?: string;
|
|
193
|
+
/** Variant IDs to query for this inventory item (optional). */
|
|
194
|
+
variantIds?: string[];
|
|
195
|
+
}
|
|
196
|
+
/** @oneof */
|
|
197
|
+
interface GetInventoryVariantsRequestIdOneOf {
|
|
198
|
+
/** Inventory item ID. */
|
|
199
|
+
inventoryId?: string;
|
|
200
|
+
/**
|
|
201
|
+
* Deprecated (use productID instead).
|
|
202
|
+
* @deprecated Deprecated (use productID instead).
|
|
203
|
+
* @replacedBy product_id
|
|
204
|
+
* @targetRemovalDate 2024-12-31
|
|
205
|
+
*/
|
|
206
|
+
externalId?: string;
|
|
207
|
+
/** Product ID. */
|
|
208
|
+
productId?: string;
|
|
209
|
+
}
|
|
210
|
+
interface GetInventoryVariantsResponse {
|
|
211
|
+
/** Inventory item. */
|
|
212
|
+
inventoryItem?: InventoryItemV2;
|
|
213
|
+
}
|
|
214
|
+
interface QueryInventoryRequest {
|
|
215
|
+
query?: Query;
|
|
216
|
+
}
|
|
217
|
+
interface Query {
|
|
218
|
+
paging?: Paging;
|
|
219
|
+
/** Filter string */
|
|
220
|
+
filter?: string | null;
|
|
221
|
+
/** Sort string */
|
|
222
|
+
sort?: string | null;
|
|
223
|
+
}
|
|
224
|
+
interface Paging {
|
|
225
|
+
/**
|
|
226
|
+
* Amount of items to load per page
|
|
227
|
+
* @max 100
|
|
228
|
+
*/
|
|
229
|
+
limit?: number | null;
|
|
230
|
+
/** Number of items to skip in the display (relevant for all pages after the first) */
|
|
231
|
+
offset?: number | null;
|
|
232
|
+
}
|
|
233
|
+
interface QueryInventoryResponse {
|
|
234
|
+
/** Inventory items. */
|
|
235
|
+
inventoryItems?: InventoryItemV2[];
|
|
236
|
+
/** Display metadata. */
|
|
237
|
+
metadata?: PagingMetadata;
|
|
238
|
+
/** Number of total results. */
|
|
239
|
+
totalResults?: number;
|
|
240
|
+
}
|
|
241
|
+
interface PagingMetadata {
|
|
242
|
+
/** Amount of items to load per page */
|
|
243
|
+
items?: number;
|
|
244
|
+
/** Number of items to skip in the display (relevant for all pages after the first) */
|
|
245
|
+
offset?: number;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
249
|
+
getUrl: (context: any) => string;
|
|
250
|
+
httpMethod: K;
|
|
251
|
+
path: string;
|
|
252
|
+
pathParams: M;
|
|
253
|
+
__requestType: T;
|
|
254
|
+
__originalRequestType: S;
|
|
255
|
+
__responseType: Q;
|
|
256
|
+
__originalResponseType: R;
|
|
257
|
+
};
|
|
258
|
+
declare function updateInventoryVariants(): __PublicMethodMetaInfo<'PATCH', {
|
|
259
|
+
inventoryItemProductId: string;
|
|
260
|
+
}, UpdateInventoryVariantsRequest$1, UpdateInventoryVariantsRequest, UpdateInventoryVariantsResponse$1, UpdateInventoryVariantsResponse>;
|
|
261
|
+
declare function decrementInventory(): __PublicMethodMetaInfo<'POST', {}, DecrementInventoryRequest$1, DecrementInventoryRequest, DecrementInventoryResponse$1, DecrementInventoryResponse>;
|
|
262
|
+
declare function incrementInventory(): __PublicMethodMetaInfo<'POST', {}, IncrementInventoryRequest$1, IncrementInventoryRequest, IncrementInventoryResponse$1, IncrementInventoryResponse>;
|
|
263
|
+
declare function getInventoryVariants(): __PublicMethodMetaInfo<'POST', {
|
|
264
|
+
inventoryId: string;
|
|
265
|
+
}, GetInventoryVariantsRequest$1, GetInventoryVariantsRequest, GetInventoryVariantsResponse$1, GetInventoryVariantsResponse>;
|
|
266
|
+
declare function queryInventory(): __PublicMethodMetaInfo<'POST', {}, QueryInventoryRequest$1, QueryInventoryRequest, QueryInventoryResponse$1, QueryInventoryResponse>;
|
|
267
|
+
|
|
268
|
+
export { type __PublicMethodMetaInfo, decrementInventory, getInventoryVariants, incrementInventory, queryInventory, updateInventoryVariants };
|
package/build/meta.js
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// meta.ts
|
|
21
|
+
var meta_exports = {};
|
|
22
|
+
__export(meta_exports, {
|
|
23
|
+
decrementInventory: () => decrementInventory2,
|
|
24
|
+
getInventoryVariants: () => getInventoryVariants2,
|
|
25
|
+
incrementInventory: () => incrementInventory2,
|
|
26
|
+
queryInventory: () => queryInventory2,
|
|
27
|
+
updateInventoryVariants: () => updateInventoryVariants2
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(meta_exports);
|
|
30
|
+
|
|
31
|
+
// src/stores-v2-inventory-inventory.http.ts
|
|
32
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
33
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
34
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
35
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
36
|
+
function resolveWixInventoryApiV1InventoryReadApiUrl(opts) {
|
|
37
|
+
const domainToMappings = {
|
|
38
|
+
"api._api_base_domain_": [
|
|
39
|
+
{
|
|
40
|
+
srcPath: "/wix-ecommerce-catalog-reader-web",
|
|
41
|
+
destPath: ""
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"manage._base_domain_": [
|
|
45
|
+
{
|
|
46
|
+
srcPath: "/wix-ecommerce-catalog-reader-web",
|
|
47
|
+
destPath: ""
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"www.wixapis.com": [
|
|
51
|
+
{
|
|
52
|
+
srcPath: "/stores-reader/v2/collections",
|
|
53
|
+
destPath: "/v2/collections"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
srcPath: "/stores-reader/v2/inventoryItems",
|
|
57
|
+
destPath: "/v2/inventoryItems"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"www._base_domain_": [
|
|
61
|
+
{
|
|
62
|
+
srcPath: "/wix-ecommerce-catalog-reader-web",
|
|
63
|
+
destPath: ""
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"editor._base_domain_": [
|
|
67
|
+
{
|
|
68
|
+
srcPath: "/_api/wix-ecommerce-catalog-reader-web",
|
|
69
|
+
destPath: ""
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"blocks._base_domain_": [
|
|
73
|
+
{
|
|
74
|
+
srcPath: "/_api/wix-ecommerce-catalog-reader-web",
|
|
75
|
+
destPath: ""
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"create.editorx": [
|
|
79
|
+
{
|
|
80
|
+
srcPath: "/_api/wix-ecommerce-catalog-reader-web",
|
|
81
|
+
destPath: ""
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
_: [
|
|
85
|
+
{
|
|
86
|
+
srcPath: "/stores-reader/v2/inventoryItems",
|
|
87
|
+
destPath: "/v2/inventoryItems"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
srcPath: "/stores-reader/v2/collections",
|
|
91
|
+
destPath: "/v2/collections"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
96
|
+
}
|
|
97
|
+
function resolveWixInventoryApiV1InventoryWriteApiUrl(opts) {
|
|
98
|
+
const domainToMappings = {
|
|
99
|
+
"api._api_base_domain_": [
|
|
100
|
+
{
|
|
101
|
+
srcPath: "/wix-ecommerce-catalog-web",
|
|
102
|
+
destPath: ""
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"www._base_domain_": [
|
|
106
|
+
{
|
|
107
|
+
srcPath: "/_api/catalog-server",
|
|
108
|
+
destPath: ""
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
srcPath: "/wix-ecommerce-catalog",
|
|
112
|
+
destPath: ""
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"ecom._base_domain_": [
|
|
116
|
+
{
|
|
117
|
+
srcPath: "/_api/catalog-server",
|
|
118
|
+
destPath: ""
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"*.pub.wix-code.com": [
|
|
122
|
+
{
|
|
123
|
+
srcPath: "/_api/catalog-server",
|
|
124
|
+
destPath: ""
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"www.wixapis.com": [
|
|
128
|
+
{
|
|
129
|
+
srcPath: "/stores/v1/inventoryItems",
|
|
130
|
+
destPath: "/v1/inventoryItems"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
srcPath: "/stores/v2/inventoryItems",
|
|
134
|
+
destPath: "/v2/inventoryItems"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"manage._base_domain_": [
|
|
138
|
+
{
|
|
139
|
+
srcPath: "/wix-ecommerce-catalog",
|
|
140
|
+
destPath: ""
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"editor.wixapps.net": [
|
|
144
|
+
{
|
|
145
|
+
srcPath: "/_api/catalog-server",
|
|
146
|
+
destPath: ""
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"www.wixgateway.com": [
|
|
150
|
+
{
|
|
151
|
+
srcPath: "/stores/v1/products",
|
|
152
|
+
destPath: "/v1/products"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
srcPath: "/stores/v1/collections",
|
|
156
|
+
destPath: "/v1/collections"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"editor._base_domain_": [
|
|
160
|
+
{
|
|
161
|
+
srcPath: "/_api/catalog-server",
|
|
162
|
+
destPath: ""
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"blocks._base_domain_": [
|
|
166
|
+
{
|
|
167
|
+
srcPath: "/_api/catalog-server",
|
|
168
|
+
destPath: ""
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"create.editorx": [
|
|
172
|
+
{
|
|
173
|
+
srcPath: "/_api/catalog-server",
|
|
174
|
+
destPath: ""
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
};
|
|
178
|
+
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
179
|
+
}
|
|
180
|
+
var PACKAGE_NAME = "@wix/auto_sdk_stores_inventory";
|
|
181
|
+
function updateInventoryVariants(payload) {
|
|
182
|
+
function __updateInventoryVariants({ host }) {
|
|
183
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
184
|
+
{
|
|
185
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
186
|
+
paths: [{ path: "inventoryItem.lastUpdated" }]
|
|
187
|
+
}
|
|
188
|
+
]);
|
|
189
|
+
const metadata = {
|
|
190
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
191
|
+
method: "PATCH",
|
|
192
|
+
methodFqn: "wix.inventory.api.v1.InventoryWriteApi.UpdateInventoryVariants",
|
|
193
|
+
packageName: PACKAGE_NAME,
|
|
194
|
+
url: resolveWixInventoryApiV1InventoryWriteApiUrl({
|
|
195
|
+
protoPath: "/v2/inventoryItems/product/{inventoryItem.productId}",
|
|
196
|
+
data: serializedData,
|
|
197
|
+
host
|
|
198
|
+
}),
|
|
199
|
+
data: serializedData
|
|
200
|
+
};
|
|
201
|
+
return metadata;
|
|
202
|
+
}
|
|
203
|
+
return __updateInventoryVariants;
|
|
204
|
+
}
|
|
205
|
+
function decrementInventory(payload) {
|
|
206
|
+
function __decrementInventory({ host }) {
|
|
207
|
+
const metadata = {
|
|
208
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
209
|
+
method: "POST",
|
|
210
|
+
methodFqn: "wix.inventory.api.v1.InventoryWriteApi.DecrementInventory",
|
|
211
|
+
packageName: PACKAGE_NAME,
|
|
212
|
+
url: resolveWixInventoryApiV1InventoryWriteApiUrl({
|
|
213
|
+
protoPath: "/v2/inventoryItems/decrement",
|
|
214
|
+
data: payload,
|
|
215
|
+
host
|
|
216
|
+
}),
|
|
217
|
+
data: payload
|
|
218
|
+
};
|
|
219
|
+
return metadata;
|
|
220
|
+
}
|
|
221
|
+
return __decrementInventory;
|
|
222
|
+
}
|
|
223
|
+
function incrementInventory(payload) {
|
|
224
|
+
function __incrementInventory({ host }) {
|
|
225
|
+
const metadata = {
|
|
226
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
227
|
+
method: "POST",
|
|
228
|
+
methodFqn: "wix.inventory.api.v1.InventoryWriteApi.IncrementInventory",
|
|
229
|
+
packageName: PACKAGE_NAME,
|
|
230
|
+
url: resolveWixInventoryApiV1InventoryWriteApiUrl({
|
|
231
|
+
protoPath: "/v2/inventoryItems/increment",
|
|
232
|
+
data: payload,
|
|
233
|
+
host
|
|
234
|
+
}),
|
|
235
|
+
data: payload
|
|
236
|
+
};
|
|
237
|
+
return metadata;
|
|
238
|
+
}
|
|
239
|
+
return __incrementInventory;
|
|
240
|
+
}
|
|
241
|
+
function getInventoryVariants(payload) {
|
|
242
|
+
function __getInventoryVariants({ host }) {
|
|
243
|
+
const metadata = {
|
|
244
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
245
|
+
method: "POST",
|
|
246
|
+
methodFqn: "wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants",
|
|
247
|
+
packageName: PACKAGE_NAME,
|
|
248
|
+
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
249
|
+
protoPath: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
250
|
+
data: payload,
|
|
251
|
+
host
|
|
252
|
+
}),
|
|
253
|
+
data: payload,
|
|
254
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
255
|
+
{
|
|
256
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
257
|
+
paths: [{ path: "inventoryItem.lastUpdated" }]
|
|
258
|
+
}
|
|
259
|
+
])
|
|
260
|
+
};
|
|
261
|
+
return metadata;
|
|
262
|
+
}
|
|
263
|
+
return __getInventoryVariants;
|
|
264
|
+
}
|
|
265
|
+
function queryInventory(payload) {
|
|
266
|
+
function __queryInventory({ host }) {
|
|
267
|
+
const metadata = {
|
|
268
|
+
entityFqdn: "wix.stores.v2.inventory",
|
|
269
|
+
method: "POST",
|
|
270
|
+
methodFqn: "wix.inventory.api.v1.InventoryReadApi.QueryInventory",
|
|
271
|
+
packageName: PACKAGE_NAME,
|
|
272
|
+
url: resolveWixInventoryApiV1InventoryReadApiUrl({
|
|
273
|
+
protoPath: "/v2/inventoryItems/query",
|
|
274
|
+
data: payload,
|
|
275
|
+
host
|
|
276
|
+
}),
|
|
277
|
+
data: payload,
|
|
278
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
279
|
+
{
|
|
280
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
281
|
+
paths: [{ path: "inventoryItems.lastUpdated" }]
|
|
282
|
+
}
|
|
283
|
+
])
|
|
284
|
+
};
|
|
285
|
+
return metadata;
|
|
286
|
+
}
|
|
287
|
+
return __queryInventory;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// src/stores-v2-inventory-inventory.meta.ts
|
|
291
|
+
function updateInventoryVariants2() {
|
|
292
|
+
const payload = {
|
|
293
|
+
inventoryItem: { productId: ":inventoryItemProductId" }
|
|
294
|
+
};
|
|
295
|
+
const getRequestOptions = updateInventoryVariants(payload);
|
|
296
|
+
const getUrl = (context) => {
|
|
297
|
+
const { url } = getRequestOptions(context);
|
|
298
|
+
return url;
|
|
299
|
+
};
|
|
300
|
+
return {
|
|
301
|
+
getUrl,
|
|
302
|
+
httpMethod: "PATCH",
|
|
303
|
+
path: "/v2/inventoryItems/product/{inventoryItem.productId}",
|
|
304
|
+
pathParams: { inventoryItemProductId: "inventoryItemProductId" },
|
|
305
|
+
__requestType: null,
|
|
306
|
+
__originalRequestType: null,
|
|
307
|
+
__responseType: null,
|
|
308
|
+
__originalResponseType: null
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
function decrementInventory2() {
|
|
312
|
+
const payload = {};
|
|
313
|
+
const getRequestOptions = decrementInventory(payload);
|
|
314
|
+
const getUrl = (context) => {
|
|
315
|
+
const { url } = getRequestOptions(context);
|
|
316
|
+
return url;
|
|
317
|
+
};
|
|
318
|
+
return {
|
|
319
|
+
getUrl,
|
|
320
|
+
httpMethod: "POST",
|
|
321
|
+
path: "/v2/inventoryItems/decrement",
|
|
322
|
+
pathParams: {},
|
|
323
|
+
__requestType: null,
|
|
324
|
+
__originalRequestType: null,
|
|
325
|
+
__responseType: null,
|
|
326
|
+
__originalResponseType: null
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function incrementInventory2() {
|
|
330
|
+
const payload = {};
|
|
331
|
+
const getRequestOptions = incrementInventory(payload);
|
|
332
|
+
const getUrl = (context) => {
|
|
333
|
+
const { url } = getRequestOptions(context);
|
|
334
|
+
return url;
|
|
335
|
+
};
|
|
336
|
+
return {
|
|
337
|
+
getUrl,
|
|
338
|
+
httpMethod: "POST",
|
|
339
|
+
path: "/v2/inventoryItems/increment",
|
|
340
|
+
pathParams: {},
|
|
341
|
+
__requestType: null,
|
|
342
|
+
__originalRequestType: null,
|
|
343
|
+
__responseType: null,
|
|
344
|
+
__originalResponseType: null
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function getInventoryVariants2() {
|
|
348
|
+
const payload = { inventoryId: ":inventoryId" };
|
|
349
|
+
const getRequestOptions = getInventoryVariants(payload);
|
|
350
|
+
const getUrl = (context) => {
|
|
351
|
+
const { url } = getRequestOptions(context);
|
|
352
|
+
return url;
|
|
353
|
+
};
|
|
354
|
+
return {
|
|
355
|
+
getUrl,
|
|
356
|
+
httpMethod: "POST",
|
|
357
|
+
path: "/v2/inventoryItems/{inventoryId}/getVariants",
|
|
358
|
+
pathParams: { inventoryId: "inventoryId" },
|
|
359
|
+
__requestType: null,
|
|
360
|
+
__originalRequestType: null,
|
|
361
|
+
__responseType: null,
|
|
362
|
+
__originalResponseType: null
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function queryInventory2() {
|
|
366
|
+
const payload = {};
|
|
367
|
+
const getRequestOptions = queryInventory(payload);
|
|
368
|
+
const getUrl = (context) => {
|
|
369
|
+
const { url } = getRequestOptions(context);
|
|
370
|
+
return url;
|
|
371
|
+
};
|
|
372
|
+
return {
|
|
373
|
+
getUrl,
|
|
374
|
+
httpMethod: "POST",
|
|
375
|
+
path: "/v2/inventoryItems/query",
|
|
376
|
+
pathParams: {},
|
|
377
|
+
__requestType: null,
|
|
378
|
+
__originalRequestType: null,
|
|
379
|
+
__responseType: null,
|
|
380
|
+
__originalResponseType: null
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
384
|
+
0 && (module.exports = {
|
|
385
|
+
decrementInventory,
|
|
386
|
+
getInventoryVariants,
|
|
387
|
+
incrementInventory,
|
|
388
|
+
queryInventory,
|
|
389
|
+
updateInventoryVariants
|
|
390
|
+
});
|
|
391
|
+
//# sourceMappingURL=meta.js.map
|