ebay-api 9.2.0-RC.0 → 9.2.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 +2 -2
- package/dist/api/apiFactory.js +3 -2
- package/dist/api/restful/sell/account/{index.d.ts → v1.d.ts} +1 -1
- package/dist/api/restful/sell/account/{index.js → v1.js} +3 -3
- package/dist/api/restful/sell/account/v2.d.ts +11 -0
- package/dist/api/restful/sell/account/v2.js +22 -0
- package/dist/api/restful/sell/index.d.ts +5 -3
- package/dist/api/restful/sell/index.js +3 -2
- package/dist/ebay-api.min.mjs +1 -1
- package/dist/request.d.ts +1 -0
- package/dist/request.js +6 -0
- package/dist/types/restful/specs/sell_account_v2_oas3.d.ts +154 -0
- package/dist/types/restful/specs/sell_account_v2_oas3.js +1 -0
- package/dist/types/restful/specs/sell_fulfillment_v1_oas3.d.ts +82 -3
- package/dist/types/restfulTypes.d.ts +11 -8
- package/lib/api/apiFactory.js +2 -1
- package/lib/api/restful/sell/account/{index.d.ts → v1.d.ts} +1 -1
- package/lib/api/restful/sell/account/{index.js → v1.js} +3 -3
- package/lib/api/restful/sell/account/v2.d.ts +11 -0
- package/lib/api/restful/sell/account/v2.js +27 -0
- package/lib/api/restful/sell/index.d.ts +5 -3
- package/lib/api/restful/sell/index.js +29 -27
- package/lib/ebay-api.min.js +1 -1
- package/lib/request.d.ts +1 -0
- package/lib/request.js +7 -1
- package/lib/types/restful/specs/sell_account_v2_oas3.d.ts +154 -0
- package/lib/types/restful/specs/sell_account_v2_oas3.js +2 -0
- package/lib/types/restful/specs/sell_fulfillment_v1_oas3.d.ts +82 -3
- package/lib/types/restfulTypes.d.ts +11 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ It supports `client credentials grant` and `authorization code grant` \(Auth'N'A
|
|
|
22
22
|
|
|
23
23
|
## Changelog
|
|
24
24
|
|
|
25
|
-
* `v9.2.
|
|
25
|
+
* `v9.2.1` is the latest release.
|
|
26
26
|
* See [here](https://github.com/hendt/ebay-api/blob/master/CHANGELOG.md) for the full changelog.
|
|
27
27
|
|
|
28
28
|
## Implementation status
|
|
@@ -722,4 +722,4 @@ Check [here](https://github.com/hendt/ebay-api/blob/master/CONTRIBUTING.md)
|
|
|
722
722
|
|
|
723
723
|
## 📝 License
|
|
724
724
|
|
|
725
|
-
MIT.
|
|
725
|
+
MIT.
|
package/dist/api/apiFactory.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Browse, Deal, Feed, Marketing as BuyMarketing, MarketplaceInsights, Off
|
|
|
3
3
|
import { Catalog, Charity, Identity, Media, Notification, Taxonomy, Translation } from './restful/commerce/index.js';
|
|
4
4
|
import { Analytics as DeveloperAnalytics, KeyManagement } from './restful/developer/index.js';
|
|
5
5
|
import { Cancellation, Case, Inquiry, Return, } from './restful/postOrder/index.js';
|
|
6
|
-
import {
|
|
6
|
+
import { AccountV1, AccountV2, Analytics as SellAnalytics, Compliance, Feed as SellFeed, Finances, Fulfillment, Inventory, Listing, Logistics, Marketing as SellMarketing, Metadata, Negotiation, Recommendation } from './restful/sell/index.js';
|
|
7
7
|
import Traditional from './traditional/index.js';
|
|
8
8
|
export default class ApiFactory extends Api {
|
|
9
9
|
constructor() {
|
|
@@ -48,7 +48,8 @@ export default class ApiFactory extends Api {
|
|
|
48
48
|
}
|
|
49
49
|
createSellApi() {
|
|
50
50
|
return {
|
|
51
|
-
account: this.createRestfulApi(
|
|
51
|
+
account: this.createRestfulApi(AccountV1),
|
|
52
|
+
accountV2: this.createRestfulApi(AccountV2),
|
|
52
53
|
analytics: this.createRestfulApi(SellAnalytics),
|
|
53
54
|
compliance: this.createRestfulApi(Compliance),
|
|
54
55
|
fulfillment: this.createRestfulApi(Fulfillment),
|
|
@@ -2,7 +2,7 @@ import { PaymentsProgramType } from '../../../../enums/index.js';
|
|
|
2
2
|
import { CustomPolicyCreateRequest, CustomPolicyRequest, FulfillmentPolicyRequest, FulfillmentSellAccountProgram, InventoryLocation, InventoryLocationFull, PaymentPolicyRequest, ReturnPolicyRequest, SalesTaxBase } from '../../../../types/index.js';
|
|
3
3
|
import { operations } from '../../../../types/restful/specs/sell_account_v1_oas3.js';
|
|
4
4
|
import Restful, { OpenApi } from '../../index.js';
|
|
5
|
-
export default class
|
|
5
|
+
export default class AccountV1 extends Restful implements OpenApi<operations> {
|
|
6
6
|
static id: string;
|
|
7
7
|
get basePath(): string;
|
|
8
8
|
getCustomPolicies(policyTypes: string): Promise<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Restful from '../../index.js';
|
|
2
|
-
class
|
|
2
|
+
class AccountV1 extends Restful {
|
|
3
3
|
get basePath() {
|
|
4
4
|
return '/sell/account/v1';
|
|
5
5
|
}
|
|
@@ -216,5 +216,5 @@ class Account extends Restful {
|
|
|
216
216
|
return this.get(`/country/${countryCode}/sales_tax_jurisdiction`);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
|
|
220
|
-
export default
|
|
219
|
+
AccountV1.id = 'AccountV1';
|
|
220
|
+
export default AccountV1;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RateTableUpdate, UpdatePayoutPercentageRequest } from '../../../../types/index.js';
|
|
2
|
+
import { operations } from '../../../../types/restful/specs/sell_account_v2_oas3.js';
|
|
3
|
+
import Restful, { OpenApi } from '../../index.js';
|
|
4
|
+
export default class AccountV2 extends Restful implements OpenApi<operations> {
|
|
5
|
+
static id: string;
|
|
6
|
+
get basePath(): string;
|
|
7
|
+
getRateTable(rateTableId: string): Promise<any>;
|
|
8
|
+
updateShippingCost(rateTableId: string, body: RateTableUpdate): Promise<any>;
|
|
9
|
+
getPayoutSettings(): Promise<any>;
|
|
10
|
+
updatePayoutPercentage(body: UpdatePayoutPercentageRequest): Promise<any>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
class AccountV2 extends Restful {
|
|
3
|
+
get basePath() {
|
|
4
|
+
return '/sell/account/v2';
|
|
5
|
+
}
|
|
6
|
+
getRateTable(rateTableId) {
|
|
7
|
+
rateTableId = encodeURIComponent(rateTableId);
|
|
8
|
+
return this.get(`/rate_table/${rateTableId}`);
|
|
9
|
+
}
|
|
10
|
+
updateShippingCost(rateTableId, body) {
|
|
11
|
+
rateTableId = encodeURIComponent(rateTableId);
|
|
12
|
+
return this.post(`/rate_table/${rateTableId}/update_shipping_cost`, body);
|
|
13
|
+
}
|
|
14
|
+
getPayoutSettings() {
|
|
15
|
+
return this.get('/payout_settings');
|
|
16
|
+
}
|
|
17
|
+
updatePayoutPercentage(body) {
|
|
18
|
+
return this.post(`/payout_settings/update_percentage`, body);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
AccountV2.id = 'AccountV2';
|
|
22
|
+
export default AccountV2;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import AccountV1 from './account/v1.js';
|
|
2
|
+
import AccountV2 from './account/v2.js';
|
|
2
3
|
import Analytics from './analytics/index.js';
|
|
3
4
|
import Compliance from './compliance/index.js';
|
|
4
5
|
import Finances from './finances/index.js';
|
|
@@ -12,7 +13,8 @@ import Logistics from './logistics/index.js';
|
|
|
12
13
|
import Negotiation from './negotiation/index.js';
|
|
13
14
|
import Listing from './listing/index.js';
|
|
14
15
|
export type Sell = {
|
|
15
|
-
account:
|
|
16
|
+
account: AccountV1;
|
|
17
|
+
accountV2: AccountV2;
|
|
16
18
|
analytics: Analytics;
|
|
17
19
|
compliance: Compliance;
|
|
18
20
|
fulfillment: Fulfillment;
|
|
@@ -26,4 +28,4 @@ export type Sell = {
|
|
|
26
28
|
negotiation: Negotiation;
|
|
27
29
|
listing: Listing;
|
|
28
30
|
};
|
|
29
|
-
export {
|
|
31
|
+
export { AccountV1, AccountV2, Compliance, Analytics, Fulfillment, Inventory, Marketing, Metadata, Recommendation, Finances, Feed, Logistics, Negotiation, Listing };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import AccountV1 from './account/v1.js';
|
|
2
|
+
import AccountV2 from './account/v2.js';
|
|
2
3
|
import Analytics from './analytics/index.js';
|
|
3
4
|
import Compliance from './compliance/index.js';
|
|
4
5
|
import Finances from './finances/index.js';
|
|
@@ -11,4 +12,4 @@ import Feed from './feed/index.js';
|
|
|
11
12
|
import Logistics from './logistics/index.js';
|
|
12
13
|
import Negotiation from './negotiation/index.js';
|
|
13
14
|
import Listing from './listing/index.js';
|
|
14
|
-
export {
|
|
15
|
+
export { AccountV1, AccountV2, Compliance, Analytics, Fulfillment, Inventory, Marketing, Metadata, Recommendation, Finances, Feed, Logistics, Negotiation, Listing };
|