ebay-api 9.4.3 → 10.0.0-RC.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 +33 -2
- package/dist/api/restful/buy/browse/index.d.ts +1 -4
- package/dist/api/restful/buy/browse/index.js +0 -9
- package/dist/api/restful/buy/feed/index.d.ts +1 -0
- package/dist/api/restful/buy/feed/index.js +8 -0
- package/dist/api/restful/buy/marketing/index.d.ts +1 -3
- package/dist/api/restful/buy/marketing/index.js +0 -10
- package/dist/api/restful/buy/order/index.d.ts +1 -1
- package/dist/api/restful/buy/order/index.js +1 -1
- package/dist/api/restful/commerce/media/index.d.ts +8 -1
- package/dist/api/restful/commerce/media/index.js +24 -0
- package/dist/api/restful/commerce/notification/index.d.ts +5 -2
- package/dist/api/restful/commerce/notification/index.js +15 -1
- package/dist/api/restful/commerce/taxonomy/index.d.ts +1 -0
- package/dist/api/restful/commerce/taxonomy/index.js +4 -0
- package/dist/api/restful/sell/compliance/index.d.ts +0 -2
- package/dist/api/restful/sell/compliance/index.js +0 -3
- package/dist/api/restful/sell/feed/index.d.ts +7 -7
- package/dist/api/restful/sell/finances/index.d.ts +1 -1
- package/dist/api/restful/sell/listing/index.d.ts +2 -1
- package/dist/api/restful/sell/logistics/index.d.ts +6 -5
- package/dist/api/restful/sell/marketing/index.d.ts +4 -1
- package/dist/api/restful/sell/marketing/index.js +10 -0
- package/dist/api/restful/sell/metadata/index.d.ts +15 -0
- package/dist/api/restful/sell/metadata/index.js +65 -0
- package/dist/api/restful/sell/negotiation/index.d.ts +2 -1
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/types/restful/specs/buy_browse_v1_oas3.d.ts +239 -655
- package/dist/types/restful/specs/buy_deal_v1_oas3.d.ts +34 -171
- package/dist/types/restful/specs/buy_feed_v1_beta_oas3.d.ts +146 -217
- package/dist/types/restful/specs/buy_marketing_v1_beta_oas3.d.ts +19 -208
- package/dist/types/restful/specs/buy_offer_v1_beta_oas3.d.ts +13 -84
- package/dist/types/restful/specs/buy_order_v2_oas3.d.ts +470 -0
- package/dist/types/restful/specs/commerce_catalog_v1_beta_oas3.d.ts +37 -562
- package/dist/types/restful/specs/commerce_charity_v1_oas3.d.ts +10 -130
- package/dist/types/restful/specs/commerce_identity_v1_oas3.d.ts +6 -39
- package/dist/types/restful/specs/commerce_media_v1_beta_oas3.d.ts +209 -132
- package/dist/types/restful/specs/commerce_notification_v1_oas3.d.ts +272 -716
- package/dist/types/restful/specs/commerce_taxonomy_v1_oas3.d.ts +77 -339
- package/dist/types/restful/specs/commerce_translation_v1_beta_oas3.d.ts +11 -38
- package/dist/types/restful/specs/developer_analytics_v1_beta_oas3.d.ts +24 -91
- package/dist/types/restful/specs/developer_key_management_v1_oas3.d.ts +21 -132
- package/dist/types/restful/specs/sell_account_v1_oas3.d.ts +193 -1696
- package/dist/types/restful/specs/sell_compliance_v1_oas3.d.ts +21 -148
- package/dist/types/restful/specs/sell_feed_v1_oas3.d.ts +122 -902
- package/dist/types/restful/specs/sell_finances_v1_oas3.d.ts +99 -275
- package/dist/types/restful/specs/sell_inventory_v1_oas3.d.ts +212 -1257
- package/dist/types/restful/specs/sell_logistics_v1_oas3.d.ts +77 -281
- package/dist/types/restful/specs/sell_marketing_v1_oas3.d.ts +563 -3197
- package/dist/types/restful/specs/sell_metadata_v1_oas3.d.ts +709 -330
- package/dist/types/restful/specs/sell_negotiation_v1_oas3.d.ts +15 -82
- package/dist/types/restful/specs/sell_recommendation_v1_oas3.d.ts +10 -43
- package/dist/types/restfulTypes.d.ts +33 -14
- package/lib/api/restful/buy/browse/index.d.ts +1 -4
- package/lib/api/restful/buy/browse/index.js +0 -9
- package/lib/api/restful/buy/feed/index.d.ts +1 -0
- package/lib/api/restful/buy/feed/index.js +8 -0
- package/lib/api/restful/buy/marketing/index.d.ts +1 -3
- package/lib/api/restful/buy/marketing/index.js +0 -10
- package/lib/api/restful/buy/order/index.d.ts +1 -1
- package/lib/api/restful/buy/order/index.js +1 -1
- package/lib/api/restful/commerce/media/index.d.ts +8 -1
- package/lib/api/restful/commerce/media/index.js +24 -0
- package/lib/api/restful/commerce/notification/index.d.ts +5 -2
- package/lib/api/restful/commerce/notification/index.js +15 -1
- package/lib/api/restful/commerce/taxonomy/index.d.ts +1 -0
- package/lib/api/restful/commerce/taxonomy/index.js +4 -0
- package/lib/api/restful/sell/compliance/index.d.ts +0 -2
- package/lib/api/restful/sell/compliance/index.js +0 -3
- package/lib/api/restful/sell/feed/index.d.ts +7 -7
- package/lib/api/restful/sell/finances/index.d.ts +1 -1
- package/lib/api/restful/sell/listing/index.d.ts +2 -1
- package/lib/api/restful/sell/logistics/index.d.ts +6 -5
- package/lib/api/restful/sell/marketing/index.d.ts +4 -1
- package/lib/api/restful/sell/marketing/index.js +10 -0
- package/lib/api/restful/sell/metadata/index.d.ts +15 -0
- package/lib/api/restful/sell/metadata/index.js +65 -0
- package/lib/api/restful/sell/negotiation/index.d.ts +2 -1
- package/lib/ebay-api.min.js +1 -1
- package/lib/types/restful/specs/buy_browse_v1_oas3.d.ts +239 -655
- package/lib/types/restful/specs/buy_deal_v1_oas3.d.ts +34 -171
- package/lib/types/restful/specs/buy_feed_v1_beta_oas3.d.ts +146 -217
- package/lib/types/restful/specs/buy_marketing_v1_beta_oas3.d.ts +19 -208
- package/lib/types/restful/specs/buy_offer_v1_beta_oas3.d.ts +13 -84
- package/lib/types/restful/specs/buy_order_v2_oas3.d.ts +470 -0
- package/lib/types/restful/specs/commerce_catalog_v1_beta_oas3.d.ts +37 -562
- package/lib/types/restful/specs/commerce_charity_v1_oas3.d.ts +10 -130
- package/lib/types/restful/specs/commerce_identity_v1_oas3.d.ts +6 -39
- package/lib/types/restful/specs/commerce_media_v1_beta_oas3.d.ts +209 -132
- package/lib/types/restful/specs/commerce_notification_v1_oas3.d.ts +272 -716
- package/lib/types/restful/specs/commerce_taxonomy_v1_oas3.d.ts +77 -339
- package/lib/types/restful/specs/commerce_translation_v1_beta_oas3.d.ts +11 -38
- package/lib/types/restful/specs/developer_analytics_v1_beta_oas3.d.ts +24 -91
- package/lib/types/restful/specs/developer_key_management_v1_oas3.d.ts +21 -132
- package/lib/types/restful/specs/sell_account_v1_oas3.d.ts +193 -1696
- package/lib/types/restful/specs/sell_compliance_v1_oas3.d.ts +21 -148
- package/lib/types/restful/specs/sell_feed_v1_oas3.d.ts +122 -902
- package/lib/types/restful/specs/sell_finances_v1_oas3.d.ts +99 -275
- package/lib/types/restful/specs/sell_inventory_v1_oas3.d.ts +212 -1257
- package/lib/types/restful/specs/sell_logistics_v1_oas3.d.ts +77 -281
- package/lib/types/restful/specs/sell_marketing_v1_oas3.d.ts +563 -3197
- package/lib/types/restful/specs/sell_metadata_v1_oas3.d.ts +709 -330
- package/lib/types/restful/specs/sell_negotiation_v1_oas3.d.ts +15 -82
- package/lib/types/restful/specs/sell_recommendation_v1_oas3.d.ts +10 -43
- package/lib/types/restfulTypes.d.ts +33 -14
- package/package.json +2 -1
- package/dist/types/restful/specs/buy_order_v1_beta_oas3.d.ts +0 -2400
- package/lib/types/restful/specs/buy_order_v1_beta_oas3.d.ts +0 -2400
- /package/dist/types/restful/specs/{buy_order_v1_beta_oas3.js → buy_order_v2_oas3.js} +0 -0
- /package/lib/types/restful/specs/{buy_order_v1_beta_oas3.js → buy_order_v2_oas3.js} +0 -0
package/README.md
CHANGED
|
@@ -38,9 +38,35 @@ It supports `client credentials grant` and `authorization code grant` \(Auth'N'A
|
|
|
38
38
|
|
|
39
39
|
## 🚀 Quick Start
|
|
40
40
|
|
|
41
|
+
* `v10.0.0-RC.0` is the latest release.
|
|
42
|
+
* See [here](https://github.com/hendt/ebay-api/blob/master/CHANGELOG.md) for the full changelog.
|
|
43
|
+
|
|
41
44
|
Sign up for an API key here: [Developer Account](https://developer.ebay.com/signin?tab=register).
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
## Implementation status
|
|
47
|
+
|
|
48
|
+
### RESTful API
|
|
49
|
+
|
|
50
|
+
| API | Implemented |
|
|
51
|
+
|:-------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
52
|
+
| **Buy API** | ✔ Browse API `v1.20.2`<br>✔ Deal API `v1.3.0`<br>✔ Feed API `v1_beta.35.2`<br>✔ Marketing API `v1_beta.2.0`<br>✔ Offer API `v1_beta.0.1`<br>✔ Order API `v2.1.2`<br>✔ Marketplace Insights API `v1_beta.2.2` |
|
|
53
|
+
| **Commerce API** | ✔ Catalog API `v1_beta.5.2`<br>✔ Charity API `v1.2.1`<br>✔ Identity API `v2.0.0`<br>✔ Notification API `v1.6.1`<br>✔ Taxonomy API `v1.1.1`<br>✔ Translation API `v1_beta.1.6`<br>✔ Media API `v1_beta.4.0` |
|
|
54
|
+
| **Developer API** | ✔ Analytics API `v1_beta.0.1`<br>✔ Key Management API `v1.0.0` |
|
|
55
|
+
| **Post Order API** | ✔ Cancellation API<br>✔ Case Management API<br>✔ Inquiry API<br>✔ Return API |
|
|
56
|
+
| **Sell API** | ✔ Account API `v1.9.2`<br>✔ Analytics API `v1.3.2`<br>✔ Compliance API `v1.4.4`<br>✔ Feed API `v1.3.1`<br>✔ Finance API `v1.17.3`<br>✔ Fulfillment API `v1.20.7`<br>✔ Inventory API `v1.18.4`<br>✔ Listing API `v1_beta.2.1`<br>✔ Logistics API `v1_beta.0.0`<br>✔ Marketing API `v1.22.2`<br>✔ Metadata API `v1.11.1`<br>✔ Negotiation API `v1.1.0`<br>✔ Recommendation API `v1.1.0` |
|
|
57
|
+
|
|
58
|
+
### Traditional API
|
|
59
|
+
|
|
60
|
+
| API | Implemented |
|
|
61
|
+
|:----------------------|:------------|
|
|
62
|
+
| **Finding API** | ✔ |
|
|
63
|
+
| **Shopping API** | ✔ |
|
|
64
|
+
| **Merchandising API** | ✔ |
|
|
65
|
+
| **Trading API** | ✔ |
|
|
66
|
+
| **Client Alerts API** | ✔ |
|
|
67
|
+
| **Feedback API** | ✔ |
|
|
68
|
+
|
|
69
|
+
## Install
|
|
44
70
|
|
|
45
71
|
```bash
|
|
46
72
|
npm install ebay-api
|
|
@@ -75,7 +101,7 @@ For more examples, check out the [examples directory](./examples).
|
|
|
75
101
|
|
|
76
102
|
## Changelog
|
|
77
103
|
|
|
78
|
-
* `
|
|
104
|
+
* `v10.0.0-RC.1` is the latest release.
|
|
79
105
|
* See [here](https://github.com/hendt/ebay-api/blob/master/CHANGELOG.md) for the full changelog.
|
|
80
106
|
|
|
81
107
|
## Implementation status
|
|
@@ -478,6 +504,9 @@ eBay.trading.AddFixedPriceItem({
|
|
|
478
504
|
|
|
479
505
|
### Low level: use the Axios interceptor to manipulate the request
|
|
480
506
|
|
|
507
|
+
## Add extra headers
|
|
508
|
+
If you want to add a header to every request you can use the Axios interceptor.
|
|
509
|
+
|
|
481
510
|
```typescript
|
|
482
511
|
import eBayApi from 'ebay-api';
|
|
483
512
|
|
|
@@ -490,6 +519,7 @@ eBay.req.instance.interceptors.request.use((request) => {
|
|
|
490
519
|
});
|
|
491
520
|
```
|
|
492
521
|
|
|
522
|
+
|
|
493
523
|
### Handle JSON GZIP response e.g fetchItemAspects
|
|
494
524
|
|
|
495
525
|
You need a decompress library installed like `zlib`.
|
|
@@ -734,6 +764,7 @@ and [Node Example here](https://github.com/hendt/ebay-api/blob/master/examples/t
|
|
|
734
764
|
4. itemAffiliateWebUrl is missing in eBay.buy.browse.search call
|
|
735
765
|
You have to set `endUserCtx`.
|
|
736
766
|
|
|
767
|
+
|
|
737
768
|
## Contribution
|
|
738
769
|
|
|
739
770
|
Check [here](https://github.com/hendt/ebay-api/blob/master/CONTRIBUTING.md)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BuyBrowseGetItemsParams, BuyBrowseItemByLegacyIdParams, BuyBrowseSearchByImageParams, BuyBrowseSearchParams, CompatibilityPayload, SearchByImageRequest } from '../../../../types/index.js';
|
|
2
2
|
import { operations } from '../../../../types/restful/specs/buy_browse_v1_oas3.js';
|
|
3
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
4
|
export default class Browse extends Restful implements OpenApi<operations> {
|
|
@@ -11,8 +11,5 @@ export default class Browse extends Restful implements OpenApi<operations> {
|
|
|
11
11
|
getItemByLegacyId(params: BuyBrowseItemByLegacyIdParams): Promise<any>;
|
|
12
12
|
getItemsByItemGroup(itemGroupId: string): Promise<any>;
|
|
13
13
|
checkCompatibility(itemId: string, body?: CompatibilityPayload): Promise<any>;
|
|
14
|
-
addItem(item: AddCartItemInput): Promise<any>;
|
|
15
14
|
getShoppingCart(): Promise<any>;
|
|
16
|
-
removeItem(item: RemoveCartItemInput): Promise<any>;
|
|
17
|
-
updateQuantity(item: UpdateCartItemInput): Promise<any>;
|
|
18
15
|
}
|
|
@@ -42,18 +42,9 @@ class Browse extends Restful {
|
|
|
42
42
|
const id = encodeURIComponent(itemId);
|
|
43
43
|
return this.post(`/item/${id}/check_compatibility`, body);
|
|
44
44
|
}
|
|
45
|
-
addItem(item) {
|
|
46
|
-
return this.post('/shopping_cart/add_item', item);
|
|
47
|
-
}
|
|
48
45
|
getShoppingCart() {
|
|
49
46
|
return this.get('/shopping_cart/');
|
|
50
47
|
}
|
|
51
|
-
removeItem(item) {
|
|
52
|
-
return this.post('/shopping_cart/remove_item', item);
|
|
53
|
-
}
|
|
54
|
-
updateQuantity(item) {
|
|
55
|
-
return this.post('/shopping_cart/update_quantity', item);
|
|
56
|
-
}
|
|
57
48
|
}
|
|
58
49
|
Browse.id = 'Browse';
|
|
59
50
|
export default Browse;
|
|
@@ -8,4 +8,5 @@ export default class Feed extends Restful implements OpenApi<operations> {
|
|
|
8
8
|
getItemGroupFeed(params: BuyFeedParams, range: string): Promise<any>;
|
|
9
9
|
getItemSnapshotFeed(params: BuyFeedParams, snapshotDate: string, range: string): Promise<any>;
|
|
10
10
|
getProductFeed(params: BuyFeedParams, snapshotDate: string, range: string): Promise<any>;
|
|
11
|
+
getItemPriorityFeed(params: BuyFeedParams, range: string): Promise<any>;
|
|
11
12
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BuyMarketingGetMerchandisedProductsParams } from '../../../../types/index.js';
|
|
2
2
|
import { operations } from '../../../../types/restful/specs/buy_marketing_v1_beta_oas3.js';
|
|
3
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
4
|
export default class Marketing extends Restful implements OpenApi<operations> {
|
|
5
5
|
static id: string;
|
|
6
6
|
get basePath(): string;
|
|
7
|
-
getAlsoBoughtByProduct(params: BuyMarketingGetAlsoBoughtByProductParams): Promise<any>;
|
|
8
|
-
getAlsoViewedByProduct(params: BuyMarketingGetAlsoViewedByProductParams): Promise<any>;
|
|
9
7
|
getMerchandisedProducts(params: BuyMarketingGetMerchandisedProductsParams): Promise<any>;
|
|
10
8
|
}
|
|
@@ -3,16 +3,6 @@ class Marketing extends Restful {
|
|
|
3
3
|
get basePath() {
|
|
4
4
|
return '/buy/marketing/v1_beta';
|
|
5
5
|
}
|
|
6
|
-
getAlsoBoughtByProduct(params) {
|
|
7
|
-
return this.get('/merchandised_product/get_also_bought_products', {
|
|
8
|
-
params
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
getAlsoViewedByProduct(params) {
|
|
12
|
-
return this.get('/merchandised_product/get_also_viewed_products', {
|
|
13
|
-
params
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
6
|
getMerchandisedProducts(params) {
|
|
17
7
|
return this.get('/merchandised_product', {
|
|
18
8
|
params
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CheckoutSessionRequestWithoutPayment, CouponRequest, CreateGuestCheckoutSessionRequest, CreateSignInCheckoutSessionRequest, GuestPlaceOrderRequest, InitiatePaymentRequest, ShippingAddressImpl, UpdatePaymentInformation, UpdateQuantity, UpdateShippingOption } from '../../../../types/index.js';
|
|
2
|
-
import { operations } from '../../../../types/restful/specs/
|
|
2
|
+
import { operations } from '../../../../types/restful/specs/buy_order_v2_oas3.js';
|
|
3
3
|
import Api, { OpenApi } from '../../index.js';
|
|
4
4
|
export default class Order extends Api implements OpenApi<operations> {
|
|
5
5
|
static id: string;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { CreateVideoRequest, InputStream } from '../../../../types/index.js';
|
|
1
|
+
import { CreateVideoRequest, InputStream, CreateImageFromUrlRequest, CreateDocumentRequest, CreateDocumentFromUrlRequest } from '../../../../types/index.js';
|
|
2
2
|
import { operations } from '../../../../types/restful/specs/commerce_media_v1_beta_oas3.js';
|
|
3
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
4
|
export default class Media extends Restful implements OpenApi<operations> {
|
|
5
5
|
static id: string;
|
|
6
6
|
get basePath(): string;
|
|
7
7
|
get subdomain(): string;
|
|
8
|
+
createImageFromFile(body?: any): Promise<any>;
|
|
9
|
+
createImageFromUrl(body?: CreateImageFromUrlRequest): Promise<any>;
|
|
10
|
+
getImage(imageId: string): Promise<any>;
|
|
8
11
|
createVideo(body?: CreateVideoRequest): Promise<any>;
|
|
9
12
|
getVideo(videoId: string): Promise<any>;
|
|
10
13
|
uploadVideo(videoId: string, body?: InputStream): Promise<any>;
|
|
14
|
+
createDocument(body?: CreateDocumentRequest): Promise<any>;
|
|
15
|
+
createDocumentFromUrl(body?: CreateDocumentFromUrlRequest): Promise<any>;
|
|
16
|
+
getDocument(documentId: string): Promise<any>;
|
|
17
|
+
uploadDocument(documentId: string, body?: any): Promise<any>;
|
|
11
18
|
}
|
|
@@ -6,6 +6,16 @@ class Media extends Restful {
|
|
|
6
6
|
get subdomain() {
|
|
7
7
|
return 'apim';
|
|
8
8
|
}
|
|
9
|
+
async createImageFromFile(body) {
|
|
10
|
+
return this.post('/image/create_image_from_file', body);
|
|
11
|
+
}
|
|
12
|
+
async createImageFromUrl(body) {
|
|
13
|
+
return this.post('/image/create_image_from_url', body);
|
|
14
|
+
}
|
|
15
|
+
async getImage(imageId) {
|
|
16
|
+
imageId = encodeURIComponent(imageId);
|
|
17
|
+
return this.get(`/image/${imageId}`);
|
|
18
|
+
}
|
|
9
19
|
async createVideo(body) {
|
|
10
20
|
return this.post('/video', body);
|
|
11
21
|
}
|
|
@@ -18,6 +28,20 @@ class Media extends Restful {
|
|
|
18
28
|
videoId = encodeURIComponent(videoId);
|
|
19
29
|
return this.post(`/video/${videoId}/upload`, body);
|
|
20
30
|
}
|
|
31
|
+
async createDocument(body) {
|
|
32
|
+
return this.post('/document', body);
|
|
33
|
+
}
|
|
34
|
+
async createDocumentFromUrl(body) {
|
|
35
|
+
return this.post('/document/create_document_from_url', body);
|
|
36
|
+
}
|
|
37
|
+
async getDocument(documentId) {
|
|
38
|
+
documentId = encodeURIComponent(documentId);
|
|
39
|
+
return this.get(`/document/${documentId}`);
|
|
40
|
+
}
|
|
41
|
+
async uploadDocument(documentId, body) {
|
|
42
|
+
documentId = encodeURIComponent(documentId);
|
|
43
|
+
return this.post(`/document/${documentId}/upload`, body);
|
|
44
|
+
}
|
|
21
45
|
}
|
|
22
46
|
Media.id = 'Media';
|
|
23
47
|
export default Media;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommerceNotificationConfig, CreateSubscriptionRequest, DestinationRequest, NotificationParams, UpdateSubscriptionRequest } from '../../../../types/index.js';
|
|
1
|
+
import { CommerceNotificationConfig, CreateSubscriptionRequest, DestinationRequest, NotificationParams, UpdateSubscriptionRequest, CreateSubscriptionFilterRequest } from '../../../../types/index.js';
|
|
2
2
|
import { operations } from '../../../../types/restful/specs/commerce_notification_v1_oas3.js';
|
|
3
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
4
|
export default class Notification extends Restful implements OpenApi<operations> {
|
|
@@ -14,7 +14,10 @@ export default class Notification extends Restful implements OpenApi<operations>
|
|
|
14
14
|
deleteSubscription(subscriptionId: string): Promise<any>;
|
|
15
15
|
enableSubscription(subscriptionId: string): Promise<any>;
|
|
16
16
|
disableSubscription(subscriptionId: string): Promise<any>;
|
|
17
|
-
|
|
17
|
+
createSubscriptionFilter(subscriptionId: string, body?: CreateSubscriptionFilterRequest): Promise<any>;
|
|
18
|
+
getSubscriptionFilter(subscriptionId: string, filterId: string): Promise<any>;
|
|
19
|
+
deleteSubscriptionFilter(subscriptionId: string, filterId: string): Promise<any>;
|
|
20
|
+
testSubscription(subscriptionId: string): Promise<any>;
|
|
18
21
|
getDestinations({ limit, continuationToken: continuation_token }: NotificationParams): Promise<any>;
|
|
19
22
|
createDestination(body: DestinationRequest): Promise<any>;
|
|
20
23
|
getDestination(destinationId: string): Promise<any>;
|
|
@@ -50,7 +50,21 @@ class Notification extends Restful {
|
|
|
50
50
|
subscriptionId = encodeURIComponent(subscriptionId);
|
|
51
51
|
return this.post(`/subscription/${subscriptionId}/disable`);
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
createSubscriptionFilter(subscriptionId, body) {
|
|
54
|
+
subscriptionId = encodeURIComponent(subscriptionId);
|
|
55
|
+
return this.post(`/subscription/${subscriptionId}/filter`, body);
|
|
56
|
+
}
|
|
57
|
+
getSubscriptionFilter(subscriptionId, filterId) {
|
|
58
|
+
subscriptionId = encodeURIComponent(subscriptionId);
|
|
59
|
+
filterId = encodeURIComponent(filterId);
|
|
60
|
+
return this.get(`/subscription/${subscriptionId}/filter/${filterId}`);
|
|
61
|
+
}
|
|
62
|
+
deleteSubscriptionFilter(subscriptionId, filterId) {
|
|
63
|
+
subscriptionId = encodeURIComponent(subscriptionId);
|
|
64
|
+
filterId = encodeURIComponent(filterId);
|
|
65
|
+
return this.delete(`/subscription/${subscriptionId}/filter/${filterId}`);
|
|
66
|
+
}
|
|
67
|
+
testSubscription(subscriptionId) {
|
|
54
68
|
subscriptionId = encodeURIComponent(subscriptionId);
|
|
55
69
|
return this.post(`/subscription/${subscriptionId}/test`);
|
|
56
70
|
}
|
|
@@ -11,4 +11,5 @@ export default class Taxonomy extends Restful implements OpenApi<operations> {
|
|
|
11
11
|
getCompatibilityProperties(categoryTreeId: string, categoryId: string): Promise<any>;
|
|
12
12
|
getCompatibilityPropertyValues(categoryTreeId: string, categoryId: string, compatibilityProperty: string, filter?: string): Promise<any>;
|
|
13
13
|
fetchItemAspects(categoryTreeId: string): Promise<Buffer>;
|
|
14
|
+
getExpiredCategories(categoryTreeId: string): Promise<any>;
|
|
14
15
|
}
|
|
@@ -61,6 +61,10 @@ class Taxonomy extends Restful {
|
|
|
61
61
|
responseType: 'arraybuffer'
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
+
getExpiredCategories(categoryTreeId) {
|
|
65
|
+
categoryTreeId = encodeURIComponent(categoryTreeId);
|
|
66
|
+
return this.get(`/category_tree/${categoryTreeId}/get_expired_categories`);
|
|
67
|
+
}
|
|
64
68
|
}
|
|
65
69
|
Taxonomy.id = 'Taxonomy';
|
|
66
70
|
export default Taxonomy;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SuppressViolationRequest } from '../../../../types/index.js';
|
|
2
1
|
import { operations } from '../../../../types/restful/specs/sell_compliance_v1_oas3.js';
|
|
3
2
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
3
|
export default class Compliance extends Restful implements OpenApi<operations> {
|
|
@@ -11,5 +10,4 @@ export default class Compliance extends Restful implements OpenApi<operations> {
|
|
|
11
10
|
listingId?: string;
|
|
12
11
|
limit?: number;
|
|
13
12
|
}): Promise<any>;
|
|
14
|
-
suppressViolation(body: SuppressViolationRequest): Promise<any>;
|
|
15
13
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SellFeedParams } from '../../../../types/index.js';
|
|
1
|
+
import { SellFeedParams, CreateOrderTaskRequest, CreateInventoryTaskRequest, CreateUserScheduleRequest, UpdateUserScheduleRequest, CreateTaskRequest, CreateServiceMetricsTaskRequest } from '../../../../types/index.js';
|
|
2
2
|
import { operations } from '../../../../types/restful/specs/sell_feed_v1_oas3.js';
|
|
3
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
4
|
export default class Feed extends Restful implements OpenApi<operations> {
|
|
5
5
|
static id: string;
|
|
6
6
|
get basePath(): string;
|
|
7
7
|
getOrderTasks({ dateRange, feedType, limit, lookBackDays, offset, scheduleId }?: SellFeedParams): Promise<any>;
|
|
8
|
-
createOrderTask(data:
|
|
8
|
+
createOrderTask(data: CreateOrderTaskRequest): Promise<any>;
|
|
9
9
|
getOrderTask(taskId: string): Promise<any>;
|
|
10
10
|
getInventoryTasks({ feedType, scheduleId, lookBackDays, dateRange, limit, offset }?: {
|
|
11
11
|
feedType?: string;
|
|
@@ -15,23 +15,23 @@ export default class Feed extends Restful implements OpenApi<operations> {
|
|
|
15
15
|
limit?: number;
|
|
16
16
|
offset?: number;
|
|
17
17
|
}): Promise<any>;
|
|
18
|
-
createInventoryTask(data:
|
|
18
|
+
createInventoryTask(data: CreateInventoryTaskRequest): Promise<any>;
|
|
19
19
|
getInventoryTask(taskId: string): Promise<any>;
|
|
20
20
|
getSchedules({ feedType, limit, offset }?: SellFeedParams): Promise<any>;
|
|
21
|
-
createSchedule(data:
|
|
21
|
+
createSchedule(data: CreateUserScheduleRequest): Promise<any>;
|
|
22
22
|
getSchedule(scheduleId: string): Promise<any>;
|
|
23
|
-
updateSchedule(scheduleId: string, data?:
|
|
23
|
+
updateSchedule(scheduleId: string, data?: UpdateUserScheduleRequest): Promise<any>;
|
|
24
24
|
deleteSchedule(scheduleId: string): Promise<any>;
|
|
25
25
|
getLatestResultFile(scheduleId: string): Promise<any>;
|
|
26
26
|
getScheduleTemplate(scheduleTemplateId: string): Promise<any>;
|
|
27
27
|
getScheduleTemplates({ feedType, limit, offset }?: SellFeedParams): Promise<any>;
|
|
28
28
|
getTasks({ dateRange, feedType, limit, lookBackDays, offset, scheduleId }?: SellFeedParams): Promise<any>;
|
|
29
|
-
createTask(data:
|
|
29
|
+
createTask(data: CreateTaskRequest): Promise<any>;
|
|
30
30
|
getInputFile(taskId: string): Promise<any>;
|
|
31
31
|
getResultFile(taskId: string): Promise<any>;
|
|
32
32
|
getTask(taskId: string): Promise<any>;
|
|
33
33
|
uploadFile(taskId: string, data?: any): Promise<any>;
|
|
34
34
|
getCustomerServiceMetricTasks({ dateRange, feedType, limit, lookBackDays, offset }?: SellFeedParams): Promise<any>;
|
|
35
|
-
createCustomerServiceMetricTask(acceptLanguage: string, data:
|
|
35
|
+
createCustomerServiceMetricTask(acceptLanguage: string, data: CreateServiceMetricsTaskRequest): Promise<any>;
|
|
36
36
|
getCustomerServiceMetricTask(taskId: string): Promise<any>;
|
|
37
37
|
}
|
|
@@ -15,7 +15,7 @@ export default class Finances extends Restful implements OpenApi<operations> {
|
|
|
15
15
|
filter?: string;
|
|
16
16
|
}): Promise<any>;
|
|
17
17
|
getTransactions({ filter, limit, offset, sort }?: {
|
|
18
|
-
filter?: string;
|
|
18
|
+
filter?: string | string[];
|
|
19
19
|
limit?: number;
|
|
20
20
|
offset?: number;
|
|
21
21
|
sort?: 'transactionDate' | '-transactionDate';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { ItemDraft } from '../../../../types/index.js';
|
|
1
2
|
import { operations } from '../../../../types/restful/specs/sell_listing_v1_beta_oas3.js';
|
|
2
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
3
4
|
export default class Listing extends Restful implements OpenApi<operations> {
|
|
4
5
|
static id: string;
|
|
5
6
|
get basePath(): string;
|
|
6
|
-
createItemDraft(data?:
|
|
7
|
+
createItemDraft(data?: ItemDraft): Promise<any>;
|
|
7
8
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { ShippingQuoteRequest, CreateShipmentFromQuoteRequest } from '../../../../types/index.js';
|
|
1
2
|
import { operations } from '../../../../types/restful/specs/sell_logistics_v1_oas3.js';
|
|
2
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
3
4
|
export default class Logistics extends Restful implements OpenApi<operations> {
|
|
4
5
|
static id: string;
|
|
5
6
|
get basePath(): string;
|
|
6
|
-
createShippingQuote(data:
|
|
7
|
+
createShippingQuote(data: ShippingQuoteRequest): Promise<any>;
|
|
7
8
|
getShippingQuote(shippingQuoteId: string): Promise<any>;
|
|
8
|
-
createFromShippingQuote(data:
|
|
9
|
-
getShipment(shipmentId:
|
|
10
|
-
downloadLabelFile(shipmentId:
|
|
11
|
-
cancelShipment(shipmentId:
|
|
9
|
+
createFromShippingQuote(data: CreateShipmentFromQuoteRequest): Promise<any>;
|
|
10
|
+
getShipment(shipmentId: string): Promise<any>;
|
|
11
|
+
downloadLabelFile(shipmentId: string): Promise<any>;
|
|
12
|
+
cancelShipment(shipmentId: string): Promise<any>;
|
|
12
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkCreateKeywordRequest, BulkCreateNegativeKeywordRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, BulkUpdateAdStatusByListingIdRequest, BulkUpdateAdStatusRequest, BulkUpdateKeywordRequest, BulkUpdateNegativeKeywordRequest, CloneCampaignRequest, CreateAdGroupRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateEmailCampaignRequest, CreateKeywordRequest, CreateNegativeKeywordRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, QuickSetupRequest, TargetedBidRequest, TargetedKeywordRequest, UpdateAdGroupRequest, UpdateAdrateStrategyRequest, UpdateBidPercentageRequest, UpdateCampaignBudgetRequest, UpdateCampaignIdentificationRequest, UpdateCampaignRequest, UpdateKeywordRequest, UpdateNegativeKeywordRequest } from '../../../../types/index.js';
|
|
1
|
+
import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkCreateKeywordRequest, BulkCreateNegativeKeywordRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, BulkUpdateAdStatusByListingIdRequest, BulkUpdateAdStatusRequest, BulkUpdateKeywordRequest, BulkUpdateNegativeKeywordRequest, CloneCampaignRequest, CreateAdGroupRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateEmailCampaignRequest, CreateKeywordRequest, CreateNegativeKeywordRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, QuickSetupRequest, TargetedBidRequest, TargetedKeywordRequest, UpdateAdGroupRequest, UpdateAdrateStrategyRequest, UpdateBidPercentageRequest, UpdateCampaignBudgetRequest, UpdateCampaignIdentificationRequest, UpdateCampaignRequest, UpdateKeywordRequest, UpdateNegativeKeywordRequest, SuggestMaxCpcRequest, UpdateBiddingStrategyRequest } from '../../../../types/index.js';
|
|
2
2
|
import { operations } from '../../../../types/restful/specs/sell_marketing_v1_oas3.js';
|
|
3
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
4
4
|
export default class Marketing extends Restful implements OpenApi<operations> {
|
|
@@ -145,4 +145,7 @@ export default class Marketing extends Restful implements OpenApi<operations> {
|
|
|
145
145
|
getEmailPreview(emailCampaignId: string): Promise<any>;
|
|
146
146
|
getAudiences(): Promise<any>;
|
|
147
147
|
getEmailReport(startDate: string, endDate: string): Promise<any>;
|
|
148
|
+
suggestBudget(): Promise<any>;
|
|
149
|
+
suggestMaxCpc(body?: SuggestMaxCpcRequest): Promise<any>;
|
|
150
|
+
updateBiddingStrategy(campaignId: string, body?: UpdateBiddingStrategyRequest): Promise<any>;
|
|
148
151
|
}
|
|
@@ -412,6 +412,16 @@ class Marketing extends Restful {
|
|
|
412
412
|
}
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
|
+
suggestBudget() {
|
|
416
|
+
return this.get('/ad_campaign/suggest_budget');
|
|
417
|
+
}
|
|
418
|
+
suggestMaxCpc(body) {
|
|
419
|
+
return this.post('/ad_campaign/suggest_max_cpc', body);
|
|
420
|
+
}
|
|
421
|
+
updateBiddingStrategy(campaignId, body) {
|
|
422
|
+
campaignId = encodeURIComponent(campaignId);
|
|
423
|
+
return this.post(`/ad_campaign/${campaignId}/update_bidding_strategy`, body);
|
|
424
|
+
}
|
|
415
425
|
}
|
|
416
426
|
Marketing.id = 'Marketing';
|
|
417
427
|
export default Marketing;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SpecificationRequest, PropertyNamesRequest, PropertyValuesRequest, MultiCompatibilityPropertyValuesRequest, ProductRequest } from '../../../../types/index.js';
|
|
1
2
|
import { operations } from '../../../../types/restful/specs/sell_metadata_v1_oas3.js';
|
|
2
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
3
4
|
export default class Metadata extends Restful implements OpenApi<operations> {
|
|
@@ -12,4 +13,18 @@ export default class Metadata extends Restful implements OpenApi<operations> {
|
|
|
12
13
|
getProductAdoptionPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
13
14
|
getReturnPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
14
15
|
getHazardousMaterialsLabels(marketplaceId: string): Promise<any>;
|
|
16
|
+
getCategoryPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
17
|
+
getClassifiedAdPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
18
|
+
getCurrencies(marketplaceId: string): Promise<any>;
|
|
19
|
+
getListingTypePolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
20
|
+
getMotorsListingPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
21
|
+
getProductSafetyLabels(marketplaceId: string): Promise<any>;
|
|
22
|
+
getRegulatoryPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
23
|
+
getShippingPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
24
|
+
getSiteVisibilityPolicies(marketplaceId: string, filter?: string): Promise<any>;
|
|
25
|
+
getCompatibilitiesBySpecification(body?: SpecificationRequest): Promise<any>;
|
|
26
|
+
getCompatibilityPropertyNames(body?: PropertyNamesRequest): Promise<any>;
|
|
27
|
+
getCompatibilityPropertyValues(body?: PropertyValuesRequest): Promise<any>;
|
|
28
|
+
getMultiCompatibilityPropertyValues(body?: MultiCompatibilityPropertyValuesRequest): Promise<any>;
|
|
29
|
+
getProductCompatibilities(body?: ProductRequest): Promise<any>;
|
|
15
30
|
}
|
|
@@ -67,6 +67,71 @@ class Metadata extends Restful {
|
|
|
67
67
|
marketplaceId = encodeURIComponent(marketplaceId);
|
|
68
68
|
return this.get(`/marketplace/${marketplaceId}/get_hazardous_materials_labels`);
|
|
69
69
|
}
|
|
70
|
+
getCategoryPolicies(marketplaceId, filter) {
|
|
71
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
72
|
+
return this.get(`/marketplace/${marketplaceId}/get_category_policies`, {
|
|
73
|
+
params: { filter }
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
getClassifiedAdPolicies(marketplaceId, filter) {
|
|
77
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
78
|
+
return this.get(`/marketplace/${marketplaceId}/get_classified_ad_policies`, {
|
|
79
|
+
params: { filter }
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
getCurrencies(marketplaceId) {
|
|
83
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
84
|
+
return this.get(`/marketplace/${marketplaceId}/get_currencies`);
|
|
85
|
+
}
|
|
86
|
+
getListingTypePolicies(marketplaceId, filter) {
|
|
87
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
88
|
+
return this.get(`/marketplace/${marketplaceId}/get_listing_type_policies`, {
|
|
89
|
+
params: { filter }
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
getMotorsListingPolicies(marketplaceId, filter) {
|
|
93
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
94
|
+
return this.get(`/marketplace/${marketplaceId}/get_motors_listing_policies`, {
|
|
95
|
+
params: { filter }
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
getProductSafetyLabels(marketplaceId) {
|
|
99
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
100
|
+
return this.get(`/marketplace/${marketplaceId}/get_product_safety_labels`);
|
|
101
|
+
}
|
|
102
|
+
getRegulatoryPolicies(marketplaceId, filter) {
|
|
103
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
104
|
+
return this.get(`/marketplace/${marketplaceId}/get_regulatory_policies`, {
|
|
105
|
+
params: { filter }
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
getShippingPolicies(marketplaceId, filter) {
|
|
109
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
110
|
+
return this.get(`/marketplace/${marketplaceId}/get_shipping_policies`, {
|
|
111
|
+
params: { filter }
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
getSiteVisibilityPolicies(marketplaceId, filter) {
|
|
115
|
+
marketplaceId = encodeURIComponent(marketplaceId);
|
|
116
|
+
return this.get(`/marketplace/${marketplaceId}/get_site_visibility_policies`, {
|
|
117
|
+
params: { filter }
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
getCompatibilitiesBySpecification(body) {
|
|
121
|
+
return this.post('/compatibilities/get_compatibilities_by_specification', body);
|
|
122
|
+
}
|
|
123
|
+
getCompatibilityPropertyNames(body) {
|
|
124
|
+
return this.post('/compatibilities/get_compatibility_property_names', body);
|
|
125
|
+
}
|
|
126
|
+
getCompatibilityPropertyValues(body) {
|
|
127
|
+
return this.post('/compatibilities/get_compatibility_property_values', body);
|
|
128
|
+
}
|
|
129
|
+
getMultiCompatibilityPropertyValues(body) {
|
|
130
|
+
return this.post('/compatibilities/get_multi_compatibility_property_values', body);
|
|
131
|
+
}
|
|
132
|
+
getProductCompatibilities(body) {
|
|
133
|
+
return this.post('/compatibilities/get_product_compatibilities', body);
|
|
134
|
+
}
|
|
70
135
|
}
|
|
71
136
|
Metadata.id = 'Metadata';
|
|
72
137
|
export default Metadata;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CreateOffersRequest } from '../../../../types/index.js';
|
|
1
2
|
import { operations } from '../../../../types/restful/specs/sell_negotiation_v1_oas3.js';
|
|
2
3
|
import Restful, { OpenApi } from '../../index.js';
|
|
3
4
|
export default class Negotiation extends Restful implements OpenApi<operations> {
|
|
@@ -7,5 +8,5 @@ export default class Negotiation extends Restful implements OpenApi<operations>
|
|
|
7
8
|
limit?: string;
|
|
8
9
|
offset?: string;
|
|
9
10
|
}): Promise<any>;
|
|
10
|
-
sendOfferToInterestedBuyers(data:
|
|
11
|
+
sendOfferToInterestedBuyers(data: CreateOffersRequest): Promise<any>;
|
|
11
12
|
}
|