ebay-mcp-remote-edition 3.2.0 → 3.3.1
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/README.md +261 -1
- package/build/api/analytics-and-report/analytics.js +4 -4
- package/build/api/client-trading.js +2 -2
- package/build/api/communication/feedback.js +5 -5
- package/build/api/communication/message.js +5 -5
- package/build/api/communication/negotiation.js +3 -3
- package/build/api/communication/notification.js +21 -21
- package/build/api/listing-management/inventory.js +36 -36
- package/build/api/listing-metadata/metadata.js +24 -24
- package/build/auth/oauth.js +2 -2
- package/build/auth/token-verifier.js +3 -3
- package/build/server-http.js +18 -1
- package/build/tools/index.js +5 -5
- package/build/validation/effective-context.js +77 -0
- package/build/validation/providers/ebay-sold.js +96 -51
- package/build/validation/providers/ebay.js +115 -57
- package/build/validation/providers/query-utils.js +577 -0
- package/build/validation/providers/research.js +16 -0
- package/build/validation/providers/social.js +681 -2
- package/build/validation/providers/terapeak.js +30 -0
- package/build/validation/recommendation.js +33 -10
- package/build/validation/run-validation.js +279 -31
- package/build/validation/schemas.js +62 -15
- package/package.json +22 -20
|
@@ -20,7 +20,7 @@ export class NotificationApi {
|
|
|
20
20
|
return await this.client.get(`${this.basePath}/public_key/${publicKeyId}`);
|
|
21
21
|
}
|
|
22
22
|
catch (error) {
|
|
23
|
-
throw new Error(`Failed to get public key: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
23
|
+
throw new Error(`Failed to get public key: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
@@ -32,7 +32,7 @@ export class NotificationApi {
|
|
|
32
32
|
return await this.client.get(`${this.basePath}/config`);
|
|
33
33
|
}
|
|
34
34
|
catch (error) {
|
|
35
|
-
throw new Error(`Failed to get config: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
35
|
+
throw new Error(`Failed to get config: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -47,7 +47,7 @@ export class NotificationApi {
|
|
|
47
47
|
return await this.client.put(`${this.basePath}/config`, config);
|
|
48
48
|
}
|
|
49
49
|
catch (error) {
|
|
50
|
-
throw new Error(`Failed to update config: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
50
|
+
throw new Error(`Failed to update config: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
@@ -64,7 +64,7 @@ export class NotificationApi {
|
|
|
64
64
|
return await this.client.get(`${this.basePath}/destination`, params);
|
|
65
65
|
}
|
|
66
66
|
catch (error) {
|
|
67
|
-
throw new Error(`Failed to get destinations: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
67
|
+
throw new Error(`Failed to get destinations: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -79,7 +79,7 @@ export class NotificationApi {
|
|
|
79
79
|
return await this.client.get(`${this.basePath}/destination/${destinationId}`);
|
|
80
80
|
}
|
|
81
81
|
catch (error) {
|
|
82
|
-
throw new Error(`Failed to get destination: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
82
|
+
throw new Error(`Failed to get destination: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
@@ -94,7 +94,7 @@ export class NotificationApi {
|
|
|
94
94
|
return await this.client.post(`${this.basePath}/destination`, destination);
|
|
95
95
|
}
|
|
96
96
|
catch (error) {
|
|
97
|
-
throw new Error(`Failed to create destination: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
97
|
+
throw new Error(`Failed to create destination: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
@@ -112,7 +112,7 @@ export class NotificationApi {
|
|
|
112
112
|
return await this.client.put(`${this.basePath}/destination/${destinationId}`, destination);
|
|
113
113
|
}
|
|
114
114
|
catch (error) {
|
|
115
|
-
throw new Error(`Failed to update destination: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
115
|
+
throw new Error(`Failed to update destination: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
@@ -127,7 +127,7 @@ export class NotificationApi {
|
|
|
127
127
|
return await this.client.delete(`${this.basePath}/destination/${destinationId}`);
|
|
128
128
|
}
|
|
129
129
|
catch (error) {
|
|
130
|
-
throw new Error(`Failed to delete destination: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
130
|
+
throw new Error(`Failed to delete destination: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
@@ -153,7 +153,7 @@ export class NotificationApi {
|
|
|
153
153
|
return await this.client.get(`${this.basePath}/subscription`, params);
|
|
154
154
|
}
|
|
155
155
|
catch (error) {
|
|
156
|
-
throw new Error(`Failed to get subscriptions: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
156
|
+
throw new Error(`Failed to get subscriptions: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
@@ -169,7 +169,7 @@ export class NotificationApi {
|
|
|
169
169
|
return await this.client.post(`${this.basePath}/subscription`, subscription);
|
|
170
170
|
}
|
|
171
171
|
catch (error) {
|
|
172
|
-
throw new Error(`Failed to create subscription: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
172
|
+
throw new Error(`Failed to create subscription: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
@@ -185,7 +185,7 @@ export class NotificationApi {
|
|
|
185
185
|
return await this.client.get(`${this.basePath}/subscription/${subscriptionId}`);
|
|
186
186
|
}
|
|
187
187
|
catch (error) {
|
|
188
|
-
throw new Error(`Failed to get subscription: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
188
|
+
throw new Error(`Failed to get subscription: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
@@ -204,7 +204,7 @@ export class NotificationApi {
|
|
|
204
204
|
return await this.client.put(`${this.basePath}/subscription/${subscriptionId}`, subscription);
|
|
205
205
|
}
|
|
206
206
|
catch (error) {
|
|
207
|
-
throw new Error(`Failed to update subscription: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
207
|
+
throw new Error(`Failed to update subscription: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
/**
|
|
@@ -220,7 +220,7 @@ export class NotificationApi {
|
|
|
220
220
|
return await this.client.delete(`${this.basePath}/subscription/${subscriptionId}`);
|
|
221
221
|
}
|
|
222
222
|
catch (error) {
|
|
223
|
-
throw new Error(`Failed to delete subscription: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
223
|
+
throw new Error(`Failed to delete subscription: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
@@ -236,7 +236,7 @@ export class NotificationApi {
|
|
|
236
236
|
return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/disable`, {});
|
|
237
237
|
}
|
|
238
238
|
catch (error) {
|
|
239
|
-
throw new Error(`Failed to disable subscription: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
239
|
+
throw new Error(`Failed to disable subscription: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
@@ -252,7 +252,7 @@ export class NotificationApi {
|
|
|
252
252
|
return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/enable`, {});
|
|
253
253
|
}
|
|
254
254
|
catch (error) {
|
|
255
|
-
throw new Error(`Failed to enable subscription: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
255
|
+
throw new Error(`Failed to enable subscription: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
@@ -268,7 +268,7 @@ export class NotificationApi {
|
|
|
268
268
|
return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/test`, {});
|
|
269
269
|
}
|
|
270
270
|
catch (error) {
|
|
271
|
-
throw new Error(`Failed to test subscription: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
271
|
+
throw new Error(`Failed to test subscription: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
@@ -284,7 +284,7 @@ export class NotificationApi {
|
|
|
284
284
|
return await this.client.get(`${this.basePath}/topic/${topicId}`);
|
|
285
285
|
}
|
|
286
286
|
catch (error) {
|
|
287
|
-
throw new Error(`Failed to get topic: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
287
|
+
throw new Error(`Failed to get topic: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
@@ -310,7 +310,7 @@ export class NotificationApi {
|
|
|
310
310
|
return await this.client.get(`${this.basePath}/topic`, params);
|
|
311
311
|
}
|
|
312
312
|
catch (error) {
|
|
313
|
-
throw new Error(`Failed to get topics: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
313
|
+
throw new Error(`Failed to get topics: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
@@ -329,7 +329,7 @@ export class NotificationApi {
|
|
|
329
329
|
return await this.client.post(`${this.basePath}/subscription/${subscriptionId}/filter`, filter);
|
|
330
330
|
}
|
|
331
331
|
catch (error) {
|
|
332
|
-
throw new Error(`Failed to create subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
332
|
+
throw new Error(`Failed to create subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
/**
|
|
@@ -348,7 +348,7 @@ export class NotificationApi {
|
|
|
348
348
|
return await this.client.get(`${this.basePath}/subscription/${subscriptionId}/filter/${filterId}`);
|
|
349
349
|
}
|
|
350
350
|
catch (error) {
|
|
351
|
-
throw new Error(`Failed to get subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
351
|
+
throw new Error(`Failed to get subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
/**
|
|
@@ -367,7 +367,7 @@ export class NotificationApi {
|
|
|
367
367
|
return await this.client.delete(`${this.basePath}/subscription/${subscriptionId}/filter/${filterId}`);
|
|
368
368
|
}
|
|
369
369
|
catch (error) {
|
|
370
|
-
throw new Error(`Failed to delete subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
370
|
+
throw new Error(`Failed to delete subscription filter: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
}
|
|
@@ -30,7 +30,7 @@ export class InventoryApi {
|
|
|
30
30
|
return await this.client.get(`${this.basePath}/inventory_item`, params);
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
|
-
throw new Error(`Failed to get inventory items: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
33
|
+
throw new Error(`Failed to get inventory items: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
@@ -45,7 +45,7 @@ export class InventoryApi {
|
|
|
45
45
|
return await this.client.get(`${this.basePath}/inventory_item/${sku}`);
|
|
46
46
|
}
|
|
47
47
|
catch (error) {
|
|
48
|
-
throw new Error(`Failed to get inventory item: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
48
|
+
throw new Error(`Failed to get inventory item: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
@@ -63,7 +63,7 @@ export class InventoryApi {
|
|
|
63
63
|
return await this.client.put(`${this.basePath}/inventory_item/${sku}`, inventoryItem);
|
|
64
64
|
}
|
|
65
65
|
catch (error) {
|
|
66
|
-
throw new Error(`Failed to create or replace inventory item: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
66
|
+
throw new Error(`Failed to create or replace inventory item: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -78,7 +78,7 @@ export class InventoryApi {
|
|
|
78
78
|
return await this.client.delete(`${this.basePath}/inventory_item/${sku}`);
|
|
79
79
|
}
|
|
80
80
|
catch (error) {
|
|
81
|
-
throw new Error(`Failed to delete inventory item: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
81
|
+
throw new Error(`Failed to delete inventory item: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
@@ -94,7 +94,7 @@ export class InventoryApi {
|
|
|
94
94
|
return await this.client.post(`${this.basePath}/bulk_create_or_replace_inventory_item`, requests);
|
|
95
95
|
}
|
|
96
96
|
catch (error) {
|
|
97
|
-
throw new Error(`Failed to bulk create or replace inventory items: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
97
|
+
throw new Error(`Failed to bulk create or replace inventory items: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
@@ -110,7 +110,7 @@ export class InventoryApi {
|
|
|
110
110
|
return await this.client.post(`${this.basePath}/bulk_get_inventory_item`, requests);
|
|
111
111
|
}
|
|
112
112
|
catch (error) {
|
|
113
|
-
throw new Error(`Failed to bulk get inventory items: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
113
|
+
throw new Error(`Failed to bulk get inventory items: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
@@ -126,7 +126,7 @@ export class InventoryApi {
|
|
|
126
126
|
return await this.client.post(`${this.basePath}/bulk_update_price_quantity`, requests);
|
|
127
127
|
}
|
|
128
128
|
catch (error) {
|
|
129
|
-
throw new Error(`Failed to bulk update price and quantity: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
129
|
+
throw new Error(`Failed to bulk update price and quantity: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
@@ -142,7 +142,7 @@ export class InventoryApi {
|
|
|
142
142
|
return await this.client.get(`${this.basePath}/inventory_item/${sku}/product_compatibility`);
|
|
143
143
|
}
|
|
144
144
|
catch (error) {
|
|
145
|
-
throw new Error(`Failed to get product compatibility: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
145
|
+
throw new Error(`Failed to get product compatibility: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
@@ -161,7 +161,7 @@ export class InventoryApi {
|
|
|
161
161
|
return await this.client.put(`${this.basePath}/inventory_item/${sku}/product_compatibility`, compatibility);
|
|
162
162
|
}
|
|
163
163
|
catch (error) {
|
|
164
|
-
throw new Error(`Failed to create or replace product compatibility: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
164
|
+
throw new Error(`Failed to create or replace product compatibility: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
@@ -177,7 +177,7 @@ export class InventoryApi {
|
|
|
177
177
|
return await this.client.delete(`${this.basePath}/inventory_item/${sku}/product_compatibility`);
|
|
178
178
|
}
|
|
179
179
|
catch (error) {
|
|
180
|
-
throw new Error(`Failed to delete product compatibility: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
180
|
+
throw new Error(`Failed to delete product compatibility: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
@@ -193,7 +193,7 @@ export class InventoryApi {
|
|
|
193
193
|
return await this.client.get(`${this.basePath}/inventory_item_group/${inventoryItemGroupKey}`);
|
|
194
194
|
}
|
|
195
195
|
catch (error) {
|
|
196
|
-
throw new Error(`Failed to get inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
196
|
+
throw new Error(`Failed to get inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
@@ -212,7 +212,7 @@ export class InventoryApi {
|
|
|
212
212
|
return await this.client.put(`${this.basePath}/inventory_item_group/${inventoryItemGroupKey}`, inventoryItemGroup);
|
|
213
213
|
}
|
|
214
214
|
catch (error) {
|
|
215
|
-
throw new Error(`Failed to create or replace inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
215
|
+
throw new Error(`Failed to create or replace inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
@@ -228,7 +228,7 @@ export class InventoryApi {
|
|
|
228
228
|
return await this.client.delete(`${this.basePath}/inventory_item_group/${inventoryItemGroupKey}`);
|
|
229
229
|
}
|
|
230
230
|
catch (error) {
|
|
231
|
-
throw new Error(`Failed to delete inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
231
|
+
throw new Error(`Failed to delete inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
@@ -254,7 +254,7 @@ export class InventoryApi {
|
|
|
254
254
|
return await this.client.get(`${this.basePath}/location`, params);
|
|
255
255
|
}
|
|
256
256
|
catch (error) {
|
|
257
|
-
throw new Error(`Failed to get inventory locations: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
257
|
+
throw new Error(`Failed to get inventory locations: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
@@ -270,7 +270,7 @@ export class InventoryApi {
|
|
|
270
270
|
return await this.client.get(`${this.basePath}/location/${merchantLocationKey}`);
|
|
271
271
|
}
|
|
272
272
|
catch (error) {
|
|
273
|
-
throw new Error(`Failed to get inventory location: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
273
|
+
throw new Error(`Failed to get inventory location: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
@@ -289,7 +289,7 @@ export class InventoryApi {
|
|
|
289
289
|
return await this.client.post(`${this.basePath}/location/${merchantLocationKey}`, location);
|
|
290
290
|
}
|
|
291
291
|
catch (error) {
|
|
292
|
-
throw new Error(`Failed to create or replace inventory location: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
292
|
+
throw new Error(`Failed to create or replace inventory location: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
@@ -305,7 +305,7 @@ export class InventoryApi {
|
|
|
305
305
|
return await this.client.delete(`${this.basePath}/location/${merchantLocationKey}`);
|
|
306
306
|
}
|
|
307
307
|
catch (error) {
|
|
308
|
-
throw new Error(`Failed to delete inventory location: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
308
|
+
throw new Error(`Failed to delete inventory location: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
/**
|
|
@@ -321,7 +321,7 @@ export class InventoryApi {
|
|
|
321
321
|
return await this.client.post(`${this.basePath}/location/${merchantLocationKey}/disable`, {});
|
|
322
322
|
}
|
|
323
323
|
catch (error) {
|
|
324
|
-
throw new Error(`Failed to disable inventory location: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
324
|
+
throw new Error(`Failed to disable inventory location: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
/**
|
|
@@ -337,7 +337,7 @@ export class InventoryApi {
|
|
|
337
337
|
return await this.client.post(`${this.basePath}/location/${merchantLocationKey}/enable`, {});
|
|
338
338
|
}
|
|
339
339
|
catch (error) {
|
|
340
|
-
throw new Error(`Failed to enable inventory location: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
340
|
+
throw new Error(`Failed to enable inventory location: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
@@ -356,7 +356,7 @@ export class InventoryApi {
|
|
|
356
356
|
return await this.client.post(`${this.basePath}/location/${merchantLocationKey}/update_location_details`, locationDetails);
|
|
357
357
|
}
|
|
358
358
|
catch (error) {
|
|
359
|
-
throw new Error(`Failed to update location details: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
359
|
+
throw new Error(`Failed to update location details: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
/**
|
|
@@ -387,7 +387,7 @@ export class InventoryApi {
|
|
|
387
387
|
return await this.client.get(`${this.basePath}/offer`, params);
|
|
388
388
|
}
|
|
389
389
|
catch (error) {
|
|
390
|
-
throw new Error(`Failed to get offers: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
390
|
+
throw new Error(`Failed to get offers: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
/**
|
|
@@ -403,7 +403,7 @@ export class InventoryApi {
|
|
|
403
403
|
return await this.client.get(`${this.basePath}/offer/${offerId}`);
|
|
404
404
|
}
|
|
405
405
|
catch (error) {
|
|
406
|
-
throw new Error(`Failed to get offer: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
406
|
+
throw new Error(`Failed to get offer: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
@@ -418,7 +418,7 @@ export class InventoryApi {
|
|
|
418
418
|
return await this.client.post(`${this.basePath}/offer`, offer);
|
|
419
419
|
}
|
|
420
420
|
catch (error) {
|
|
421
|
-
throw new Error(`Failed to create offer: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
421
|
+
throw new Error(`Failed to create offer: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
/**
|
|
@@ -437,7 +437,7 @@ export class InventoryApi {
|
|
|
437
437
|
return await this.client.put(`${this.basePath}/offer/${offerId}`, offer);
|
|
438
438
|
}
|
|
439
439
|
catch (error) {
|
|
440
|
-
throw new Error(`Failed to update offer: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
440
|
+
throw new Error(`Failed to update offer: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
/**
|
|
@@ -453,7 +453,7 @@ export class InventoryApi {
|
|
|
453
453
|
return await this.client.delete(`${this.basePath}/offer/${offerId}`);
|
|
454
454
|
}
|
|
455
455
|
catch (error) {
|
|
456
|
-
throw new Error(`Failed to delete offer: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
456
|
+
throw new Error(`Failed to delete offer: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
/**
|
|
@@ -468,7 +468,7 @@ export class InventoryApi {
|
|
|
468
468
|
return await this.client.post(`${this.basePath}/offer/${offerId}/publish`);
|
|
469
469
|
}
|
|
470
470
|
catch (error) {
|
|
471
|
-
throw new Error(`Failed to publish offer: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
471
|
+
throw new Error(`Failed to publish offer: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
@@ -484,7 +484,7 @@ export class InventoryApi {
|
|
|
484
484
|
return await this.client.post(`${this.basePath}/offer/${offerId}/withdraw`, {});
|
|
485
485
|
}
|
|
486
486
|
catch (error) {
|
|
487
|
-
throw new Error(`Failed to withdraw offer: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
487
|
+
throw new Error(`Failed to withdraw offer: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
/**
|
|
@@ -500,7 +500,7 @@ export class InventoryApi {
|
|
|
500
500
|
return await this.client.post(`${this.basePath}/bulk_create_offer`, requests);
|
|
501
501
|
}
|
|
502
502
|
catch (error) {
|
|
503
|
-
throw new Error(`Failed to bulk create offers: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
503
|
+
throw new Error(`Failed to bulk create offers: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
/**
|
|
@@ -516,7 +516,7 @@ export class InventoryApi {
|
|
|
516
516
|
return await this.client.post(`${this.basePath}/bulk_publish_offer`, requests);
|
|
517
517
|
}
|
|
518
518
|
catch (error) {
|
|
519
|
-
throw new Error(`Failed to bulk publish offers: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
519
|
+
throw new Error(`Failed to bulk publish offers: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
/**
|
|
@@ -532,7 +532,7 @@ export class InventoryApi {
|
|
|
532
532
|
return await this.client.post(`${this.basePath}/offer/get_listing_fees`, offers);
|
|
533
533
|
}
|
|
534
534
|
catch (error) {
|
|
535
|
-
throw new Error(`Failed to get listing fees: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
535
|
+
throw new Error(`Failed to get listing fees: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
/**
|
|
@@ -548,7 +548,7 @@ export class InventoryApi {
|
|
|
548
548
|
return await this.client.post(`${this.basePath}/bulk_migrate_listing`, requests);
|
|
549
549
|
}
|
|
550
550
|
catch (error) {
|
|
551
|
-
throw new Error(`Failed to bulk migrate listings: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
551
|
+
throw new Error(`Failed to bulk migrate listings: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
/**
|
|
@@ -567,7 +567,7 @@ export class InventoryApi {
|
|
|
567
567
|
return await this.client.get(`${this.basePath}/listing/${listingId}/sku/${sku}/locations`);
|
|
568
568
|
}
|
|
569
569
|
catch (error) {
|
|
570
|
-
throw new Error(`Failed to get listing locations: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
570
|
+
throw new Error(`Failed to get listing locations: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
async createOrReplaceSkuLocationMapping(listingId, sku, locationMapping) {
|
|
@@ -588,7 +588,7 @@ export class InventoryApi {
|
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
catch (error) {
|
|
591
|
-
throw new Error(`Failed to create or replace SKU location mapping: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
591
|
+
throw new Error(`Failed to create or replace SKU location mapping: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
async deleteSkuLocationMapping(listingId, sku) {
|
|
@@ -602,7 +602,7 @@ export class InventoryApi {
|
|
|
602
602
|
return await this.client.delete(`${this.basePath}/listing/${listingId}/sku/${sku}/locations`);
|
|
603
603
|
}
|
|
604
604
|
catch (error) {
|
|
605
|
-
throw new Error(`Failed to delete SKU location mapping: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
605
|
+
throw new Error(`Failed to delete SKU location mapping: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
/**
|
|
@@ -618,7 +618,7 @@ export class InventoryApi {
|
|
|
618
618
|
return await this.client.post(`${this.basePath}/offer/publish_by_inventory_item_group`, request);
|
|
619
619
|
}
|
|
620
620
|
catch (error) {
|
|
621
|
-
throw new Error(`Failed to publish offer by inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
621
|
+
throw new Error(`Failed to publish offer by inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
624
|
/**
|
|
@@ -634,7 +634,7 @@ export class InventoryApi {
|
|
|
634
634
|
return await this.client.post(`${this.basePath}/offer/withdraw_by_inventory_item_group`, request);
|
|
635
635
|
}
|
|
636
636
|
catch (error) {
|
|
637
|
-
throw new Error(`Failed to withdraw offer by inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
637
|
+
throw new Error(`Failed to withdraw offer by inventory item group: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
640
|
}
|