ebay-mcp-remote-edition 3.2.0 → 3.3.0
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 +240 -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/providers/ebay-sold.js +96 -51
- package/build/validation/providers/ebay.js +115 -57
- package/build/validation/providers/query-utils.js +454 -0
- package/build/validation/providers/research.js +14 -0
- package/build/validation/providers/social.js +678 -2
- package/build/validation/providers/terapeak.js +30 -0
- package/build/validation/recommendation.js +22 -6
- package/build/validation/run-validation.js +262 -28
- package/build/validation/schemas.js +9 -0
- package/package.json +22 -20
|
@@ -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
|
}
|
|
@@ -27,7 +27,7 @@ export class MetadataApi {
|
|
|
27
27
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_automotive_parts_compatibility_policies`, params);
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
throw new Error(`Failed to get automotive parts compatibility policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
30
|
+
throw new Error(`Failed to get automotive parts compatibility policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
@@ -49,7 +49,7 @@ export class MetadataApi {
|
|
|
49
49
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_category_policies`, params);
|
|
50
50
|
}
|
|
51
51
|
catch (error) {
|
|
52
|
-
throw new Error(`Failed to get category policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
52
|
+
throw new Error(`Failed to get category policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
@@ -71,7 +71,7 @@ export class MetadataApi {
|
|
|
71
71
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_extended_producer_responsibility_policies`, params);
|
|
72
72
|
}
|
|
73
73
|
catch (error) {
|
|
74
|
-
throw new Error(`Failed to get extended producer responsibility policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
74
|
+
throw new Error(`Failed to get extended producer responsibility policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
@@ -87,7 +87,7 @@ export class MetadataApi {
|
|
|
87
87
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_hazardous_materials_labels`);
|
|
88
88
|
}
|
|
89
89
|
catch (error) {
|
|
90
|
-
throw new Error(`Failed to get hazardous materials labels: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
90
|
+
throw new Error(`Failed to get hazardous materials labels: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
@@ -109,7 +109,7 @@ export class MetadataApi {
|
|
|
109
109
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_item_condition_policies`, params);
|
|
110
110
|
}
|
|
111
111
|
catch (error) {
|
|
112
|
-
throw new Error(`Failed to get item condition policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
112
|
+
throw new Error(`Failed to get item condition policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
@@ -131,7 +131,7 @@ export class MetadataApi {
|
|
|
131
131
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_listing_structure_policies`, params);
|
|
132
132
|
}
|
|
133
133
|
catch (error) {
|
|
134
|
-
throw new Error(`Failed to get listing structure policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
134
|
+
throw new Error(`Failed to get listing structure policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
@@ -153,7 +153,7 @@ export class MetadataApi {
|
|
|
153
153
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_negotiated_price_policies`, params);
|
|
154
154
|
}
|
|
155
155
|
catch (error) {
|
|
156
|
-
throw new Error(`Failed to get negotiated price policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
156
|
+
throw new Error(`Failed to get negotiated price policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
@@ -169,7 +169,7 @@ export class MetadataApi {
|
|
|
169
169
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_product_safety_labels`);
|
|
170
170
|
}
|
|
171
171
|
catch (error) {
|
|
172
|
-
throw new Error(`Failed to get product safety labels: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
172
|
+
throw new Error(`Failed to get product safety labels: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
@@ -191,7 +191,7 @@ export class MetadataApi {
|
|
|
191
191
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_regulatory_policies`, params);
|
|
192
192
|
}
|
|
193
193
|
catch (error) {
|
|
194
|
-
throw new Error(`Failed to get regulatory policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
194
|
+
throw new Error(`Failed to get regulatory policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
/**
|
|
@@ -213,7 +213,7 @@ export class MetadataApi {
|
|
|
213
213
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_return_policies`, params);
|
|
214
214
|
}
|
|
215
215
|
catch (error) {
|
|
216
|
-
throw new Error(`Failed to get return policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
216
|
+
throw new Error(`Failed to get return policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
/**
|
|
@@ -235,7 +235,7 @@ export class MetadataApi {
|
|
|
235
235
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_shipping_cost_type_policies`, params);
|
|
236
236
|
}
|
|
237
237
|
catch (error) {
|
|
238
|
-
throw new Error(`Failed to get shipping cost type policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
238
|
+
throw new Error(`Failed to get shipping cost type policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
@@ -257,7 +257,7 @@ export class MetadataApi {
|
|
|
257
257
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_classified_ad_policies`, params);
|
|
258
258
|
}
|
|
259
259
|
catch (error) {
|
|
260
|
-
throw new Error(`Failed to get classified ad policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
260
|
+
throw new Error(`Failed to get classified ad policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
/**
|
|
@@ -273,7 +273,7 @@ export class MetadataApi {
|
|
|
273
273
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_currencies`);
|
|
274
274
|
}
|
|
275
275
|
catch (error) {
|
|
276
|
-
throw new Error(`Failed to get currencies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
276
|
+
throw new Error(`Failed to get currencies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
@@ -295,7 +295,7 @@ export class MetadataApi {
|
|
|
295
295
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_listing_type_policies`, params);
|
|
296
296
|
}
|
|
297
297
|
catch (error) {
|
|
298
|
-
throw new Error(`Failed to get listing type policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
298
|
+
throw new Error(`Failed to get listing type policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
/**
|
|
@@ -317,7 +317,7 @@ export class MetadataApi {
|
|
|
317
317
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_motors_listing_policies`, params);
|
|
318
318
|
}
|
|
319
319
|
catch (error) {
|
|
320
|
-
throw new Error(`Failed to get motors listing policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
320
|
+
throw new Error(`Failed to get motors listing policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
/**
|
|
@@ -339,7 +339,7 @@ export class MetadataApi {
|
|
|
339
339
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_shipping_policies`, params);
|
|
340
340
|
}
|
|
341
341
|
catch (error) {
|
|
342
|
-
throw new Error(`Failed to get shipping policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
342
|
+
throw new Error(`Failed to get shipping policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
/**
|
|
@@ -361,7 +361,7 @@ export class MetadataApi {
|
|
|
361
361
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_site_visibility_policies`, params);
|
|
362
362
|
}
|
|
363
363
|
catch (error) {
|
|
364
|
-
throw new Error(`Failed to get site visibility policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
364
|
+
throw new Error(`Failed to get site visibility policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
@@ -377,7 +377,7 @@ export class MetadataApi {
|
|
|
377
377
|
return await this.client.post(`${this.basePath}/compatibilities/get_compatibilities_by_specification`, specification);
|
|
378
378
|
}
|
|
379
379
|
catch (error) {
|
|
380
|
-
throw new Error(`Failed to get compatibilities by specification: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
380
|
+
throw new Error(`Failed to get compatibilities by specification: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
/**
|
|
@@ -393,7 +393,7 @@ export class MetadataApi {
|
|
|
393
393
|
return await this.client.post(`${this.basePath}/compatibilities/get_compatibility_property_names`, data);
|
|
394
394
|
}
|
|
395
395
|
catch (error) {
|
|
396
|
-
throw new Error(`Failed to get compatibility property names: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
396
|
+
throw new Error(`Failed to get compatibility property names: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
@@ -409,7 +409,7 @@ export class MetadataApi {
|
|
|
409
409
|
return await this.client.post(`${this.basePath}/compatibilities/get_compatibility_property_values`, data);
|
|
410
410
|
}
|
|
411
411
|
catch (error) {
|
|
412
|
-
throw new Error(`Failed to get compatibility property values: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
412
|
+
throw new Error(`Failed to get compatibility property values: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
@@ -425,7 +425,7 @@ export class MetadataApi {
|
|
|
425
425
|
return await this.client.post(`${this.basePath}/compatibilities/get_multi_compatibility_property_values`, data);
|
|
426
426
|
}
|
|
427
427
|
catch (error) {
|
|
428
|
-
throw new Error(`Failed to get multi compatibility property values: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
428
|
+
throw new Error(`Failed to get multi compatibility property values: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
/**
|
|
@@ -441,7 +441,7 @@ export class MetadataApi {
|
|
|
441
441
|
return await this.client.post(`${this.basePath}/compatibilities/get_product_compatibilities`, data);
|
|
442
442
|
}
|
|
443
443
|
catch (error) {
|
|
444
|
-
throw new Error(`Failed to get product compatibilities: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
444
|
+
throw new Error(`Failed to get product compatibilities: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
/**
|
|
@@ -457,7 +457,7 @@ export class MetadataApi {
|
|
|
457
457
|
return await this.client.get(`${this.basePath}/country/${countryCode}/sales_tax_jurisdiction`);
|
|
458
458
|
}
|
|
459
459
|
catch (error) {
|
|
460
|
-
throw new Error(`Failed to get sales tax jurisdictions: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
460
|
+
throw new Error(`Failed to get sales tax jurisdictions: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
/**
|
|
@@ -479,7 +479,7 @@ export class MetadataApi {
|
|
|
479
479
|
return await this.client.get(`${this.basePath}/marketplace/${marketplaceId}/get_product_compliance_policies`, params);
|
|
480
480
|
}
|
|
481
481
|
catch (error) {
|
|
482
|
-
throw new Error(`Failed to get product compliance policies: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
482
|
+
throw new Error(`Failed to get product compliance policies: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
}
|
package/build/auth/oauth.js
CHANGED
|
@@ -165,10 +165,10 @@ export class EbayOAuthClient {
|
|
|
165
165
|
if (axios.isAxiosError(error) && error.response?.data) {
|
|
166
166
|
const data = error.response.data;
|
|
167
167
|
if (data.error_description) {
|
|
168
|
-
throw new Error(data.error_description);
|
|
168
|
+
throw new Error(data.error_description, { cause: error });
|
|
169
169
|
}
|
|
170
170
|
if (data.error) {
|
|
171
|
-
throw new Error(data.error);
|
|
171
|
+
throw new Error(data.error, { cause: error });
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
throw error;
|
|
@@ -20,7 +20,7 @@ export class TokenVerifier {
|
|
|
20
20
|
this.metadata = response.data;
|
|
21
21
|
}
|
|
22
22
|
catch (error) {
|
|
23
|
-
throw new Error(`Failed to load OAuth server metadata: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
23
|
+
throw new Error(`Failed to load OAuth server metadata: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
@@ -104,7 +104,7 @@ export class TokenVerifier {
|
|
|
104
104
|
}
|
|
105
105
|
catch (error) {
|
|
106
106
|
if (axios.isAxiosError(error)) {
|
|
107
|
-
throw new Error(`Token introspection failed: ${error.response?.data?.error_description || error.message}
|
|
107
|
+
throw new Error(`Token introspection failed: ${error.response?.data?.error_description || error.message}`, { cause: error });
|
|
108
108
|
}
|
|
109
109
|
throw error;
|
|
110
110
|
}
|
|
@@ -150,7 +150,7 @@ export class TokenVerifier {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
catch (error) {
|
|
153
|
-
throw new Error(`JWT verification failed: ${error instanceof Error ? error.message : 'Unknown error'}
|
|
153
|
+
throw new Error(`JWT verification failed: ${error instanceof Error ? error.message : 'Unknown error'}`, { cause: error });
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
/**
|
package/build/server-http.js
CHANGED
|
@@ -429,6 +429,11 @@ function mountEnvRouter(hardcodedEnv, serverUrl, iconBaseUrl) {
|
|
|
429
429
|
const storedTokens = validationRunnerUserId
|
|
430
430
|
? await authStore.getUserTokens(validationRunnerUserId, environment)
|
|
431
431
|
: null;
|
|
432
|
+
const socialConfig = {
|
|
433
|
+
hasTwitterBearerToken: Boolean(process.env.TWITTER_BEARER_TOKEN?.trim()),
|
|
434
|
+
hasYoutubeApiKey: Boolean(process.env.YOUTUBE_API_KEY?.trim()),
|
|
435
|
+
hasRedditUserAgent: Boolean(process.env.REDDIT_USER_AGENT?.trim()),
|
|
436
|
+
};
|
|
432
437
|
let authenticated = false;
|
|
433
438
|
let authError = null;
|
|
434
439
|
let tokenStatus = null;
|
|
@@ -467,7 +472,7 @@ function mountEnvRouter(hardcodedEnv, serverUrl, iconBaseUrl) {
|
|
|
467
472
|
});
|
|
468
473
|
}
|
|
469
474
|
}
|
|
470
|
-
|
|
475
|
+
const healthResponse = {
|
|
471
476
|
status: authenticated ? 'ok' : 'degraded',
|
|
472
477
|
environment,
|
|
473
478
|
validationRunnerUserId,
|
|
@@ -479,9 +484,21 @@ function mountEnvRouter(hardcodedEnv, serverUrl, iconBaseUrl) {
|
|
|
479
484
|
ebay: { available: true, implemented: true, confidence: 'medium' },
|
|
480
485
|
social: { available: false, implemented: false, confidence: 'low' },
|
|
481
486
|
chart: { available: false, implemented: false, confidence: 'low' },
|
|
487
|
+
socialConfig,
|
|
482
488
|
},
|
|
483
489
|
...(authError ? { authError } : {}),
|
|
490
|
+
};
|
|
491
|
+
serverLogger.info('Validation health response emitted', {
|
|
492
|
+
environment,
|
|
493
|
+
path: req.originalUrl,
|
|
494
|
+
status: healthResponse.status,
|
|
495
|
+
version: getVersion(),
|
|
496
|
+
hasSocialConfigAtRoot: Object.prototype.hasOwnProperty.call(healthResponse, 'socialConfig'),
|
|
497
|
+
hasSocialConfigUnderProviders: Object.prototype.hasOwnProperty.call(healthResponse.providers, 'socialConfig'),
|
|
498
|
+
providerKeys: Object.keys(healthResponse.providers),
|
|
499
|
+
socialConfig,
|
|
484
500
|
});
|
|
501
|
+
res.json(healthResponse);
|
|
485
502
|
});
|
|
486
503
|
// ── RFC 8414 – Authorization Server Metadata ──────────────────────────
|
|
487
504
|
// For env-scoped routers: endpoints are relative to the env base URL.
|
package/build/tools/index.js
CHANGED
|
@@ -196,7 +196,7 @@ export async function executeTool(api, toolName, args) {
|
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
catch (error) {
|
|
199
|
-
throw new Error(`Failed to convert date: ${error instanceof Error ? error.message : String(error)}
|
|
199
|
+
throw new Error(`Failed to convert date: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
case 'ebay_validate_token_expiry': {
|
|
@@ -217,7 +217,7 @@ export async function executeTool(api, toolName, args) {
|
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
219
|
catch (error) {
|
|
220
|
-
throw new Error(`Failed to validate token expiry: ${error instanceof Error ? error.message : String(error)}
|
|
220
|
+
throw new Error(`Failed to validate token expiry: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
case 'ebay_set_user_tokens_with_expiry': {
|
|
@@ -272,7 +272,7 @@ export async function executeTool(api, toolName, args) {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
catch (error) {
|
|
275
|
-
throw new Error(`Failed to set user tokens: ${error instanceof Error ? error.message : String(error)}
|
|
275
|
+
throw new Error(`Failed to set user tokens: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
case 'ebay_display_credentials': {
|
|
@@ -370,7 +370,7 @@ export async function executeTool(api, toolName, args) {
|
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
catch (error) {
|
|
373
|
-
throw new Error(`Failed to exchange authorization code: ${error instanceof Error ? error.message : String(error)}
|
|
373
|
+
throw new Error(`Failed to exchange authorization code: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
case 'ebay_refresh_access_token': {
|
|
@@ -401,7 +401,7 @@ export async function executeTool(api, toolName, args) {
|
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
catch (error) {
|
|
404
|
-
throw new Error(`Failed to refresh access token: ${error instanceof Error ? error.message : String(error)}
|
|
404
|
+
throw new Error(`Failed to refresh access token: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
// Account Management
|