@wix/auto_sdk_stores_inventory 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/cjs/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/cjs/src/stores-v2-inventory-inventory.http.js +118 -118
- package/build/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/cjs/src/stores-v2-inventory-inventory.meta.js +31 -31
- package/build/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.public.d.ts +19 -19
- package/build/cjs/src/stores-v2-inventory-inventory.public.js +13 -13
- package/build/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/cjs/src/stores-v2-inventory-inventory.universal.d.ts +274 -165
- package/build/cjs/src/stores-v2-inventory-inventory.universal.js +91 -91
- package/build/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/es/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/es/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/es/src/stores-v2-inventory-inventory.http.js +115 -115
- package/build/es/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/es/src/stores-v2-inventory-inventory.meta.js +25 -25
- package/build/es/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.public.d.ts +19 -19
- package/build/es/src/stores-v2-inventory-inventory.public.js +10 -10
- package/build/es/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/es/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/es/src/stores-v2-inventory-inventory.universal.d.ts +274 -165
- package/build/es/src/stores-v2-inventory-inventory.universal.js +85 -85
- package/build/es/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/internal/cjs/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js +118 -118
- package/build/internal/cjs/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js +31 -31
- package/build/internal/cjs/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.d.ts +19 -19
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js +13 -13
- package/build/internal/cjs/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/internal/cjs/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.d.ts +307 -189
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js +91 -91
- package/build/internal/cjs/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.context.d.ts +4 -4
- package/build/internal/es/src/stores-v2-inventory-inventory.context.js +3 -3
- package/build/internal/es/src/stores-v2-inventory-inventory.context.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.http.d.ts +9 -9
- package/build/internal/es/src/stores-v2-inventory-inventory.http.js +115 -115
- package/build/internal/es/src/stores-v2-inventory-inventory.http.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.d.ts +4 -4
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.js +25 -25
- package/build/internal/es/src/stores-v2-inventory-inventory.meta.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.public.d.ts +19 -19
- package/build/internal/es/src/stores-v2-inventory-inventory.public.js +10 -10
- package/build/internal/es/src/stores-v2-inventory-inventory.public.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.types.d.ts +224 -126
- package/build/internal/es/src/stores-v2-inventory-inventory.types.js.map +1 -1
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.d.ts +307 -189
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.js +85 -85
- package/build/internal/es/src/stores-v2-inventory-inventory.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -21,106 +21,97 @@ export var WebhookIdentityType;
|
|
|
21
21
|
WebhookIdentityType["APP"] = "APP";
|
|
22
22
|
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
|
|
25
25
|
*
|
|
26
26
|
*
|
|
27
|
-
* The `
|
|
28
|
-
* @param
|
|
27
|
+
* The `updateInventoryVariants()` function is a Promise that resolves to the updated inventory variant data.
|
|
28
|
+
* @param productId - Product ID.
|
|
29
29
|
* @public
|
|
30
|
-
* @requiredField
|
|
31
|
-
* @
|
|
30
|
+
* @requiredField inventoryItem
|
|
31
|
+
* @requiredField productId
|
|
32
|
+
* @param inventoryItem - Inventory item to update.
|
|
33
|
+
* @permissionId WIX_STORES.MODIFY_INVENTORY
|
|
32
34
|
* @permissionScope Manage Stores - all permissions
|
|
33
35
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
34
36
|
* @permissionScope Manage Products
|
|
35
37
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
36
|
-
* @permissionScope
|
|
37
|
-
* @permissionScopeId SCOPE.
|
|
38
|
-
* @permissionScope Read Products
|
|
39
|
-
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
38
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
39
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
40
40
|
* @applicableIdentity APP
|
|
41
|
-
* @
|
|
42
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
41
|
+
* @fqn wix.inventory.api.v1.InventoryWriteApi.UpdateInventoryVariants
|
|
43
42
|
*/
|
|
44
|
-
export async function
|
|
43
|
+
export async function updateInventoryVariants(productId, inventoryItem) {
|
|
45
44
|
// @ts-ignore
|
|
46
45
|
const { httpClient, sideEffects } = arguments[2];
|
|
47
46
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
48
|
-
|
|
49
|
-
externalId: options?.externalId,
|
|
50
|
-
productId: options?.productId,
|
|
51
|
-
variantIds: options?.variantIds,
|
|
47
|
+
inventoryItem: { ...inventoryItem, productId: productId },
|
|
52
48
|
});
|
|
53
|
-
const reqOpts = ambassadorWixStoresV2Inventory.
|
|
49
|
+
const reqOpts = ambassadorWixStoresV2Inventory.updateInventoryVariants(payload);
|
|
54
50
|
sideEffects?.onSiteCall?.();
|
|
55
51
|
try {
|
|
56
52
|
const result = await httpClient.request(reqOpts);
|
|
57
53
|
sideEffects?.onSuccess?.(result);
|
|
58
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
59
54
|
}
|
|
60
55
|
catch (err) {
|
|
61
56
|
const transformedError = sdkTransformError(err, {
|
|
62
|
-
spreadPathsToArguments: {},
|
|
63
|
-
explicitPathsToArguments: {
|
|
64
|
-
inventoryId: '$[0]',
|
|
65
|
-
externalId: '$[1].externalId',
|
|
66
|
-
productId: '$[1].productId',
|
|
67
|
-
variantIds: '$[1].variantIds',
|
|
68
|
-
},
|
|
57
|
+
spreadPathsToArguments: { inventoryItem: '$[1]' },
|
|
58
|
+
explicitPathsToArguments: { 'inventoryItem.productId': '$[0]' },
|
|
69
59
|
singleArgumentUnchanged: false,
|
|
70
|
-
}, ['
|
|
60
|
+
}, ['productId', 'inventoryItem']);
|
|
71
61
|
sideEffects?.onError?.(err);
|
|
72
62
|
throw transformedError;
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
65
|
/**
|
|
76
|
-
*
|
|
66
|
+
* Subtracts a set number of items from inventory.
|
|
67
|
+
*
|
|
68
|
+
*
|
|
69
|
+
* The `decrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
|
|
70
|
+
* @param decrementData - Item or product to decrement.
|
|
77
71
|
* @public
|
|
78
|
-
* @
|
|
72
|
+
* @documentationMaturity preview
|
|
73
|
+
* @requiredField decrementData
|
|
74
|
+
* @permissionId WIX_STORES.MODIFY_INVENTORY
|
|
79
75
|
* @permissionScope Manage Stores - all permissions
|
|
80
76
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
81
77
|
* @permissionScope Manage Products
|
|
82
78
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
83
|
-
* @permissionScope
|
|
84
|
-
* @permissionScopeId SCOPE.
|
|
85
|
-
* @permissionScope Read Products
|
|
86
|
-
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
79
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
80
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
87
81
|
* @applicableIdentity APP
|
|
88
|
-
* @
|
|
89
|
-
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
82
|
+
* @fqn wix.inventory.api.v1.InventoryWriteApi.DecrementInventory
|
|
90
83
|
*/
|
|
91
|
-
export async function
|
|
84
|
+
export async function decrementInventory(decrementData) {
|
|
92
85
|
// @ts-ignore
|
|
93
86
|
const { httpClient, sideEffects } = arguments[1];
|
|
94
87
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
95
|
-
|
|
88
|
+
decrementData: decrementData,
|
|
96
89
|
});
|
|
97
|
-
const reqOpts = ambassadorWixStoresV2Inventory.
|
|
90
|
+
const reqOpts = ambassadorWixStoresV2Inventory.decrementInventory(payload);
|
|
98
91
|
sideEffects?.onSiteCall?.();
|
|
99
92
|
try {
|
|
100
93
|
const result = await httpClient.request(reqOpts);
|
|
101
94
|
sideEffects?.onSuccess?.(result);
|
|
102
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
103
95
|
}
|
|
104
96
|
catch (err) {
|
|
105
97
|
const transformedError = sdkTransformError(err, {
|
|
106
98
|
spreadPathsToArguments: {},
|
|
107
|
-
explicitPathsToArguments: {
|
|
99
|
+
explicitPathsToArguments: { decrementData: '$[0]' },
|
|
108
100
|
singleArgumentUnchanged: false,
|
|
109
|
-
}, ['
|
|
101
|
+
}, ['decrementData']);
|
|
110
102
|
sideEffects?.onError?.(err);
|
|
111
103
|
throw transformedError;
|
|
112
104
|
}
|
|
113
105
|
}
|
|
114
106
|
/**
|
|
115
|
-
*
|
|
107
|
+
* Adds a set number of items to inventory.
|
|
116
108
|
*
|
|
117
109
|
*
|
|
118
|
-
* The `
|
|
119
|
-
* @param
|
|
110
|
+
* The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
|
|
111
|
+
* @param incrementData - Item or product to increment.
|
|
120
112
|
* @public
|
|
121
|
-
* @
|
|
122
|
-
* @requiredField
|
|
123
|
-
* @param inventoryItem - Inventory item to update.
|
|
113
|
+
* @documentationMaturity preview
|
|
114
|
+
* @requiredField incrementData
|
|
124
115
|
* @permissionId WIX_STORES.MODIFY_INVENTORY
|
|
125
116
|
* @permissionScope Manage Stores - all permissions
|
|
126
117
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -129,15 +120,15 @@ export async function queryInventory(options) {
|
|
|
129
120
|
* @permissionScope Manage Restaurants - all permissions
|
|
130
121
|
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
131
122
|
* @applicableIdentity APP
|
|
132
|
-
* @fqn wix.inventory.api.v1.InventoryWriteApi.
|
|
123
|
+
* @fqn wix.inventory.api.v1.InventoryWriteApi.IncrementInventory
|
|
133
124
|
*/
|
|
134
|
-
export async function
|
|
125
|
+
export async function incrementInventory(incrementData) {
|
|
135
126
|
// @ts-ignore
|
|
136
|
-
const { httpClient, sideEffects } = arguments[
|
|
127
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
137
128
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
138
|
-
|
|
129
|
+
incrementData: incrementData,
|
|
139
130
|
});
|
|
140
|
-
const reqOpts = ambassadorWixStoresV2Inventory.
|
|
131
|
+
const reqOpts = ambassadorWixStoresV2Inventory.incrementInventory(payload);
|
|
141
132
|
sideEffects?.onSiteCall?.();
|
|
142
133
|
try {
|
|
143
134
|
const result = await httpClient.request(reqOpts);
|
|
@@ -145,92 +136,101 @@ export async function updateInventoryVariants(productId, inventoryItem) {
|
|
|
145
136
|
}
|
|
146
137
|
catch (err) {
|
|
147
138
|
const transformedError = sdkTransformError(err, {
|
|
148
|
-
spreadPathsToArguments: {
|
|
149
|
-
explicitPathsToArguments: {
|
|
139
|
+
spreadPathsToArguments: {},
|
|
140
|
+
explicitPathsToArguments: { incrementData: '$[0]' },
|
|
150
141
|
singleArgumentUnchanged: false,
|
|
151
|
-
}, ['
|
|
142
|
+
}, ['incrementData']);
|
|
152
143
|
sideEffects?.onError?.(err);
|
|
153
144
|
throw transformedError;
|
|
154
145
|
}
|
|
155
146
|
}
|
|
156
147
|
/**
|
|
157
|
-
*
|
|
148
|
+
* Gets inventory variant information based on the specified option choices.
|
|
158
149
|
*
|
|
159
150
|
*
|
|
160
|
-
* The `
|
|
161
|
-
* @param
|
|
151
|
+
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
152
|
+
* @param inventoryId - Inventory item ID.
|
|
162
153
|
* @public
|
|
163
|
-
* @
|
|
164
|
-
* @
|
|
165
|
-
* @permissionId WIX_STORES.MODIFY_INVENTORY
|
|
154
|
+
* @requiredField inventoryId
|
|
155
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
166
156
|
* @permissionScope Manage Stores - all permissions
|
|
167
157
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
168
158
|
* @permissionScope Manage Products
|
|
169
159
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
170
|
-
* @permissionScope
|
|
171
|
-
* @permissionScopeId SCOPE.
|
|
160
|
+
* @permissionScope Read Stores - all read permissions
|
|
161
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
162
|
+
* @permissionScope Read Products
|
|
163
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
172
164
|
* @applicableIdentity APP
|
|
173
|
-
* @
|
|
165
|
+
* @applicableIdentity VISITOR
|
|
166
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.GetInventoryVariants
|
|
174
167
|
*/
|
|
175
|
-
export async function
|
|
168
|
+
export async function getInventoryVariants(inventoryId, options) {
|
|
176
169
|
// @ts-ignore
|
|
177
|
-
const { httpClient, sideEffects } = arguments[
|
|
170
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
178
171
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
179
|
-
|
|
172
|
+
inventoryId: inventoryId,
|
|
173
|
+
externalId: options?.externalId,
|
|
174
|
+
productId: options?.productId,
|
|
175
|
+
variantIds: options?.variantIds,
|
|
180
176
|
});
|
|
181
|
-
const reqOpts = ambassadorWixStoresV2Inventory.
|
|
177
|
+
const reqOpts = ambassadorWixStoresV2Inventory.getInventoryVariants(payload);
|
|
182
178
|
sideEffects?.onSiteCall?.();
|
|
183
179
|
try {
|
|
184
180
|
const result = await httpClient.request(reqOpts);
|
|
185
181
|
sideEffects?.onSuccess?.(result);
|
|
182
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
186
183
|
}
|
|
187
184
|
catch (err) {
|
|
188
185
|
const transformedError = sdkTransformError(err, {
|
|
189
186
|
spreadPathsToArguments: {},
|
|
190
|
-
explicitPathsToArguments: {
|
|
187
|
+
explicitPathsToArguments: {
|
|
188
|
+
inventoryId: '$[0]',
|
|
189
|
+
externalId: '$[1].externalId',
|
|
190
|
+
productId: '$[1].productId',
|
|
191
|
+
variantIds: '$[1].variantIds',
|
|
192
|
+
},
|
|
191
193
|
singleArgumentUnchanged: false,
|
|
192
|
-
}, ['
|
|
194
|
+
}, ['inventoryId', 'options']);
|
|
193
195
|
sideEffects?.onError?.(err);
|
|
194
196
|
throw transformedError;
|
|
195
197
|
}
|
|
196
198
|
}
|
|
197
199
|
/**
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
* The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
|
|
202
|
-
* @param incrementData - Item or product to increment.
|
|
200
|
+
* Returns a list of inventory items, given the provided paging, sorting and filtering.
|
|
203
201
|
* @public
|
|
204
|
-
* @
|
|
205
|
-
* @requiredField incrementData
|
|
206
|
-
* @permissionId WIX_STORES.MODIFY_INVENTORY
|
|
202
|
+
* @permissionId WIX_STORES.READ_INVENTORY
|
|
207
203
|
* @permissionScope Manage Stores - all permissions
|
|
208
204
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
209
205
|
* @permissionScope Manage Products
|
|
210
206
|
* @permissionScopeId SCOPE.DC-STORES.MANAGE-PRODUCTS
|
|
211
|
-
* @permissionScope
|
|
212
|
-
* @permissionScopeId SCOPE.
|
|
207
|
+
* @permissionScope Read Stores - all read permissions
|
|
208
|
+
* @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES
|
|
209
|
+
* @permissionScope Read Products
|
|
210
|
+
* @permissionScopeId SCOPE.DC-STORES.READ-PRODUCTS
|
|
213
211
|
* @applicableIdentity APP
|
|
214
|
-
* @
|
|
212
|
+
* @applicableIdentity VISITOR
|
|
213
|
+
* @fqn wix.inventory.api.v1.InventoryReadApi.QueryInventory
|
|
215
214
|
*/
|
|
216
|
-
export async function
|
|
215
|
+
export async function queryInventory(options) {
|
|
217
216
|
// @ts-ignore
|
|
218
217
|
const { httpClient, sideEffects } = arguments[1];
|
|
219
218
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
220
|
-
|
|
219
|
+
query: options?.query,
|
|
221
220
|
});
|
|
222
|
-
const reqOpts = ambassadorWixStoresV2Inventory.
|
|
221
|
+
const reqOpts = ambassadorWixStoresV2Inventory.queryInventory(payload);
|
|
223
222
|
sideEffects?.onSiteCall?.();
|
|
224
223
|
try {
|
|
225
224
|
const result = await httpClient.request(reqOpts);
|
|
226
225
|
sideEffects?.onSuccess?.(result);
|
|
226
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
227
227
|
}
|
|
228
228
|
catch (err) {
|
|
229
229
|
const transformedError = sdkTransformError(err, {
|
|
230
230
|
spreadPathsToArguments: {},
|
|
231
|
-
explicitPathsToArguments: {
|
|
231
|
+
explicitPathsToArguments: { query: '$[0].query' },
|
|
232
232
|
singleArgumentUnchanged: false,
|
|
233
|
-
}, ['
|
|
233
|
+
}, ['options']);
|
|
234
234
|
sideEffects?.onError?.(err);
|
|
235
235
|
throw transformedError;
|
|
236
236
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores-v2-inventory-inventory.universal.js","sourceRoot":"","sources":["../../../src/stores-v2-inventory-inventory.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,8BAA8B,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"stores-v2-inventory-inventory.universal.js","sourceRoot":"","sources":["../../../src/stores-v2-inventory-inventory.universal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,8BAA8B,MAAM,yCAAyC,CAAC;AAyE1F,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB,sBAAsB;IACtB,iCAAmB,CAAA;IACnB,qBAAqB;IACrB,6BAAe,CAAA;IACf,yBAAyB;IACzB,+BAAiB,CAAA;IACjB,qCAAqC;IACrC,iEAAmD,CAAA;AACrD,CAAC,EATW,UAAU,KAAV,UAAU,QASrB;AAoYD,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B;AAiGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,SAAwB,EACxB,aAAmD;IAEnD,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,qCAAqC,CAAC;QACpD,aAAa,EAAE,EAAE,GAAG,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE;KAC1D,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,8BAA8B,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IA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EH,MAAM,OAAO,GAAG,8BAA8B,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEvE,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,uCAAuC,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE;YACjD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { updateInventoryVariants as publicUpdateInventoryVariants, decrementInventory as publicDecrementInventory, incrementInventory as publicIncrementInventory, getInventoryVariants as publicGetInventoryVariants, queryInventory as publicQueryInventory } from './stores-v2-inventory-inventory.public.js';
|
|
2
2
|
import { createEventModule } from '@wix/sdk-runtime/event-definition-modules';
|
|
3
3
|
import { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';
|
|
4
4
|
import { onInventoryItemChanged as publicOnInventoryItemChanged } from './stores-v2-inventory-inventory.public.js';
|
|
5
5
|
import { onInventoryVariantsChanged as publicOnInventoryVariantsChanged } from './stores-v2-inventory-inventory.public.js';
|
|
6
|
-
export declare const getInventoryVariants: MaybeContext<BuildRESTFunction<typeof publicGetInventoryVariants> & typeof publicGetInventoryVariants>;
|
|
7
|
-
export declare const queryInventory: MaybeContext<BuildRESTFunction<typeof publicQueryInventory> & typeof publicQueryInventory>;
|
|
8
6
|
export declare const updateInventoryVariants: MaybeContext<BuildRESTFunction<typeof publicUpdateInventoryVariants> & typeof publicUpdateInventoryVariants>;
|
|
9
7
|
export declare const decrementInventory: MaybeContext<BuildRESTFunction<typeof publicDecrementInventory> & typeof publicDecrementInventory>;
|
|
10
8
|
export declare const incrementInventory: MaybeContext<BuildRESTFunction<typeof publicIncrementInventory> & typeof publicIncrementInventory>;
|
|
9
|
+
export declare const getInventoryVariants: MaybeContext<BuildRESTFunction<typeof publicGetInventoryVariants> & typeof publicGetInventoryVariants>;
|
|
10
|
+
export declare const queryInventory: MaybeContext<BuildRESTFunction<typeof publicQueryInventory> & typeof publicQueryInventory>;
|
|
11
11
|
/**
|
|
12
12
|
* Triggered when an inventory item is changed.
|
|
13
13
|
*/
|
|
@@ -17,4 +17,4 @@ export declare const onInventoryItemChanged: ReturnType<typeof createEventModule
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const onInventoryVariantsChanged: ReturnType<typeof createEventModule<typeof publicOnInventoryVariantsChanged>>;
|
|
19
19
|
export { ReasonType, WebhookIdentityType, } from './stores-v2-inventory-inventory.universal.js';
|
|
20
|
-
export { InventoryItemV2, InventoryVariantV2, PreorderInfo,
|
|
20
|
+
export { InventoryItemV2, InventoryVariantV2, PreorderInfo, UpdateInventoryVariantsRequest, UpdateInventoryVariantsResponse, BulkUpdateInventoryVariantsRequest, BulkUpdateInventoryVariantsRequestActionOneOf, BulkUpdateInventoryVariantsResponse, BulkUpdateInventoryItemsRequest, BulkUpdateInventoryItemsResponse, DecrementInventoryRequest, DecrementData, DecrementDataIdOneOf, DecrementInventoryResponse, IncrementInventoryRequest, IncrementData, IncrementDataIdOneOf, IncrementInventoryResponse, InventoryItemChanged, InventoryVariantsChanged, ChangedInventoryVariant, ChangedInventoryVariantData, GetInventoryVariantsRequest, GetInventoryVariantsRequestIdOneOf, GetInventoryVariantsResponse, GetInventoryItemsRequest, GetInventoryItemsResponse, QueryInventoryRequest, Query, Paging, QueryInventoryResponse, PagingMetadata, MessageEnvelope, IdentificationData, IdentificationDataIdOneOf, GetInventoryVariantsResponseNonNullableFields, QueryInventoryResponseNonNullableFields, BaseEventMetadata, InventoryItemChangedEnvelope, InventoryVariantsChangedEnvelope, UpdateInventoryVariantsInventoryItem, GetInventoryVariantsOptions, GetInventoryVariantsOptionsIdOneOf, QueryInventoryOptions, } from './stores-v2-inventory-inventory.universal.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebhookIdentityType = exports.ReasonType = exports.onInventoryVariantsChanged = exports.onInventoryItemChanged = exports.
|
|
3
|
+
exports.WebhookIdentityType = exports.ReasonType = exports.onInventoryVariantsChanged = exports.onInventoryItemChanged = exports.queryInventory = exports.getInventoryVariants = exports.incrementInventory = exports.decrementInventory = exports.updateInventoryVariants = void 0;
|
|
4
4
|
const stores_v2_inventory_inventory_public_js_1 = require("./stores-v2-inventory-inventory.public.js");
|
|
5
5
|
const rest_modules_1 = require("@wix/sdk-runtime/rest-modules");
|
|
6
6
|
const event_definition_modules_1 = require("@wix/sdk-runtime/event-definition-modules");
|
|
7
7
|
const stores_v2_inventory_inventory_public_js_2 = require("./stores-v2-inventory-inventory.public.js");
|
|
8
8
|
const stores_v2_inventory_inventory_public_js_3 = require("./stores-v2-inventory-inventory.public.js");
|
|
9
|
-
exports.getInventoryVariants = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.getInventoryVariants);
|
|
10
|
-
exports.queryInventory = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.queryInventory);
|
|
11
9
|
exports.updateInventoryVariants = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.updateInventoryVariants);
|
|
12
10
|
exports.decrementInventory = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.decrementInventory);
|
|
13
11
|
exports.incrementInventory = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.incrementInventory);
|
|
12
|
+
exports.getInventoryVariants = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.getInventoryVariants);
|
|
13
|
+
exports.queryInventory = (0, rest_modules_1.createRESTModule)(stores_v2_inventory_inventory_public_js_1.queryInventory);
|
|
14
14
|
/**
|
|
15
15
|
* Triggered when an inventory item is changed.
|
|
16
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stores-v2-inventory-inventory.context.js","sourceRoot":"","sources":["../../../../src/stores-v2-inventory-inventory.context.ts"],"names":[],"mappings":";;;AAAA,uGAMmD;AACnD,gEAAiE;AACjE,wFAA8E;AAE9E,uGAAmH;AACnH,uGAA2H;AAE9G,QAAA,
|
|
1
|
+
{"version":3,"file":"stores-v2-inventory-inventory.context.js","sourceRoot":"","sources":["../../../../src/stores-v2-inventory-inventory.context.ts"],"names":[],"mappings":";;;AAAA,uGAMmD;AACnD,gEAAiE;AACjE,wFAA8E;AAE9E,uGAAmH;AACnH,uGAA2H;AAE9G,QAAA,uBAAuB,GAGlB,IAAA,+BAAgB,EAAC,iEAA6B,CAAC,CAAC;AACrD,QAAA,kBAAkB,GAGb,IAAA,+BAAgB,EAAC,4DAAwB,CAAC,CAAC;AAChD,QAAA,kBAAkB,GAGb,IAAA,+BAAgB,EAAC,4DAAwB,CAAC,CAAC;AAChD,QAAA,oBAAoB,GAGf,IAAA,+BAAgB,EAAC,8DAA0B,CAAC,CAAC;AAClD,QAAA,cAAc,GAET,IAAA,+BAAgB,EAAC,wDAAoB,CAAC,CAAC;AACzD;;GAEG;AACU,QAAA,sBAAsB,GAE/B,IAAA,4CAAiB,EAAC,gEAA4B,CAAC,CAAC;AACpD;;GAEG;AACU,QAAA,0BAA0B,GAEnC,IAAA,4CAAiB,EAAC,oEAAgC,CAAC,CAAC;AAExD,2GAGsD;AAFpD,wIAAA,UAAU,OAAA;AACV,iJAAA,mBAAmB,OAAA"}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
/**
|
|
3
|
-
* Gets inventory variant information based on the specified option choices.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getInventoryVariants(payload: object): RequestOptionsFactory<any>;
|
|
9
|
-
/** Returns a list of inventory items, given the provided paging, sorting and filtering. */
|
|
10
|
-
export declare function queryInventory(payload: object): RequestOptionsFactory<any>;
|
|
11
2
|
/**
|
|
12
3
|
* Updates product inventory, including total quantity, whether the product is in stock, and whether the product inventory is tracked.
|
|
13
4
|
*
|
|
@@ -29,3 +20,12 @@ export declare function decrementInventory(payload: object): RequestOptionsFacto
|
|
|
29
20
|
* The `incrementInventory()` function returns a Promise that is resolved when the specified item's quantity has been updated in the inventory.
|
|
30
21
|
*/
|
|
31
22
|
export declare function incrementInventory(payload: object): RequestOptionsFactory<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Gets inventory variant information based on the specified option choices.
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* The `getInventoryVariants()` function returns a Promise that resolves to the specified inventory variant information.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getInventoryVariants(payload: object): RequestOptionsFactory<any>;
|
|
30
|
+
/** Returns a list of inventory items, given the provided paging, sorting and filtering. */
|
|
31
|
+
export declare function queryInventory(payload: object): RequestOptionsFactory<any>;
|