Socket
Socket
Sign inDemoInstall

ebay-api

Package Overview
Dependencies
28
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.1.3 to 8.0.0-RC.0

dist/api/apiFactory.d.ts

16

lib/api/apiFactory.d.ts

@@ -1,9 +0,9 @@

import { ClientAlerts, Finding, Shopping, Trading, Merchandising } from '../types';
import Api from './';
import { Buy } from './restful/buy';
import { Commerce } from './restful/commerce';
import { Developer } from './restful/developer';
import { PostOrder } from './restful/postOrder';
import { Sell } from './restful/sell';
import Traditional from './traditional';
import { ClientAlerts, Finding, Shopping, Trading, Merchandising } from '../types/index.js';
import Api from './index.js';
import { Buy } from './restful/buy/index.js';
import { Commerce } from './restful/commerce/index.js';
import { Developer } from './restful/developer/index.js';
import { PostOrder } from './restful/postOrder/index.js';
import { Sell } from './restful/sell/index.js';
import Traditional from './traditional/index.js';
/**

@@ -10,0 +10,0 @@ * Factory class to create RESTFul API or Traditional API.

@@ -6,13 +6,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const _1 = __importDefault(require("./"));
const buy_1 = require("./restful/buy");
const commerce_1 = require("./restful/commerce");
const developer_1 = require("./restful/developer");
const postOrder_1 = require("./restful/postOrder");
const sell_1 = require("./restful/sell");
const traditional_1 = __importDefault(require("./traditional"));
const index_js_1 = __importDefault(require("./index.js"));
const index_js_2 = require("./restful/buy/index.js");
const index_js_3 = require("./restful/commerce/index.js");
const index_js_4 = require("./restful/developer/index.js");
const index_js_5 = require("./restful/postOrder/index.js");
const index_js_6 = require("./restful/sell/index.js");
const index_js_7 = __importDefault(require("./traditional/index.js"));
/**
* Factory class to create RESTFul API or Traditional API.
*/
class ApiFactory extends _1.default {
class ApiFactory extends index_js_1.default {
constructor() {

@@ -24,9 +24,9 @@ super(...arguments);

return {
browse: this.createRestfulApi(buy_1.Browse),
feed: this.createRestfulApi(buy_1.Feed),
marketing: this.createRestfulApi(buy_1.Marketing),
offer: this.createRestfulApi(buy_1.Offer),
order: this.createRestfulApi(buy_1.Order),
deal: this.createRestfulApi(buy_1.Deal),
marketplaceInsights: this.createRestfulApi(buy_1.MarketplaceInsights),
browse: this.createRestfulApi(index_js_2.Browse),
feed: this.createRestfulApi(index_js_2.Feed),
marketing: this.createRestfulApi(index_js_2.Marketing),
offer: this.createRestfulApi(index_js_2.Offer),
order: this.createRestfulApi(index_js_2.Order),
deal: this.createRestfulApi(index_js_2.Deal),
marketplaceInsights: this.createRestfulApi(index_js_2.MarketplaceInsights),
};

@@ -36,8 +36,8 @@ }

return {
catalog: this.createRestfulApi(commerce_1.Catalog),
identity: this.createRestfulApi(commerce_1.Identity),
taxonomy: this.createRestfulApi(commerce_1.Taxonomy),
translation: this.createRestfulApi(commerce_1.Translation),
charity: this.createRestfulApi(commerce_1.Charity),
notification: this.createRestfulApi(commerce_1.Notification),
catalog: this.createRestfulApi(index_js_3.Catalog),
identity: this.createRestfulApi(index_js_3.Identity),
taxonomy: this.createRestfulApi(index_js_3.Taxonomy),
translation: this.createRestfulApi(index_js_3.Translation),
charity: this.createRestfulApi(index_js_3.Charity),
notification: this.createRestfulApi(index_js_3.Notification),
};

@@ -47,4 +47,4 @@ }

return {
analytics: this.createRestfulApi(developer_1.Analytics),
keyManagement: this.createRestfulApi(developer_1.KeyManagement),
analytics: this.createRestfulApi(index_js_4.Analytics),
keyManagement: this.createRestfulApi(index_js_4.KeyManagement),
};

@@ -54,6 +54,6 @@ }

return {
cancellation: this.createRestfulApi(postOrder_1.Cancellation),
case: this.createRestfulApi(postOrder_1.Case),
inquiry: this.createRestfulApi(postOrder_1.Inquiry),
return: this.createRestfulApi(postOrder_1.Return),
cancellation: this.createRestfulApi(index_js_5.Cancellation),
case: this.createRestfulApi(index_js_5.Case),
inquiry: this.createRestfulApi(index_js_5.Inquiry),
return: this.createRestfulApi(index_js_5.Return),
};

@@ -63,15 +63,15 @@ }

return {
account: this.createRestfulApi(sell_1.Account),
analytics: this.createRestfulApi(sell_1.Analytics),
compliance: this.createRestfulApi(sell_1.Compliance),
fulfillment: this.createRestfulApi(sell_1.Fulfillment),
inventory: this.createRestfulApi(sell_1.Inventory),
marketing: this.createRestfulApi(sell_1.Marketing),
metadata: this.createRestfulApi(sell_1.Metadata),
recommendation: this.createRestfulApi(sell_1.Recommendation),
finances: this.createRestfulApi(sell_1.Finances),
feed: this.createRestfulApi(sell_1.Feed),
logistics: this.createRestfulApi(sell_1.Logistics),
negotiation: this.createRestfulApi(sell_1.Negotiation),
listing: this.createRestfulApi(sell_1.Listing),
account: this.createRestfulApi(index_js_6.Account),
analytics: this.createRestfulApi(index_js_6.Analytics),
compliance: this.createRestfulApi(index_js_6.Compliance),
fulfillment: this.createRestfulApi(index_js_6.Fulfillment),
inventory: this.createRestfulApi(index_js_6.Inventory),
marketing: this.createRestfulApi(index_js_6.Marketing),
metadata: this.createRestfulApi(index_js_6.Metadata),
recommendation: this.createRestfulApi(index_js_6.Recommendation),
finances: this.createRestfulApi(index_js_6.Finances),
feed: this.createRestfulApi(index_js_6.Feed),
logistics: this.createRestfulApi(index_js_6.Logistics),
negotiation: this.createRestfulApi(index_js_6.Negotiation),
listing: this.createRestfulApi(index_js_6.Listing),
};

@@ -83,3 +83,3 @@ }

}
return (this._traditional = new traditional_1.default(this.config, this.req, this.auth));
return (this._traditional = new index_js_7.default(this.config, this.req, this.auth));
}

@@ -108,2 +108,1 @@ createTradingApi() {

exports.default = ApiFactory;
//# sourceMappingURL=apiFactory.js.map

@@ -1,3 +0,3 @@

import { IEBayApiRequest } from '../request';
import { AppConfig } from '../types';
import { IEBayApiRequest } from '../request.js';
import { AppConfig } from '../types/index.js';
/**

@@ -9,6 +9,3 @@ * Abstract superclass.

readonly req: IEBayApiRequest;
private readonly emitter;
constructor(config: AppConfig, req?: IEBayApiRequest);
on(name: string, callBack: (arg: any) => any): () => void;
protected emit(name: string, value: any): void;
protected constructor(config: AppConfig, req?: IEBayApiRequest);
}
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const nanoevents_1 = __importDefault(require("nanoevents"));
const request_1 = require("../request");
const request_js_1 = require("../request.js");
/**

@@ -12,15 +8,7 @@ * Abstract superclass.

class Base {
constructor(config, req) {
constructor(config, req = new request_js_1.AxiosRequest(config.axiosConfig)) {
this.config = config;
this.req = req || new request_1.AxiosRequest(config.axiosConfig);
this.emitter = new nanoevents_1.default();
this.req = req;
}
on(name, callBack) {
return this.emitter.on(name, callBack);
}
emit(name, value) {
return this.emitter.emit(name, value);
}
}
exports.default = Base;
//# sourceMappingURL=base.js.map

@@ -1,5 +0,5 @@

import Auth from '../auth';
import { IEBayApiRequest } from '../request';
import { AppConfig } from '../types';
import Base from './base';
import Auth from '../auth/index.js';
import { IEBayApiRequest } from '../request.js';
import { AppConfig } from '../types/index.js';
import Base from './base.js';
/**

@@ -6,0 +6,0 @@ * Superclass with Auth container.

@@ -6,14 +6,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const auth_1 = __importDefault(require("../auth"));
const base_1 = __importDefault(require("./base"));
const index_js_1 = __importDefault(require("../auth/index.js"));
const base_js_1 = __importDefault(require("./base.js"));
/**
* Superclass with Auth container.
*/
class Api extends base_1.default {
class Api extends base_js_1.default {
constructor(config, req, auth) {
super(config, req);
this.auth = auth || new auth_1.default(this.config, this.req);
this.auth = auth || new index_js_1.default(this.config, this.req);
}
}
exports.default = Api;
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { AddCartItemInput, BrowseSearchParams, CompatibilityPayload, ItemsParams, LegacyItemParams, RemoveCartItemInput, SearchByImageParams, UpdateCartItemInput } from '../../../../types';
import Restful from '../../index.js';
import { AddCartItemInput, BrowseSearchParams, CompatibilityPayload, ItemsParams, LegacyItemParams, RemoveCartItemInput, SearchByImageParams, UpdateCartItemInput } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The Browse API has the following resources: item_summary: Lets shoppers search for specific items by keyword, GTIN,

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -13,3 +13,3 @@ * The Browse API has the following resources: item_summary: Lets shoppers search for specific items by keyword, GTIN,

*/
class Browse extends __1.default {
class Browse extends index_js_1.default {
get basePath() {

@@ -144,2 +144,1 @@ return '/buy/browse/v1';

Browse.id = 'Browse';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * This API allows third-party developers to search for and retrieve details about eBay deals and events, as well as the items associated with those deals and events.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* This API allows third-party developers to search for and retrieve details about eBay deals and events, as well as the items associated with those deals and events.
*/
class Deal extends __1.default {
class Deal extends index_js_1.default {
get basePath() {

@@ -81,2 +81,1 @@ return '/buy/deal/v1';

Deal.id = 'Deal';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { BuyFeedParams } from '../../../../types';
import Restful from '../../index.js';
import { BuyFeedParams } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The Feed API provides the ability to download TSV_GZIP feed files containing eBay items and an hourly snapshot file

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * The Feed API provides the ability to download TSV_GZIP feed files containing eBay items and an hourly snapshot file

*/
class Feed extends __1.default {
class Feed extends index_js_1.default {
get basePath() {

@@ -87,2 +87,1 @@ return '/buy/feed/v1_beta';

Feed.id = 'Feed';
//# sourceMappingURL=index.js.map

@@ -1,9 +0,9 @@

import Browse from './browse';
import Feed from './feed';
import Marketing from './marketing';
import Offer from './offer';
import Order from './order';
import Deal from './deal';
import MarketplaceInsights from './marketplaceInsights';
export declare type Buy = {
import Browse from './browse/index.js';
import Feed from './feed/index.js';
import Marketing from './marketing/index.js';
import Offer from './offer/index.js';
import Order from './order/index.js';
import Deal from './deal/index.js';
import MarketplaceInsights from './marketplaceInsights/index.js';
export type Buy = {
browse: Browse;

@@ -10,0 +10,0 @@ deal: Deal;

@@ -7,16 +7,15 @@ "use strict";

exports.Order = exports.Offer = exports.MarketplaceInsights = exports.Marketing = exports.Feed = exports.Deal = exports.Browse = void 0;
const browse_1 = __importDefault(require("./browse"));
exports.Browse = browse_1.default;
const feed_1 = __importDefault(require("./feed"));
exports.Feed = feed_1.default;
const marketing_1 = __importDefault(require("./marketing"));
exports.Marketing = marketing_1.default;
const offer_1 = __importDefault(require("./offer"));
exports.Offer = offer_1.default;
const order_1 = __importDefault(require("./order"));
exports.Order = order_1.default;
const deal_1 = __importDefault(require("./deal"));
exports.Deal = deal_1.default;
const marketplaceInsights_1 = __importDefault(require("./marketplaceInsights"));
exports.MarketplaceInsights = marketplaceInsights_1.default;
//# sourceMappingURL=index.js.map
const index_js_1 = __importDefault(require("./browse/index.js"));
exports.Browse = index_js_1.default;
const index_js_2 = __importDefault(require("./feed/index.js"));
exports.Feed = index_js_2.default;
const index_js_3 = __importDefault(require("./marketing/index.js"));
exports.Marketing = index_js_3.default;
const index_js_4 = __importDefault(require("./offer/index.js"));
exports.Offer = index_js_4.default;
const index_js_5 = __importDefault(require("./order/index.js"));
exports.Order = index_js_5.default;
const index_js_6 = __importDefault(require("./deal/index.js"));
exports.Deal = index_js_6.default;
const index_js_7 = __importDefault(require("./marketplaceInsights/index.js"));
exports.MarketplaceInsights = index_js_7.default;

@@ -1,3 +0,3 @@

import Restful from '../../';
import { AlsoBoughtByProductParams, AlsoViewedByProductParams, MerchandisedProductsParams } from '../../../../types';
import Restful from '../../index.js';
import { AlsoBoughtByProductParams, AlsoViewedByProductParams, MerchandisedProductsParams } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The Marketing API retrieves eBay products based on a metric, such as Best Selling, as well as products that were

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * The Marketing API retrieves eBay products based on a metric, such as Best Selling, as well as products that were

*/
class Marketing extends __1.default {
class Marketing extends index_js_1.default {
get basePath() {

@@ -53,2 +53,1 @@ return '/buy/marketing/v1_beta';

Marketing.id = 'Marketing';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { MarketingInsightsSearchParams } from '../../../../types';
import Restful from '../../index.js';
import { MarketingInsightsSearchParams } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * (Limited Release) The Marketplace Insights API provides the ability to search for sold items on eBay by keyword,

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * (Limited Release) The Marketplace Insights API provides the ability to search for sold items on eBay by keyword,

*/
class MarketplaceInsights extends __1.default {
class MarketplaceInsights extends index_js_1.default {
get basePath() {

@@ -53,2 +53,1 @@ return '/buy/marketplace_insights/v1_beta';

MarketplaceInsights.id = 'MarketplaceInsights';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { PlaceProxyBidRequest } from '../../../../types';
import Restful from '../../index.js';
import { PlaceProxyBidRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The Api Offer API enables Partners to place proxy bids for a buyer and retrieve the auctions where the buyer is

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * The Api Offer API enables Partners to place proxy bids for a buyer and retrieve the auctions where the buyer is

*/
class Offer extends __1.default {
class Offer extends index_js_1.default {
get basePath() {

@@ -39,2 +39,1 @@ return '/buy/offer/v1_beta';

Offer.id = 'Offer';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Api from '../../';
import { CheckoutSessionRequest, CouponRequest, CreateSignInCheckoutSessionRequest, GuestPlaceOrderRequest, InitiatePaymentRequest, ShippingAddressImpl, UpdatePaymentInformation, UpdateQuantity, UpdateShippingOption } from '../../../../types';
import Api from '../../index.js';
import { CheckoutSessionRequest, CouponRequest, CreateSignInCheckoutSessionRequest, GuestPlaceOrderRequest, InitiatePaymentRequest, ShippingAddressImpl, UpdatePaymentInformation, UpdateQuantity, UpdateShippingOption } from '../../../../types/index.js';
/**

@@ -188,3 +188,3 @@ * The Order API provides interfaces that lets shoppers pay for items (for both eBay guest and eBay member buyers).

/**
* This method creates an eBay proxy guest checkout session, which is a payment flow that requires integration
* This method creates an eBay proxy guest checkout session, which is a payment flow that requires apps
* with a VSP (vault service provider), such as Braintree. The VSP handles only the methods within this flow that

@@ -191,0 +191,0 @@ * contain payment information.

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * The Order API provides interfaces that lets shoppers pay for items (for both eBay guest and eBay member buyers).

*/
class Order extends __1.default {
class Order extends index_js_1.default {
get basePath() {

@@ -259,3 +259,3 @@ return '/buy/order/v1';

/**
* This method creates an eBay proxy guest checkout session, which is a payment flow that requires integration
* This method creates an eBay proxy guest checkout session, which is a payment flow that requires apps
* with a VSP (vault service provider), such as Braintree. The VSP handles only the methods within this flow that

@@ -372,2 +372,1 @@ * contain payment information.

Order.id = 'Order';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { CatalogSearchParams } from '../../../../types';
import Restful from '../../index.js';
import { CatalogSearchParams } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * Use the Catalog API to search the eBay catalog for products on which to base a seller's item listing;

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Use the Catalog API to search the eBay catalog for products on which to base a seller's item listing;
*/
class Catalog extends __1.default {
class Catalog extends index_js_1.default {
get basePath() {

@@ -109,2 +109,1 @@ return '/commerce/catalog/v1_beta';

Catalog.id = 'Catalog';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * The Charity API allows third-party developers to search for and access details on supported charitable organizations.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* The Charity API allows third-party developers to search for and access details on supported charitable organizations.
*/
class Charity extends __1.default {
class Charity extends index_js_1.default {
get basePath() {

@@ -57,2 +57,1 @@ return '/commerce/charity/v1';

Charity.id = 'Charity';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * Retrieves the authenticated user's account profile information.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Retrieves the authenticated user's account profile information.
*/
class Identity extends __1.default {
class Identity extends index_js_1.default {
get basePath() {

@@ -28,2 +28,1 @@ return '/commerce/identity/v1';

Identity.id = 'Identity';
//# sourceMappingURL=index.js.map

@@ -1,8 +0,8 @@

import Catalog from './catalog';
import Charity from './charity';
import Identity from './identity';
import Notification from './notification';
import Taxonomy from './taxonomy';
import Translation from './translation';
export declare type Commerce = {
import Catalog from './catalog/index.js';
import Charity from './charity/index.js';
import Identity from './identity/index.js';
import Notification from './notification/index.js';
import Taxonomy from './taxonomy/index.js';
import Translation from './translation/index.js';
export type Commerce = {
catalog: Catalog;

@@ -9,0 +9,0 @@ charity: Charity;

@@ -7,14 +7,13 @@ "use strict";

exports.Translation = exports.Taxonomy = exports.Notification = exports.Identity = exports.Charity = exports.Catalog = void 0;
const catalog_1 = __importDefault(require("./catalog"));
exports.Catalog = catalog_1.default;
const charity_1 = __importDefault(require("./charity"));
exports.Charity = charity_1.default;
const identity_1 = __importDefault(require("./identity"));
exports.Identity = identity_1.default;
const notification_1 = __importDefault(require("./notification"));
exports.Notification = notification_1.default;
const taxonomy_1 = __importDefault(require("./taxonomy"));
exports.Taxonomy = taxonomy_1.default;
const translation_1 = __importDefault(require("./translation"));
exports.Translation = translation_1.default;
//# sourceMappingURL=index.js.map
const index_js_1 = __importDefault(require("./catalog/index.js"));
exports.Catalog = index_js_1.default;
const index_js_2 = __importDefault(require("./charity/index.js"));
exports.Charity = index_js_2.default;
const index_js_3 = __importDefault(require("./identity/index.js"));
exports.Identity = index_js_3.default;
const index_js_4 = __importDefault(require("./notification/index.js"));
exports.Notification = index_js_4.default;
const index_js_5 = __importDefault(require("./taxonomy/index.js"));
exports.Taxonomy = index_js_5.default;
const index_js_6 = __importDefault(require("./translation/index.js"));
exports.Translation = index_js_6.default;

@@ -1,3 +0,3 @@

import Restful from '../../';
import { CreateSubscriptionRequest, DestinationRequest, NotificationConfig, NotificationParams, UpdateSubscriptionRequest } from '../../../../types';
import Restful from '../../index.js';
import { CreateSubscriptionRequest, DestinationRequest, NotificationConfig, NotificationParams, UpdateSubscriptionRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The eBay Notification API allows third-party developers and applications to process eBay notifications and verify the integrity of the notification message payload.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* The eBay Notification API allows third-party developers and applications to process eBay notifications and verify the integrity of the notification message payload.
*/
class Notification extends __1.default {
class Notification extends index_js_1.default {
get basePath() {

@@ -188,2 +188,1 @@ return '/commerce/notification/v1';

Notification.id = 'Notification';
//# sourceMappingURL=index.js.map
/// <reference types="node" />
import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -4,0 +4,0 @@ * Use the Taxonomy API to discover the most appropriate eBay categories under which sellers can offer inventory items

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * Use the Taxonomy API to discover the most appropriate eBay categories under which sellers can offer inventory items

*/
class Taxonomy extends __1.default {
class Taxonomy extends index_js_1.default {
get basePath() {

@@ -137,2 +137,1 @@ return '/commerce/taxonomy/v1';

Taxonomy.id = 'Taxonomy';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { TranslateRequest } from '../../../../types';
import Restful from '../../index.js';
import { TranslateRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * This API allows 3rd party developers to translate item title, description, search query.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* This API allows 3rd party developers to translate item title, description, search query.
*/
class Translation extends __1.default {
class Translation extends index_js_1.default {
get basePath() {

@@ -26,2 +26,1 @@ return '/commerce/translation/v1_beta';

Translation.id = 'Translation';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * This method retrieves the call limit and utilization data for an application.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* This method retrieves the call limit and utilization data for an application.
*/
class Analytics extends __1.default {
class Analytics extends index_js_1.default {
get basePath() {

@@ -46,2 +46,1 @@ return '/developer/analytics/v1_beta';

Analytics.id = 'Analytics';
//# sourceMappingURL=index.js.map

@@ -1,4 +0,4 @@

import Analytics from './analytics';
import KeyManagement from './keyManagement';
export declare type Developer = {
import Analytics from './analytics/index.js';
import KeyManagement from './keyManagement/index.js';
export type Developer = {
analytics: Analytics;

@@ -5,0 +5,0 @@ keyManagement: KeyManagement;

@@ -7,6 +7,5 @@ "use strict";

exports.KeyManagement = exports.Analytics = void 0;
const analytics_1 = __importDefault(require("./analytics"));
exports.Analytics = analytics_1.default;
const keyManagement_1 = __importDefault(require("./keyManagement"));
exports.KeyManagement = keyManagement_1.default;
//# sourceMappingURL=index.js.map
const index_js_1 = __importDefault(require("./analytics/index.js"));
exports.Analytics = index_js_1.default;
const index_js_2 = __importDefault(require("./keyManagement/index.js"));
exports.KeyManagement = index_js_2.default;

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * This method retrieves the call limit and utilization data for an application.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* This method retrieves the call limit and utilization data for an application.
*/
class KeyManagement extends __1.default {
class KeyManagement extends index_js_1.default {
get subdomain() {

@@ -42,2 +42,1 @@ return 'apiz';

KeyManagement.id = 'KeyManagement';
//# sourceMappingURL=index.js.map

@@ -1,7 +0,7 @@

import Api from '../';
import Auth from '../../auth';
import { IEBayApiRequest } from '../../request';
import { ApiRequestConfig, AppConfig } from '../../types';
import Api from '../index.js';
import Auth from '../../auth/index.js';
import { IEBayApiRequest } from '../../request.js';
import { ApiRequestConfig, AppConfig } from '../../types/index.js';
export declare const defaultApiHeaders: Record<string, string>;
export declare type RestfulApiConfig = {
export type RestfulApiConfig = {
subdomain?: string;

@@ -15,3 +15,3 @@ useIaf?: boolean;

} & ApiRequestConfig;
export declare type ApiRequest = {
export type ApiRequest = {
method: keyof IEBayApiRequest;

@@ -18,0 +18,0 @@ url: string;

@@ -7,4 +7,4 @@ "use strict";

exports.defaultApiHeaders = void 0;
const __1 = __importDefault(require("../"));
const errors_1 = require("../../errors");
const index_js_1 = __importDefault(require("../index.js"));
const index_js_2 = require("../../errors/index.js");
exports.defaultApiHeaders = {

@@ -24,3 +24,3 @@ 'Content-Type': 'application/json',

};
class Restful extends __1.default {
class Restful extends index_js_1.default {
constructor(config, req, auth, apiConfig = {}) {

@@ -144,3 +144,3 @@ super(config, req, auth);

}
if (error.name === errors_1.EBayInvalidAccessToken.name) {
if (error.name === index_js_2.EBayInvalidAccessToken.name) {
return true;

@@ -170,3 +170,3 @@ }

catch (ex) {
(0, errors_1.handleEBayError)(ex);
(0, index_js_2.handleEBayError)(ex);
}

@@ -176,2 +176,1 @@ }

exports.default = Restful;
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { CancellationSearchParams, ConfirmRefundRequest, CreateCancelRequest, RejectCancelRequest } from '../../../../types';
import Restful from '../../index.js';
import { CancellationSearchParams, ConfirmRefundRequest, CreateCancelRequest, RejectCancelRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * Post-Order Cancellation API

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Post-Order Cancellation API
*/
class Cancellation extends __1.default {
class Cancellation extends index_js_1.default {
get basePath() {

@@ -96,2 +96,1 @@ return '/post-order/v2';

Cancellation.id = 'Cancellation';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { AppealRequest, BuyerCloseCaseRequest, CaseSearchParams, ReturnAddressRequest, Text } from '../../../../types';
import Restful from '../../index.js';
import { AppealRequest, BuyerCloseCaseRequest, CaseSearchParams, ReturnAddressRequest, Text } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * Post-Order Case Management API

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Post-Order Case Management API
*/
class Case extends __1.default {
class Case extends index_js_1.default {
get basePath() {

@@ -96,2 +96,1 @@ return '/post-order/v2';

Case.id = 'Case';
//# sourceMappingURL=index.js.map

@@ -1,6 +0,6 @@

import Cancellation from './cancellation';
import Case from './case';
import Inquiry from './inquiry';
import Return from './return';
export declare type PostOrder = {
import Cancellation from './cancellation/index.js';
import Case from './case/index.js';
import Inquiry from './inquiry/index.js';
import Return from './return/index.js';
export type PostOrder = {
cancellation: Cancellation;

@@ -7,0 +7,0 @@ case: Case;

@@ -7,10 +7,9 @@ "use strict";

exports.Return = exports.Inquiry = exports.Case = exports.Cancellation = void 0;
const cancellation_1 = __importDefault(require("./cancellation"));
exports.Cancellation = cancellation_1.default;
const case_1 = __importDefault(require("./case"));
exports.Case = case_1.default;
const inquiry_1 = __importDefault(require("./inquiry"));
exports.Inquiry = inquiry_1.default;
const return_1 = __importDefault(require("./return"));
exports.Return = return_1.default;
//# sourceMappingURL=index.js.map
const index_js_1 = __importDefault(require("./cancellation/index.js"));
exports.Cancellation = index_js_1.default;
const index_js_2 = __importDefault(require("./case/index.js"));
exports.Case = index_js_2.default;
const index_js_3 = __importDefault(require("./inquiry/index.js"));
exports.Inquiry = index_js_3.default;
const index_js_4 = __importDefault(require("./return/index.js"));
exports.Return = index_js_4.default;

@@ -1,3 +0,3 @@

import Restful from '../../';
import { BuyerCloseInquiryRequest, CheckInquiryEligibilityRequest, CreateInquiryRequest, EscalateInquiryRequest, InquirySearchParams, InquiryVoluntaryRefundRequest, SellerProvideRefundInfoRequest, SendMessageRequest, ShipmentInfoRequest } from '../../../../types';
import Restful from '../../index.js';
import { BuyerCloseInquiryRequest, CheckInquiryEligibilityRequest, CreateInquiryRequest, EscalateInquiryRequest, InquirySearchParams, InquiryVoluntaryRefundRequest, SellerProvideRefundInfoRequest, SendMessageRequest, ShipmentInfoRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * Post-Order Inquiry API

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Post-Order Inquiry API
*/
class Inquiry extends __1.default {
class Inquiry extends index_js_1.default {
get basePath() {

@@ -132,2 +132,1 @@ return '/post-order/v2';

Inquiry.id = 'Inquiry';
//# sourceMappingURL=index.js.map

@@ -1,4 +0,4 @@

import Restful from '../../';
import { FilePurpose, GetReturnFieldGroupEnum } from '../../../../enums';
import { CheckEligibilityRequest, CloseReturnRequest, CreateReturnRequest, DecideReturnRequest, EscalateRequest, GetEstimateRequest, MarkAsReceivedRequest, MarkAsShippedRequest, MarkRefundSentRequest, PostOrderIssueRefundRequest, ProvideLabelRequest, ReturnRequestType, SearchReturnParams, SendMessageRequest, SetReturnCreationSessionRequest, UpdateTrackingRequest, UploadFileRequest, VoidLabelRequest } from '../../../../types';
import Restful from '../../index.js';
import { FilePurpose, GetReturnFieldGroupEnum } from '../../../../enums/index.js';
import { CheckEligibilityRequest, CloseReturnRequest, CreateReturnRequest, DecideReturnRequest, EscalateRequest, GetEstimateRequest, MarkAsReceivedRequest, MarkAsShippedRequest, MarkRefundSentRequest, PostOrderIssueRefundRequest, ProvideLabelRequest, ReturnRequestType, SearchReturnParams, SendMessageRequest, SetReturnCreationSessionRequest, UpdateTrackingRequest, UploadFileRequest, VoidLabelRequest } from '../../../../types/index.js';
/**

@@ -5,0 +5,0 @@ * Post-Order Return API

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Post-Order Return API
*/
class Return extends __1.default {
class Return extends index_js_1.default {
get basePath() {

@@ -362,2 +362,1 @@ return '/post-order/v2';

Return.id = 'Return';
//# sourceMappingURL=index.js.map

@@ -1,4 +0,4 @@

import Restful from '../../';
import { FulfillmentPolicyRequest, PaymentPolicyRequest, Program, ReturnPolicyRequest, SalesTaxBase } from '../../../../types';
import { PaymentsProgramType } from '../../../../enums';
import Restful from '../../index.js';
import { FulfillmentPolicyRequest, PaymentPolicyRequest, Program, ReturnPolicyRequest, SalesTaxBase } from '../../../../types/index.js';
import { PaymentsProgramType } from '../../../../enums/index.js';
/**

@@ -5,0 +5,0 @@ * The <b>Account API</b> gives sellers the ability to configure their eBay seller accounts,

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -13,3 +13,3 @@ * The <b>Account API</b> gives sellers the ability to configure their eBay seller accounts,

*/
class Account extends __1.default {
class Account extends index_js_1.default {
get basePath() {

@@ -339,2 +339,1 @@ return '/sell/account/v1';

Account.id = 'Account';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { Metric } from '../../../../enums';
import Restful from '../../index.js';
import { Metric } from '../../../../enums/index.js';
/**

@@ -4,0 +4,0 @@ * The Analytics API provides information about a seller's business performance.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* The Analytics API provides information about a seller's business performance.
*/
class Analytics extends __1.default {
class Analytics extends index_js_1.default {
get basePath() {

@@ -62,2 +62,1 @@ return '/sell/analytics/v1';

Analytics.id = 'Analytics';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { SuppressViolationRequest } from '../../../../types';
import Restful from '../../index.js';
import { SuppressViolationRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * Service for providing the compliance violations of seller account/listings

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Service for providing the compliance violations of seller account/listings
*/
class Compliance extends __1.default {
class Compliance extends index_js_1.default {
get basePath() {

@@ -58,2 +58,1 @@ return '/sell/compliance/v1';

Compliance.id = 'Compliance';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { SellFeedParams } from '../../../../types';
import Restful from '../../index.js';
import { SellFeedParams } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The <strong>Feed API</strong> lets sellers upload input files, download reports and files including their status, filter reports using URI parameters, and retrieve customer service metrics task details.

@@ -6,8 +6,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const request_1 = require("../../../../request");
const index_js_1 = __importDefault(require("../../index.js"));
const request_js_1 = require("../../../../request.js");
/**
* The <strong>Feed API</strong> lets sellers upload input files, download reports and files including their status, filter reports using URI parameters, and retrieve customer service metrics task details.
*/
class Feed extends __1.default {
class Feed extends index_js_1.default {
get basePath() {

@@ -207,3 +207,3 @@ return '/sell/feed/v1';

return this.post(`/task/${taskId}/upload_file`, data, {
headers: request_1.multipartHeader,
headers: request_js_1.multipartHeader,
});

@@ -257,2 +257,1 @@ }

Feed.id = 'Feed';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * The Finances API is used by sellers in eBay's managed payments program to retrieve seller payout information.

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -14,3 +14,3 @@ * The Finances API is used by sellers in eBay's managed payments program to retrieve seller payout information.

*/
class Finances extends __1.default {
class Finances extends index_js_1.default {
get basePath() {

@@ -111,2 +111,1 @@ return '/sell/finances/v1';

Finances.id = 'Finances';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { AddEvidencePaymentDisputeRequest, ContestPaymentDisputeRequest, IssueRefundRequest, PaymentParams, ShippingFulfillmentDetails, UpdateEvidencePaymentDisputeRequest } from '../../../../types';
import Restful from '../../index.js';
import { AddEvidencePaymentDisputeRequest, ContestPaymentDisputeRequest, IssueRefundRequest, PaymentParams, ShippingFulfillmentDetails, UpdateEvidencePaymentDisputeRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * Use the Fulfillment API to complete the process of packaging, addressing, handling, and shipping each order on

@@ -6,4 +6,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const request_1 = require("../../../../request");
const index_js_1 = __importDefault(require("../../index.js"));
const request_js_1 = require("../../../../request.js");
/**

@@ -17,3 +17,3 @@ * Use the Fulfillment API to complete the process of packaging, addressing, handling, and shipping each order on

*/
class Fulfillment extends __1.default {
class Fulfillment extends index_js_1.default {
get basePath() {

@@ -176,3 +176,3 @@ return '/sell/fulfillment/v1';

headers: {
...request_1.multipartHeader
...request_js_1.multipartHeader
}

@@ -202,2 +202,1 @@ });

Fulfillment.id = 'Fulfillment';
//# sourceMappingURL=index.js.map

@@ -1,15 +0,15 @@

import Account from './account';
import Analytics from './analytics';
import Compliance from './compliance';
import Finances from './finances';
import Fulfillment from './fulfillment';
import Inventory from './inventory';
import Marketing from './marketing';
import Metadata from './metadata';
import Recommendation from './recommendation';
import Feed from './feed';
import Logistics from './logistics';
import Negotiation from './negotiation';
import Listing from './listing';
export declare type Sell = {
import Account from './account/index.js';
import Analytics from './analytics/index.js';
import Compliance from './compliance/index.js';
import Finances from './finances/index.js';
import Fulfillment from './fulfillment/index.js';
import Inventory from './inventory/index.js';
import Marketing from './marketing/index.js';
import Metadata from './metadata/index.js';
import Recommendation from './recommendation/index.js';
import Feed from './feed/index.js';
import Logistics from './logistics/index.js';
import Negotiation from './negotiation/index.js';
import Listing from './listing/index.js';
export type Sell = {
account: Account;

@@ -16,0 +16,0 @@ analytics: Analytics;

@@ -7,28 +7,27 @@ "use strict";

exports.Listing = exports.Negotiation = exports.Logistics = exports.Feed = exports.Finances = exports.Recommendation = exports.Metadata = exports.Marketing = exports.Inventory = exports.Fulfillment = exports.Analytics = exports.Compliance = exports.Account = void 0;
const account_1 = __importDefault(require("./account"));
exports.Account = account_1.default;
const analytics_1 = __importDefault(require("./analytics"));
exports.Analytics = analytics_1.default;
const compliance_1 = __importDefault(require("./compliance"));
exports.Compliance = compliance_1.default;
const finances_1 = __importDefault(require("./finances"));
exports.Finances = finances_1.default;
const fulfillment_1 = __importDefault(require("./fulfillment"));
exports.Fulfillment = fulfillment_1.default;
const inventory_1 = __importDefault(require("./inventory"));
exports.Inventory = inventory_1.default;
const marketing_1 = __importDefault(require("./marketing"));
exports.Marketing = marketing_1.default;
const metadata_1 = __importDefault(require("./metadata"));
exports.Metadata = metadata_1.default;
const recommendation_1 = __importDefault(require("./recommendation"));
exports.Recommendation = recommendation_1.default;
const feed_1 = __importDefault(require("./feed"));
exports.Feed = feed_1.default;
const logistics_1 = __importDefault(require("./logistics"));
exports.Logistics = logistics_1.default;
const negotiation_1 = __importDefault(require("./negotiation"));
exports.Negotiation = negotiation_1.default;
const listing_1 = __importDefault(require("./listing"));
exports.Listing = listing_1.default;
//# sourceMappingURL=index.js.map
const index_js_1 = __importDefault(require("./account/index.js"));
exports.Account = index_js_1.default;
const index_js_2 = __importDefault(require("./analytics/index.js"));
exports.Analytics = index_js_2.default;
const index_js_3 = __importDefault(require("./compliance/index.js"));
exports.Compliance = index_js_3.default;
const index_js_4 = __importDefault(require("./finances/index.js"));
exports.Finances = index_js_4.default;
const index_js_5 = __importDefault(require("./fulfillment/index.js"));
exports.Fulfillment = index_js_5.default;
const index_js_6 = __importDefault(require("./inventory/index.js"));
exports.Inventory = index_js_6.default;
const index_js_7 = __importDefault(require("./marketing/index.js"));
exports.Marketing = index_js_7.default;
const index_js_8 = __importDefault(require("./metadata/index.js"));
exports.Metadata = index_js_8.default;
const index_js_9 = __importDefault(require("./recommendation/index.js"));
exports.Recommendation = index_js_9.default;
const index_js_10 = __importDefault(require("./feed/index.js"));
exports.Feed = index_js_10.default;
const index_js_11 = __importDefault(require("./logistics/index.js"));
exports.Logistics = index_js_11.default;
const index_js_12 = __importDefault(require("./negotiation/index.js"));
exports.Negotiation = index_js_12.default;
const index_js_13 = __importDefault(require("./listing/index.js"));
exports.Listing = index_js_13.default;

@@ -1,3 +0,3 @@

import Restful from '../../';
import { BulkEbayOfferDetailsWithKeys, BulkInventoryItem, BulkMigrateListing, BulkOffer, BulkPriceQuantity, Compatibility, EbayOfferDetailsWithId, EbayOfferDetailsWithKeys, InventoryItemGroup, InventoryLocation, InventoryLocationFull, OfferKeysWithId, PublishByInventoryItemGroupRequest, SellInventoryItem, WithdrawByInventoryItemGroupRequest } from '../../../../types';
import Restful from '../../index.js';
import { BulkEbayOfferDetailsWithKeys, BulkInventoryItem, BulkMigrateListing, BulkOffer, BulkPriceQuantity, Compatibility, EbayOfferDetailsWithId, EbayOfferDetailsWithKeys, InventoryItemGroup, InventoryLocation, InventoryLocationFull, OfferKeysWithId, PublishByInventoryItemGroupRequest, SellInventoryItem, WithdrawByInventoryItemGroupRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay

*/
class Inventory extends __1.default {
class Inventory extends index_js_1.default {
get basePath() {

@@ -348,2 +348,1 @@ return '/sell/inventory/v1';

Inventory.id = 'Inventory';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * Enables a seller adding an ad or item on a Partner's site to automatically create an eBay listing draft using the item details from the Partner's site.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* Enables a seller adding an ad or item on a Partner's site to automatically create an eBay listing draft using the item details from the Partner's site.
*/
class Listing extends __1.default {
class Listing extends index_js_1.default {
get basePath() {

@@ -26,2 +26,1 @@ return '/sell/listing/v1_beta';

Listing.id = 'Listing';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * The <b>Logistics API</b> resources offer the following capabilities: <ul><li><b>shipping_quote</b> &ndash; Consolidates into a list a set of live shipping rates, or quotes, from which you can select a rate to ship a package.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* The <b>Logistics API</b> resources offer the following capabilities: <ul><li><b>shipping_quote</b> &ndash; Consolidates into a list a set of live shipping rates, or quotes, from which you can select a rate to ship a package.
*/
class Logistics extends __1.default {
class Logistics extends index_js_1.default {
get basePath() {

@@ -67,2 +67,1 @@ return '/sell/logistics/v1_beta';

Logistics.id = 'Logistics';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, CloneCampaignRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, UpdateBidPercentageRequest, UpdateCampaignIdentificationRequest } from '../../../../types';
import Restful from '../../index.js';
import { BulkCreateAdRequest, BulkCreateAdsByInventoryReferenceRequest, BulkDeleteAdRequest, BulkDeleteAdsByInventoryReferenceRequest, CloneCampaignRequest, CreateAdRequest, CreateAdsByInventoryReferenceRequest, CreateCampaignRequest, CreateReportTask, ItemPriceMarkdown, ItemPromotion, UpdateBidPercentageRequest, UpdateCampaignIdentificationRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * <p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -14,3 +14,3 @@ * <p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:

*/
class Marketing extends __1.default {
class Marketing extends index_js_1.default {
get basePath() {

@@ -611,2 +611,1 @@ return '/sell/marketing/v1';

Marketing.id = 'Marketing';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces.
*/
class Metadata extends __1.default {
class Metadata extends index_js_1.default {
get basePath() {

@@ -132,2 +132,1 @@ return '/sell/metadata/v1';

Metadata.id = 'Metadata';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import Restful from '../../';
import Restful from '../../index.js';
/**

@@ -3,0 +3,0 @@ * The <b>Negotiations API</b> gives sellers the ability to proactively send discount offers to buyers who have shown an "interest" in their listings.

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**
* The <b>Negotiations API</b> gives sellers the ability to proactively send discount offers to buyers who have shown an "interest" in their listings.
*/
class Negotiation extends __1.default {
class Negotiation extends index_js_1.default {
get basePath() {

@@ -40,2 +40,1 @@ return '/sell/negotiation/v1';

Negotiation.id = 'Negotiation';
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Restful from '../../';
import { FindListingRecommendationRequest } from '../../../../types';
import Restful from '../../index.js';
import { FindListingRecommendationRequest } from '../../../../types/index.js';
/**

@@ -4,0 +4,0 @@ * The <b>Recommendation API</b> returns information that sellers can use to optimize the configuration of their

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const __1 = __importDefault(require("../../"));
const index_js_1 = __importDefault(require("../../index.js"));
/**

@@ -12,3 +12,3 @@ * The <b>Recommendation API</b> returns information that sellers can use to optimize the configuration of their

*/
class Recommendation extends __1.default {
class Recommendation extends index_js_1.default {
get basePath() {

@@ -41,2 +41,1 @@ return '/sell/recommendation/v1';

Recommendation.id = 'Recommendation';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { EventType } from './types';
import { EventType } from './types.js';
declare enum calls {

@@ -3,0 +3,0 @@ GetPublicAlerts = 0,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventType = void 0;
const types_1 = require("./types");
Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return types_1.EventType; } });
const types_js_1 = require("./types.js");
Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return types_js_1.EventType; } });
// https://developer.ebay.com/devzone/client-alerts/docs/CallRef/index.html

@@ -15,2 +15,1 @@ var calls;

exports.default = calls;
//# sourceMappingURL=index.js.map

@@ -36,2 +36,1 @@ "use strict";

exports.EventType = EventType;
//# sourceMappingURL=types.js.map

@@ -1945,5 +1945,5 @@ declare enum fields {

}
export declare type Fields = {
export type Fields = {
[key in typeof fields[number]]: Fields | Fields[] | number | number[] | string | string[] | boolean | boolean[];
};
export default fields;

@@ -16,2 +16,1 @@ "use strict";

exports.default = calls;
//# sourceMappingURL=index.js.map

@@ -1,3 +0,3 @@

import Api from '../';
import { ClientAlerts, Finding, Merchandising, Shopping, Trading } from '../../types';
import Api from '../index.js';
import { ClientAlerts, Finding, Merchandising, Shopping, Trading } from '../../types/index.js';
/**

@@ -4,0 +4,0 @@ * Traditional eBay API.

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -26,18 +30,18 @@ if (k2 === undefined) k2 = k;

const qs_1 = require("qs");
const __1 = __importDefault(require("../"));
const errors_1 = require("../../errors");
const clientAlerts_1 = __importDefault(require("./clientAlerts"));
const finding_1 = __importDefault(require("./finding"));
const merchandising_1 = __importDefault(require("./merchandising"));
const shopping_1 = __importDefault(require("./shopping"));
const trading_1 = __importDefault(require("./trading"));
const XMLRequest_1 = __importStar(require("./XMLRequest"));
const index_js_1 = __importDefault(require("../index.js"));
const index_js_2 = require("../../errors/index.js");
const index_js_3 = __importDefault(require("./clientAlerts/index.js"));
const index_js_4 = __importDefault(require("./finding/index.js"));
const index_js_5 = __importDefault(require("./merchandising/index.js"));
const index_js_6 = __importDefault(require("./shopping/index.js"));
const index_js_7 = __importDefault(require("./trading/index.js"));
const XMLRequest_js_1 = __importStar(require("./XMLRequest.js"));
/**
* Traditional eBay API.
*/
class Traditional extends __1.default {
class Traditional extends index_js_1.default {
constructor() {
super(...arguments);
this.createXMLRequest = (callName, api) => async (fields, opts) => {
const apiConfig = { ...XMLRequest_1.defaultApiConfig, ...opts };
const apiConfig = { ...XMLRequest_js_1.defaultApiConfig, ...opts };
try {

@@ -48,3 +52,3 @@ return await this.request(apiConfig, api, callName, fields);

// Try to refresh the token.
if (this.config.autoRefreshToken && (error.name === errors_1.EBayIAFTokenExpired.name || error.name === errors_1.EBayIAFTokenInvalid.name)) {
if (this.config.autoRefreshToken && (error.name === index_js_2.EBayIAFTokenExpired.name || error.name === index_js_2.EBayIAFTokenInvalid.name)) {
return await this.request(apiConfig, api, callName, fields, true);

@@ -68,3 +72,3 @@ }

},
calls: trading_1.default,
calls: index_js_7.default,
xmlns: 'urn:ebay:apis:eBLBaseComponents',

@@ -92,3 +96,3 @@ headers: (callName, accessToken) => ({

xmlns: 'urn:ebay:apis:eBLBaseComponents',
calls: shopping_1.default,
calls: index_js_6.default,
headers: (callName, accessToken) => ({

@@ -111,3 +115,3 @@ 'X-EBAY-API-CALL-NAME': callName,

xmlns: 'http://www.ebay.com/marketplace/search/v1/services',
calls: finding_1.default,
calls: index_js_4.default,
headers: (callName) => ({

@@ -128,3 +132,3 @@ 'X-EBAY-SOA-SECURITY-APPNAME': this.config.appId,

},
calls: clientAlerts_1.default
calls: index_js_3.default
};

@@ -146,3 +150,5 @@ const endpoint = api.endpoint[this.config.sandbox ? 'sandbox' : 'production'];

return this.req.get(endpoint, {
paramsSerializer,
paramsSerializer: {
serialize: paramsSerializer
},
params: {

@@ -165,3 +171,3 @@ ...params,

xmlns: 'http://www.ebay.com/marketplace/services',
calls: merchandising_1.default,
calls: index_js_5.default,
headers: (callName) => ({

@@ -182,7 +188,7 @@ 'EBAY-SOA-CONSUMER-ID': this.config.appId,

const config = await this.getConfig(api, callName, apiConfig);
const xmlRequest = new XMLRequest_1.default(callName, fields, config, this.req);
const xmlRequest = new XMLRequest_js_1.default(callName, fields, config, this.req);
return await xmlRequest.request();
}
catch (e) {
(0, errors_1.handleEBayError)(e);
(0, index_js_2.handleEBayError)(e);
}

@@ -214,2 +220,1 @@ }

exports.default = Traditional;
//# sourceMappingURL=index.js.map

@@ -11,2 +11,1 @@ "use strict";

exports.default = calls;
//# sourceMappingURL=index.js.map

@@ -16,2 +16,1 @@ "use strict";

exports.default = calls;
//# sourceMappingURL=index.js.map

@@ -146,2 +146,1 @@ "use strict";

exports.default = calls;
//# sourceMappingURL=index.js.map

@@ -1,5 +0,5 @@

import xmlParser from 'fast-xml-parser';
import { IEBayApiRequest } from '../../request';
import { ApiRequestConfig, Headers } from '../../types';
import { Fields } from './fields';
import { XMLBuilder } from 'fast-xml-parser';
import { IEBayApiRequest } from '../../request.js';
import { ApiRequestConfig, Headers } from '../../types/index.js';
import { Fields } from './fields.js';
export declare const defaultJSON2XMLOptions: {

@@ -14,2 +14,3 @@ attributeNamePrefix: string;

suppressEmptyNode: boolean;
cdataPropName: string;
};

@@ -22,11 +23,14 @@ export declare const defaultXML2JSONParseOptions: {

parseNodeValue: boolean;
ignoreNameSpace: boolean;
parseTrueNumberOnly: boolean;
arrayMode: (_: string, parentTageName: string) => boolean;
numberParseOptions: {
hex: boolean;
leadingZeros: boolean;
};
removeNSPrefix: boolean;
isArray: (name: string, jpath: string) => boolean;
};
export declare type BodyHeaders = {
export type BodyHeaders = {
body: any;
headers: Headers;
};
export declare type TraditionalApiConfig = {
export type TraditionalApiConfig = {
raw?: boolean;

@@ -37,3 +41,3 @@ parseOptions?: object;

} & ApiRequestConfig;
export declare type XMLReqConfig = TraditionalApiConfig & {
export type XMLReqConfig = TraditionalApiConfig & {
endpoint: string;

@@ -55,3 +59,3 @@ xmlns: string;

private readonly req;
static j2x: xmlParser.j2xParser;
static j2x: XMLBuilder;
/**

@@ -58,0 +62,0 @@ * Creates the new Request object

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -27,4 +8,4 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const debug_1 = __importDefault(require("debug"));
const fast_xml_parser_1 = __importStar(require("fast-xml-parser"));
const errors_1 = require("../../errors");
const fast_xml_parser_1 = require("fast-xml-parser");
const index_js_1 = require("../../errors/index.js");
const log = (0, debug_1.default)('ebay:xml:request');

@@ -39,3 +20,4 @@ exports.defaultJSON2XMLOptions = {

indentBy: ' ',
suppressEmptyNode: false
suppressEmptyNode: false,
cdataPropName: '__cdata'
};

@@ -48,6 +30,9 @@ exports.defaultXML2JSONParseOptions = {

parseNodeValue: true,
ignoreNameSpace: true,
parseTrueNumberOnly: true,
arrayMode: (_, parentTageName) => {
return /Array$/.test(parentTageName);
numberParseOptions: {
hex: false,
leadingZeros: false
},
removeNSPrefix: true,
isArray: (name, jpath) => {
return /Array$/.test(jpath.slice(0, -name.length - 1));
}

@@ -80,3 +65,3 @@ };

if (!callName) {
throw new errors_1.EbayNoCallError();
throw new index_js_1.EbayNoCallError();
}

@@ -131,3 +116,3 @@ this.callName = callName;

log('parseOption', parseOptions);
return fast_xml_parser_1.default.parse(xml, parseOptions);
return new fast_xml_parser_1.XMLParser(parseOptions).parse(xml);
}

@@ -143,3 +128,3 @@ /**

const HEADING = '<?xml version="1.0" encoding="utf-8"?>';
return HEADING + XMLRequest.j2x.parse({
return HEADING + XMLRequest.j2x.build({
[this.callName + 'Request']: {

@@ -182,3 +167,3 @@ '@_xmlns': this.config.xmlns,

const json = this.xml2JSON(data);
(0, errors_1.checkEBayResponse)(json);
(0, index_js_1.checkEBayResponse)(json);
return json;

@@ -190,3 +175,3 @@ }

const json = this.toJSON(error.response.data);
(0, errors_1.checkEBayResponse)(json);
(0, index_js_1.checkEBayResponse)(json);
}

@@ -203,3 +188,2 @@ throw error;

exports.default = XMLRequest;
XMLRequest.j2x = new fast_xml_parser_1.j2xParser(exports.defaultJSON2XMLOptions);
//# sourceMappingURL=XMLRequest.js.map
XMLRequest.j2x = new fast_xml_parser_1.XMLBuilder(exports.defaultJSON2XMLOptions);

@@ -1,5 +0,5 @@

import Base from '../api/base';
import { IEBayApiRequest } from '../request';
import { AppConfig } from '../types';
export declare type AuthToken = {
import Base from '../api/base.js';
import { IEBayApiRequest } from '../request.js';
import { AppConfig } from '../types/index.js';
export type AuthToken = {
eBayAuthToken: string;

@@ -6,0 +6,0 @@ Timestamp?: string;

@@ -7,13 +7,6 @@ "use strict";

const debug_1 = __importDefault(require("debug"));
const base_1 = __importDefault(require("../api/base"));
const XMLRequest_1 = __importDefault(require("../api/traditional/XMLRequest"));
const base_js_1 = __importDefault(require("../api/base.js"));
const XMLRequest_js_1 = __importDefault(require("../api/traditional/XMLRequest.js"));
const log = (0, debug_1.default)('ebay:authNAuth');
class AuthNAuth extends base_1.default {
constructor(config, req) {
super(config, req);
this.authToken = null;
if (this.config.authToken) {
this.setAuthToken(this.config.authToken);
}
}
class AuthNAuth extends base_js_1.default {
static generateAuthUrl(sandbox, ruName, sessionId, prompt = false) {

@@ -28,2 +21,9 @@ return [

}
constructor(config, req) {
super(config, req);
this.authToken = null;
if (this.config.authToken) {
this.setAuthToken(this.config.authToken);
}
}
get apiEndpoint() {

@@ -45,3 +45,3 @@ return this.config.sandbox ? AuthNAuth.API_ENDPOINT.sandbox : AuthNAuth.API_ENDPOINT.production;

}
const xmlApi = new XMLRequest_1.default('GetSessionID', {
const xmlApi = new XMLRequest_js_1.default('GetSessionID', {
RuName: ruName

@@ -60,3 +60,3 @@ }, this.getRequestConfig('GetSessionID'), this.req);

}
const xmlApi = new XMLRequest_1.default('FetchToken', {
const xmlApi = new XMLRequest_js_1.default('FetchToken', {
SessionID: sessionId

@@ -127,2 +127,1 @@ }, this.getRequestConfig('FetchToken'), this.req);

};
//# sourceMappingURL=authNAuth.js.map

@@ -1,6 +0,6 @@

import Base from '../api/base';
import { IEBayApiRequest } from '../request';
import { AppConfig } from '../types';
import AuthNAuth from './authNAuth';
import OAuth2 from './oAuth2';
import Base from '../api/base.js';
import { IEBayApiRequest } from '../request.js';
import { AppConfig } from '../types/index.js';
import AuthNAuth from './authNAuth.js';
import OAuth2 from './oAuth2.js';
/**

@@ -7,0 +7,0 @@ * Container with Auth'N'Auth and OAuth2.

@@ -6,13 +6,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = __importDefault(require("../api/base"));
const authNAuth_1 = __importDefault(require("./authNAuth"));
const oAuth2_1 = __importDefault(require("./oAuth2"));
const base_js_1 = __importDefault(require("../api/base.js"));
const authNAuth_js_1 = __importDefault(require("./authNAuth.js"));
const oAuth2_js_1 = __importDefault(require("./oAuth2.js"));
/**
* Container with Auth'N'Auth and OAuth2.
*/
class Auth extends base_1.default {
class Auth extends base_js_1.default {
constructor(config, req) {
super(config, req);
this.authNAuth = new authNAuth_1.default(this.config, this.req);
this.OAuth2 = new oAuth2_1.default(this.config, this.req);
this.authNAuth = new authNAuth_js_1.default(this.config, this.req);
this.OAuth2 = new oAuth2_js_1.default(this.config, this.req);
this.oAuth2 = this.OAuth2;

@@ -33,2 +33,1 @@ }

exports.default = Auth;
//# sourceMappingURL=index.js.map

@@ -1,4 +0,6 @@

import Base from '../api/base';
import { Scope } from '../types';
export declare type Token = {
import { EventCallback } from '../nanoevents.js';
import Base from '../api/base.js';
import { IEBayApiRequest } from '../request.js';
import { AppConfig, Scope } from '../types/index.js';
export type Token = {
access_token: string;

@@ -8,4 +10,4 @@ expires_in: number;

};
export declare type ClientToken = Token;
export declare type AuthToken = Token & {
export type ClientToken = Token;
export type AuthToken = Token & {
refresh_token: string;

@@ -24,6 +26,9 @@ refresh_token_expires_in: number;

static readonly defaultScopes: Scope;
static generateAuthUrl(sandbox: boolean, appId: string, ruName: string, scope: string[], state?: string): string;
private readonly emitter;
private scope;
private _clientToken?;
private _authToken?;
constructor(config: AppConfig, req: IEBayApiRequest);
on(event: string, callback: EventCallback): () => void;
static generateAuthUrl(sandbox: boolean, appId: string, ruName: string, scope: string[], state?: string): string;
get identityEndpoint(): string;

@@ -30,0 +35,0 @@ /**

@@ -7,3 +7,4 @@ "use strict";

const debug_1 = __importDefault(require("debug"));
const base_1 = __importDefault(require("../api/base"));
const nanoevents_js_1 = require("../nanoevents.js");
const base_js_1 = __importDefault(require("../api/base.js"));
const log = (0, debug_1.default)('ebay:oauth2');

@@ -16,7 +17,11 @@ /**

*/
class OAuth2 extends base_1.default {
constructor() {
super(...arguments);
class OAuth2 extends base_js_1.default {
constructor(config, req) {
super(config, req);
this.emitter = (0, nanoevents_js_1.createNanoEvents)();
this.scope = this.config.scope || OAuth2.defaultScopes;
}
on(event, callback) {
return this.emitter.on(event, callback);
}
static generateAuthUrl(sandbox, appId, ruName, scope, state = '') {

@@ -103,3 +108,3 @@ return [

this.setClientToken(token);
this.emit('refreshClientToken', token);
this.emitter.emit('refreshClientToken', token);
return token;

@@ -192,3 +197,3 @@ }

this.setCredentials(refreshedToken);
this.emit('refreshAuthToken', refreshedToken);
this.emitter.emit('refreshAuthToken', refreshedToken);
return refreshedToken;

@@ -265,2 +270,1 @@ }

OAuth2.defaultScopes = ['https://api.ebay.com/oauth/api_scope'];
//# sourceMappingURL=oAuth2.js.map

@@ -55,2 +55,1 @@ "use strict";

})(MarketplaceId = exports.MarketplaceId || (exports.MarketplaceId = {}));
//# sourceMappingURL=apiEnums.js.map

@@ -1,2 +0,2 @@

export * from './apiEnums';
export * from './restfulEnums';
export * from './apiEnums.js';
export * from './restfulEnums.js';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -13,4 +17,3 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./apiEnums"), exports);
__exportStar(require("./restfulEnums"), exports);
//# sourceMappingURL=index.js.map
__exportStar(require("./apiEnums.js"), exports);
__exportStar(require("./restfulEnums.js"), exports);

@@ -1017,2 +1017,1 @@ "use strict";

})(PackageType = exports.PackageType || (exports.PackageType = {}));
//# sourceMappingURL=restfulEnums.js.map

@@ -208,2 +208,1 @@ "use strict";

exports.checkEBayResponse = checkEBayResponse;
//# sourceMappingURL=index.js.map

@@ -1,56 +0,2 @@

import Api from './api';
import { Buy } from './api/restful/buy';
import { Commerce } from './api/restful/commerce';
import { Developer } from './api/restful/developer';
import { PostOrder } from './api/restful/postOrder';
import { Sell } from './api/restful/sell';
import AuthNAuth from './auth/authNAuth';
import OAuth2 from './auth/oAuth2';
import { ContentLanguage, Locale, MarketplaceId, SiteId } from './enums';
import { IEBayApiRequest } from './request';
import { AppConfig, ClientAlerts, Finding, Merchandising, Shopping, Trading } from './types';
declare class eBayApi extends Api {
static default: typeof eBayApi;
static SiteId: typeof SiteId;
static MarketplaceId: typeof MarketplaceId;
static ContentLanguage: typeof ContentLanguage;
static Locale: typeof Locale;
/**
* Loads config from `process.env`
*
* @return {eBayApi} a new eBayApi instance
* @param {request} req request
* @throws {ApiEnvError}
*/
static fromEnv(req?: IEBayApiRequest): eBayApi;
readonly authNAuth: AuthNAuth;
readonly oAuth2: OAuth2;
readonly OAuth2: OAuth2;
private readonly factory;
private _buy?;
private _commerce?;
private _developer?;
private _postOrder?;
private _sell?;
private _trading?;
private _finding?;
private _shopping?;
private _clientAlerts?;
private _merchandising?;
/**
* @param {AppConfig} config the app config
* @param {IEBayApiRequest} req the request
*/
constructor(config: AppConfig, req?: IEBayApiRequest);
get buy(): Buy;
get commerce(): Commerce;
get developer(): Developer;
get postOrder(): PostOrder;
get sell(): Sell;
get trading(): Trading;
get finding(): Finding;
get shopping(): Shopping;
get clientAlerts(): ClientAlerts;
get merchandising(): Merchandising;
}
import eBayApi from './eBayApi.js';
export = eBayApi;

@@ -5,93 +5,3 @@ "use strict";

};
const api_1 = __importDefault(require("./api"));
const apiFactory_1 = __importDefault(require("./api/apiFactory"));
const enums_1 = require("./enums");
const errors_1 = require("./errors");
const defaultConfig = {
sandbox: false,
autoRefreshToken: true,
siteId: enums_1.SiteId.EBAY_US,
marketplaceId: enums_1.MarketplaceId.EBAY_US,
acceptLanguage: enums_1.Locale.en_US,
contentLanguage: enums_1.ContentLanguage.en_US
};
// tslint:disable-next-line:class-name
class eBayApi extends api_1.default {
/**
* @param {AppConfig} config the app config
* @param {IEBayApiRequest} req the request
*/
constructor(config, req) {
super({ ...defaultConfig, ...config }, req);
this.factory = new apiFactory_1.default(this.config, this.req, this.auth);
// Shortcuts
this.authNAuth = this.auth.authNAuth;
this.OAuth2 = this.auth.OAuth2;
this.oAuth2 = this.OAuth2;
}
/**
* Loads config from `process.env`
*
* @return {eBayApi} a new eBayApi instance
* @param {request} req request
* @throws {ApiEnvError}
*/
static fromEnv(req) {
if (!process.env.EBAY_APP_ID) {
throw new errors_1.ApiEnvError('EBAY_APP_ID');
}
if (!process.env.EBAY_CERT_ID) {
throw new errors_1.ApiEnvError('EBAY_CERT_ID');
}
return new eBayApi({
appId: process.env.EBAY_APP_ID,
certId: process.env.EBAY_CERT_ID,
devId: process.env.EBAY_DEV_ID,
authToken: process.env.EBAY_AUTH_TOKEN,
siteId: process.env.EBAY_SITE_ID ? parseInt(process.env.EBAY_SITE_ID, 10) : enums_1.SiteId.EBAY_US,
marketplaceId: process.env.EBAY_MARKETPLACE_ID && process.env.EBAY_MARKETPLACE_ID in enums_1.MarketplaceId ?
enums_1.MarketplaceId[process.env.EBAY_MARKETPLACE_ID] :
enums_1.MarketplaceId.EBAY_US,
ruName: process.env.EBAY_RU_NAME,
sandbox: (process.env.EBAY_SANDBOX === 'true')
}, req);
}
get buy() {
return this._buy || (this._buy = this.factory.createBuyApi());
}
get commerce() {
return this._commerce || (this._commerce = this.factory.createCommerceApi());
}
get developer() {
return this._developer || (this._developer = this.factory.createDeveloperApi());
}
get postOrder() {
return this._postOrder || (this._postOrder = this.factory.createPostOrderApi());
}
get sell() {
return this._sell || (this._sell = this.factory.createSellApi());
}
// Traditional
get trading() {
return this._trading || (this._trading = this.factory.createTradingApi());
}
get finding() {
return this._finding || (this._finding = this.factory.createFindingApi());
}
get shopping() {
return this._shopping || (this._shopping = this.factory.createShoppingApi());
}
get clientAlerts() {
return this._clientAlerts || (this._clientAlerts = this.factory.createClientAlertsApi());
}
get merchandising() {
return this._merchandising || (this._merchandising = this.factory.createMerchandisingApi());
}
}
eBayApi.default = eBayApi;
eBayApi.SiteId = enums_1.SiteId;
eBayApi.MarketplaceId = enums_1.MarketplaceId;
eBayApi.ContentLanguage = enums_1.ContentLanguage;
eBayApi.Locale = enums_1.Locale;
module.exports = eBayApi;
//# sourceMappingURL=index.js.map
const eBayApi_js_1 = __importDefault(require("./eBayApi.js"));
module.exports = eBayApi_js_1.default;

@@ -10,9 +10,9 @@ import { AxiosInstance, AxiosRequestConfig } from 'axios';

};
export interface IEBayApiRequest<T = AxiosInstance> {
export interface IEBayApiRequest<T = AxiosInstance, C = AxiosRequestConfig> {
readonly instance: T;
get<R = any, C = any>(url: string, config?: C): Promise<R>;
delete<R = any, C = any>(url: string, config?: C): Promise<R>;
post<R = any, C = any>(url: string, data?: any, config?: C): Promise<R>;
postForm<R = any, C = any>(url: string, data?: any, config?: C): Promise<R>;
put<R = any, C = any>(url: string, data?: any, config?: C): Promise<R>;
get<R = any>(url: string, config?: C): Promise<R>;
delete<R = any>(url: string, config?: C): Promise<R>;
post<R = any>(url: string, data?: any, config?: C): Promise<R>;
postForm<R = any>(url: string, data?: any, config?: C): Promise<R>;
put<R = any>(url: string, data?: any, config?: C): Promise<R>;
}

@@ -19,0 +19,0 @@ export declare class AxiosRequest implements IEBayApiRequest {

@@ -9,3 +9,3 @@ "use strict";

const debug_1 = __importDefault(require("debug"));
const qs_1 = __importDefault(require("qs"));
const qs_1 = require("qs");
const log = (0, debug_1.default)('ebay:request');

@@ -47,3 +47,3 @@ exports.defaultGlobalHeaders = {

log('postForm: ' + url);
const body = qs_1.default.stringify(payload);
const body = (0, qs_1.stringify)(payload);
return this.instance.post(url, body, config);

@@ -53,2 +53,1 @@ }

exports.AxiosRequest = AxiosRequest;
//# sourceMappingURL=request.js.map
import { AxiosRequestConfig } from 'axios';
import { ContentLanguage, MarketplaceId } from '../enums';
export declare type Scope = string[];
export declare type Keyset = {
import { ContentLanguage, MarketplaceId } from '../enums/index.js';
export type Scope = string[];
export type Keyset = {
appId: string;

@@ -9,3 +9,3 @@ certId: string;

};
export declare type RestConfig = {
export type RestConfig = {
marketplaceId?: MarketplaceId;

@@ -16,7 +16,7 @@ endUserCtx?: string;

};
export declare type TraditionalConfig = {
export type TraditionalConfig = {
siteId?: number;
authToken?: string | null;
};
export declare type eBayConfig = Keyset & {
export type eBayConfig = Keyset & {
sandbox: boolean;

@@ -26,11 +26,11 @@ ruName?: string;

} & TraditionalConfig & RestConfig;
export declare type ApiConfig = {
export type ApiConfig = {
autoRefreshToken?: boolean;
axiosConfig?: AxiosRequestConfig;
};
export declare type Headers = Record<string, string | number | undefined>;
export declare type ApiRequestConfig = {
export type Headers = Record<string, string | number | undefined>;
export type ApiRequestConfig = {
headers?: Headers;
returnResponse?: boolean;
};
export declare type AppConfig = eBayConfig & ApiConfig;
export type AppConfig = eBayConfig & ApiConfig;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=apiTypes.js.map

@@ -1,3 +0,3 @@

export * from './apiTypes';
export * from './restfulTypes';
export * from './traditonalTypes';
export * from './apiTypes.js';
export * from './restfulTypes.js';
export * from './traditonalTypes.js';
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -13,5 +17,4 @@ if (k2 === undefined) k2 = k;

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./apiTypes"), exports);
__exportStar(require("./restfulTypes"), exports);
__exportStar(require("./traditonalTypes"), exports);
//# sourceMappingURL=index.js.map
__exportStar(require("./apiTypes.js"), exports);
__exportStar(require("./restfulTypes.js"), exports);
__exportStar(require("./traditonalTypes.js"), exports);

@@ -1,10 +0,10 @@

import { CancelReason, CaseSearchFieldGroup, CaseStatusFilter, CategoryType as CategoryTypeEnum, Condition, CountryCode, CurrencyCode, Decision, EscalateReason, FilePurpose, FormatType, InquirySearchFieldGroup, InquiryStatusFilter, LengthUnitOfMeasure, Locale, Marketplace, MarketplaceId, PackageType, PaymentMethodType, ReasonForRefund, RecipientAccountReferenceType, RefundFeeType, RefundMethod, RegionType, RequestType, ReturnCountFilter, ReturnMethod, ReturnReason, ReturnShippingCostPayer, ReturnState, ReturnType, ShippingCarrier, ShippingCostType, ShippingOptionType, StoreType, TimeDurationUnit, UserRoleFilter, WeightUnitOfMeasure } from '../enums';
export declare type AttributeNameValue = {
import { CancelReason, CaseSearchFieldGroup, CaseStatusFilter, CategoryType as CategoryTypeEnum, Condition, CountryCode, CurrencyCode, Decision, EscalateReason, FilePurpose, FormatType, InquirySearchFieldGroup, InquiryStatusFilter, LengthUnitOfMeasure, Locale, Marketplace, MarketplaceId, PackageType, PaymentMethodType, ReasonForRefund, RecipientAccountReferenceType, RefundFeeType, RefundMethod, RegionType, RequestType, ReturnCountFilter, ReturnMethod, ReturnReason, ReturnShippingCostPayer, ReturnState, ReturnType, ShippingCarrier, ShippingCostType, ShippingOptionType, StoreType, TimeDurationUnit, UserRoleFilter, WeightUnitOfMeasure } from '../enums/index.js';
export type AttributeNameValue = {
name: string;
value: string;
};
export declare type CompatibilityPayload = {
export type CompatibilityPayload = {
compatibilityProperties: AttributeNameValue[];
};
export declare type CatalogSearchParams = {
export type CatalogSearchParams = {
aspect_filter?: string;

@@ -18,3 +18,3 @@ category_ids?: string;

};
export declare type BrowseSearchParams = {
export type BrowseSearchParams = {
aspect_filter?: string;

@@ -33,3 +33,3 @@ category_ids?: string;

};
export declare type SearchByImageParams = {
export type SearchByImageParams = {
aspect_filter?: string;

@@ -43,3 +43,3 @@ category_ids?: string;

};
export declare type LegacyItemParams = {
export type LegacyItemParams = {
legacy_item_id: string;

@@ -50,18 +50,18 @@ fieldgroups?: string;

};
export declare type AddCartItemInput = {
export type AddCartItemInput = {
itemId: string;
quantity: number;
};
export declare type RemoveCartItemInput = {
export type RemoveCartItemInput = {
cartItemId: string;
};
export declare type UpdateCartItemInput = {
export type UpdateCartItemInput = {
cartItemId: string;
quantity: number;
};
export declare type SimpleAmount = {
export type SimpleAmount = {
currency: string;
value: string;
};
export declare type Amount = {
export type Amount = {
convertedFromCurrency?: CurrencyCode;

@@ -72,3 +72,3 @@ convertedFromValue?: number;

};
export declare type BuyFeedParams = {
export type BuyFeedParams = {
feed_scope: string;

@@ -78,3 +78,3 @@ category_id: string;

};
export declare type AlsoBoughtByProductParams = {
export type AlsoBoughtByProductParams = {
name?: string;

@@ -85,3 +85,3 @@ epid?: string;

};
export declare type AlsoViewedByProductParams = {
export type AlsoViewedByProductParams = {
brand?: string;

@@ -92,3 +92,3 @@ epid?: string;

};
export declare type MerchandisedProductsParams = {
export type MerchandisedProductsParams = {
aspect_filter?: false;

@@ -99,13 +99,13 @@ category_id: string;

};
export declare type UserConsent = {
export type UserConsent = {
adultOnlyItem: boolean;
};
export declare type PlaceProxyBidRequest = {
export type PlaceProxyBidRequest = {
maxAmount: Amount;
userConsent: UserConsent;
};
export declare type CouponRequest = {
export type CouponRequest = {
redemptionCode: string;
};
export declare type CreditCard = {
export type CreditCard = {
accountHolderName: string;

@@ -119,3 +119,3 @@ billingAddress: BillingAddress;

};
export declare type BillingAddress = {
export type BillingAddress = {
addressLine1: string;

@@ -131,10 +131,10 @@ addressLine2: string;

};
export declare type Wallet = {
export type Wallet = {
paymentToken: string;
};
export declare type LineItemInput = {
export type LineItemInput = {
itemId: string;
quantity: number;
};
export declare type ShippingAddress = {
export type ShippingAddress = {
addressLine1: string;

@@ -150,3 +150,3 @@ addressLine2: string;

};
export declare type CreateSignInCheckoutSessionRequest = {
export type CreateSignInCheckoutSessionRequest = {
creditCard: CreditCard;

@@ -156,11 +156,11 @@ lineItemInputs: LineItemInput;

};
export declare type UpdatePaymentInformation = {
export type UpdatePaymentInformation = {
creditCard: CreditCard;
wallet: Wallet;
};
export declare type UpdateQuantity = {
export type UpdateQuantity = {
lineItemId: string;
quantity: number;
};
export declare type ShippingAddressImpl = {
export type ShippingAddressImpl = {
addressLine1: string;

@@ -176,11 +176,11 @@ addressLine2: string;

};
export declare type Recipient = {
export type Recipient = {
firstName: string;
lastName: string;
};
export declare type UpdateShippingOption = {
export type UpdateShippingOption = {
lineItemId: string;
shippingOptionId: string;
};
export declare type CheckoutSessionRequest = {
export type CheckoutSessionRequest = {
contactEmail: string;

@@ -193,7 +193,7 @@ contactFirstName: string;

};
export declare type InitiatePaymentRequest = {
export type InitiatePaymentRequest = {
paymentMethodBrandType: string;
paymentMethodType: string;
};
export declare type MarketingTerms = {
export type MarketingTerms = {
marketingChannels: string[];

@@ -203,13 +203,13 @@ marketingTermsAccepted: boolean;

};
export declare type GuestPlaceOrderRequest = {
export type GuestPlaceOrderRequest = {
marketingTerms: MarketingTerms[];
};
export declare type Program = {
export type Program = {
programType: string;
};
export declare type LegacyReference = {
export type LegacyReference = {
legacyItemId: string;
legacyTransactionId: string;
};
export declare type RefundItem = {
export type RefundItem = {
refundAmount: Amount;

@@ -219,3 +219,3 @@ lineItemId: string;

};
export declare type IssueRefundRequest = {
export type IssueRefundRequest = {
reasonForRefund: ReasonForRefund;

@@ -226,3 +226,3 @@ comment?: string;

};
export declare type PaymentParams = {
export type PaymentParams = {
orderId?: string;

@@ -236,7 +236,7 @@ buyerUsername?: string;

};
export declare type Phone = {
export type Phone = {
countryCode: string;
number: number;
};
export declare type ReturnAddress = {
export type ReturnAddress = {
addressLine1: string;

@@ -252,14 +252,14 @@ addressLine2: string;

};
export declare type ContestPaymentDisputeRequest = {
export type ContestPaymentDisputeRequest = {
returnAddress: ReturnAddress;
revision: number;
};
export declare type FileEvidence = {
export type FileEvidence = {
fileId: string;
};
export declare type OrderLineItems = {
export type OrderLineItems = {
itemId: string;
lineItemId: string;
};
export declare type AddEvidencePaymentDisputeRequest = {
export type AddEvidencePaymentDisputeRequest = {
evidenceType: string;

@@ -269,6 +269,6 @@ files: FileEvidence[];

};
export declare type UpdateEvidencePaymentDisputeRequest = AddEvidencePaymentDisputeRequest & {
export type UpdateEvidencePaymentDisputeRequest = AddEvidencePaymentDisputeRequest & {
evidenceId: string;
};
export declare type Comments = {
export type Comments = {
content: string;

@@ -279,3 +279,3 @@ language?: string;

};
export declare type PostOrderItemizedRefundDetailType = {
export type PostOrderItemizedRefundDetailType = {
refundAmount: Amount;

@@ -285,7 +285,7 @@ refundFeeType: RefundFeeType;

};
export declare type RefundDetail = {
export type RefundDetail = {
itemizedRefundDetail: PostOrderItemizedRefundDetailType[];
totalAmount: Amount;
};
export declare type PostOrderIssueRefundRequest = {
export type PostOrderIssueRefundRequest = {
comments?: Comments;

@@ -295,15 +295,15 @@ refundDetail: RefundDetail;

};
export declare type Interval = {
export type Interval = {
close: string;
open: string;
};
export declare type OperatingHours = {
export type OperatingHours = {
dayOfWeekEnum: string;
intervals: Interval[];
};
export declare type SpecialHours = {
export type SpecialHours = {
date: string;
intervals: Interval[];
};
export declare type InventoryLocation = {
export type InventoryLocation = {
locationAdditionalInformation?: string;

@@ -317,11 +317,11 @@ locationInstructions?: string;

};
export declare type GeoCoordinates = {
export type GeoCoordinates = {
latitude: number;
longitude: number;
};
export declare type LocationDetails = {
export type LocationDetails = {
address: Address;
geoCoordinates?: GeoCoordinates;
};
export declare type InventoryLocationFull = InventoryLocation & {
export type InventoryLocationFull = InventoryLocation & {
location: LocationDetails;

@@ -331,3 +331,3 @@ locationTypes?: StoreType[];

};
export declare type AvailabilityDistribution = {
export type AvailabilityDistribution = {
fulfillmentTime?: TimeDuration;

@@ -337,7 +337,7 @@ merchantLocationKey: string;

};
export declare type ShipToLocationAvailability = {
export type ShipToLocationAvailability = {
availabilityDistributions?: AvailabilityDistribution[];
quantity: number;
};
export declare type OfferPriceQuantity = {
export type OfferPriceQuantity = {
offerId: string;

@@ -347,3 +347,3 @@ availableQuantity: number;

};
export declare type PriceQuantity = {
export type PriceQuantity = {
sku: string;

@@ -353,6 +353,6 @@ shipToLocationAvailability: ShipToLocationAvailability;

};
export declare type BulkPriceQuantity = {
export type BulkPriceQuantity = {
requests: PriceQuantity[];
};
export declare type PickupAtLocationAvailability = {
export type PickupAtLocationAvailability = {
availabilityType: string;

@@ -363,7 +363,7 @@ fulfillmentTime: TimeDuration;

};
export declare type Availability = {
export type Availability = {
pickupAtLocationAvailability?: PickupAtLocationAvailability;
shipToLocationAvailability: ShipToLocationAvailability;
};
export declare type Dimension = {
export type Dimension = {
height: number;

@@ -374,7 +374,7 @@ length: number;

};
export declare type Weight = {
export type Weight = {
unit: WeightUnitOfMeasure;
value: number;
};
export declare type PackageWeightAndSize = {
export type PackageWeightAndSize = {
dimensions?: Dimension;

@@ -384,3 +384,3 @@ packageType?: PackageType;

};
export declare type Product = {
export type Product = {
aspects?: any;

@@ -398,24 +398,24 @@ brand?: string;

};
export declare type InventoryItemWithSkuLocale = SellInventoryItem & {
export type InventoryItemWithSkuLocale = SellInventoryItem & {
sku: string;
locale?: Locale;
};
export declare type BulkInventoryItem = {
export type BulkInventoryItem = {
requests: InventoryItemWithSkuLocale[];
};
export declare type PublishByInventoryItemGroupRequest = {
export type PublishByInventoryItemGroupRequest = {
inventoryItemGroupKey: string;
marketplaceId: Marketplace;
};
export declare type WithdrawByInventoryItemGroupRequest = {
export type WithdrawByInventoryItemGroupRequest = {
inventoryItemGroupKey: string;
marketplaceId: Marketplace;
};
export declare type OfferKeyWithId = {
export type OfferKeyWithId = {
offerId: string;
};
export declare type OfferKeysWithId = {
export type OfferKeysWithId = {
offers: OfferKeyWithId[];
};
export declare type ShippingCostOverride = {
export type ShippingCostOverride = {
surcharge?: Amount;

@@ -427,3 +427,3 @@ additionalShippingCost?: Amount;

};
export declare type BestOffer = {
export type BestOffer = {
autoAcceptPrice?: Amount;

@@ -433,3 +433,3 @@ autoDeclinePrice?: Amount;

};
export declare type ListingPolicies = {
export type ListingPolicies = {
bestOfferTerms?: BestOffer;

@@ -442,3 +442,3 @@ paymentPolicyId: string;

};
export declare type PricingSummary = {
export type PricingSummary = {
minimumAdvertisedPrice?: Amount;

@@ -450,3 +450,3 @@ pricingVisibility?: string;

};
export declare type Tax = {
export type Tax = {
applyTax: boolean;

@@ -456,7 +456,7 @@ thirdPartyTaxCategory?: string;

};
export declare type Charity = {
export type Charity = {
charityId: string;
donationPercentage: string;
};
export declare type EbayOfferDetailsWithId = {
export type EbayOfferDetailsWithId = {
availableQuantity?: number;

@@ -477,3 +477,3 @@ categoryId?: string;

};
export declare type EbayOfferDetailsWithKeys = EbayOfferDetailsWithId & {
export type EbayOfferDetailsWithKeys = EbayOfferDetailsWithId & {
sku: string;

@@ -483,18 +483,18 @@ marketplaceId: Marketplace;

};
export declare type BulkEbayOfferDetailsWithKeys = {
export type BulkEbayOfferDetailsWithKeys = {
requests: EbayOfferDetailsWithKeys[];
};
export declare type BulkOffer = {
export type BulkOffer = {
requests: OfferKeyWithId[];
};
export declare type MigrateListing = {
export type MigrateListing = {
listingId: string;
};
export declare type BulkMigrateListing = {
export type BulkMigrateListing = {
requests: MigrateListing[];
};
export declare type FindListingRecommendationRequest = {
export type FindListingRecommendationRequest = {
listingIds: string[];
};
export declare type TranslateRequest = {
export type TranslateRequest = {
from: string;

@@ -505,3 +505,3 @@ to: string;

};
export declare type CreateAdsByInventoryReferenceRequest = {
export type CreateAdsByInventoryReferenceRequest = {
bidPercentage: string;

@@ -511,33 +511,33 @@ inventoryReferenceId: string;

};
export declare type BulkCreateAdsByInventoryReferenceRequest = {
export type BulkCreateAdsByInventoryReferenceRequest = {
requests: CreateAdsByInventoryReferenceRequest[];
};
export declare type CreateAdRequest = {
export type CreateAdRequest = {
bidPercentage: string;
listingId: string;
};
export declare type BulkCreateAdRequest = {
export type BulkCreateAdRequest = {
requests: CreateAdRequest[];
};
export declare type DeleteAdsByInventoryReferenceRequest = {
export type DeleteAdsByInventoryReferenceRequest = {
inventoryReferenceId: string;
inventoryReferenceType: string;
};
export declare type BulkDeleteAdsByInventoryReferenceRequest = {
export type BulkDeleteAdsByInventoryReferenceRequest = {
requests: DeleteAdsByInventoryReferenceRequest[];
};
export declare type DeleteAdRequest = {
export type DeleteAdRequest = {
listingId: string;
};
export declare type BulkDeleteAdRequest = {
export type BulkDeleteAdRequest = {
requests: DeleteAdRequest[];
};
export declare type UpdateBidPercentageRequest = {
export type UpdateBidPercentageRequest = {
bidPercentage: string;
};
export declare type FundingStrategy = {
export type FundingStrategy = {
bidPercentage: string;
fundingModel: string;
};
export declare type CloneCampaignRequest = {
export type CloneCampaignRequest = {
campaignName: string;

@@ -548,3 +548,3 @@ endDate: string;

};
export declare type UpdateCampaignIdentificationRequest = {
export type UpdateCampaignIdentificationRequest = {
campaignName: string;

@@ -554,3 +554,3 @@ endDate: string;

};
export declare type DiscountBenefit = {
export type DiscountBenefit = {
amountOffItem: Amount;

@@ -561,6 +561,6 @@ amountOffOrder: Amount;

};
export declare type InventoryItem = {
export type InventoryItem = {
inventoryReferenceId: string;
};
export declare type SelectionRule = {
export type SelectionRule = {
brands: string[];

@@ -573,3 +573,3 @@ categoryIds: string[];

};
export declare type RuleCriteria = {
export type RuleCriteria = {
excludeInventoryItems: InventoryItem[];

@@ -581,3 +581,3 @@ excludeListingIds: string[];

};
export declare type InventoryCriterion = {
export type InventoryCriterion = {
inventoryCriterionType: string;

@@ -588,3 +588,3 @@ inventoryItems: InventoryItem;

};
export declare type SelectedInventoryDiscount = {
export type SelectedInventoryDiscount = {
discountBenefit: DiscountBenefit;

@@ -595,3 +595,3 @@ discountId: string;

};
export declare type ItemPriceMarkdown = {
export type ItemPriceMarkdown = {
applyFreeShipping: boolean;

@@ -610,3 +610,3 @@ autoSelectFutureInventory: boolean;

};
export declare type DiscountSpecification = {
export type DiscountSpecification = {
properties: Amount;

@@ -618,3 +618,3 @@ forEachQuantity: number;

};
export declare type DiscountRule = {
export type DiscountRule = {
discountBenefit: DiscountBenefit;

@@ -624,3 +624,3 @@ discountSpecification: DiscountSpecification;

};
export declare type ItemPromotion = {
export type ItemPromotion = {
applyDiscountToSingleItemOnly: boolean;

@@ -639,7 +639,7 @@ description: string;

};
export declare type DateTime = {
export type DateTime = {
formattedValue?: string;
value: string;
};
export declare type LineItem = {
export type LineItem = {
itemId: number;

@@ -649,3 +649,3 @@ quantity: number;

};
export declare type CreateCancelRequest = {
export type CreateCancelRequest = {
buyerPaid?: boolean;

@@ -657,11 +657,11 @@ buyerPaidDate?: DateTime;

};
export declare type ConfirmRefundRequest = {
export type ConfirmRefundRequest = {
refundDate?: DateTime;
unpaidOrder?: boolean;
};
export declare type RejectCancelRequest = {
export type RejectCancelRequest = {
shipmentDate?: DateTime;
trackingNumber?: string;
};
export declare type CancelSortField = {
export type CancelSortField = {
ascending: boolean;

@@ -671,3 +671,3 @@ enumValue: 'CANCEL_ID' | 'CANCEL_REQUEST_DATE';

};
export declare type CancellationSearchParams = {
export type CancellationSearchParams = {
cancel_id?: string;

@@ -684,3 +684,3 @@ creation_date_range_from?: string;

};
export declare type Text = {
export type Text = {
content: string;

@@ -691,10 +691,10 @@ language?: string;

};
export declare type AppealRequest = {
export type AppealRequest = {
comments: Text;
};
export declare type BuyerCloseCaseRequest = {
export type BuyerCloseCaseRequest = {
closeReason: boolean;
comments?: Text;
};
export declare type Address = {
export type Address = {
addressLine1?: string;

@@ -714,3 +714,3 @@ addressLine2?: string;

};
export declare type ReturnAddressRequest = {
export type ReturnAddressRequest = {
firstName?: string;

@@ -721,3 +721,3 @@ lastName?: string;

};
export declare type CaseSearchParams = {
export type CaseSearchParams = {
case_creation_date_range_from: string;

@@ -735,12 +735,12 @@ case_creation_date_range_to: string;

};
export declare type CheckInquiryEligibilityRequest = {
export type CheckInquiryEligibilityRequest = {
itemId: string;
transactionId: string;
};
export declare type Token = string;
export declare type BuyerCloseInquiryRequest = {
export type Token = string;
export type BuyerCloseInquiryRequest = {
closeReason?: Token;
comments?: Text;
};
export declare type CreateInquiryRequest = {
export type CreateInquiryRequest = {
claimQuantity?: number;

@@ -752,13 +752,13 @@ comments?: Text;

};
export declare type EscalateInquiryRequest = {
export type EscalateInquiryRequest = {
comments?: Text;
escalateInquiryReason: Token;
};
export declare type InquiryVoluntaryRefundRequest = {
export type InquiryVoluntaryRefundRequest = {
comments?: Text;
};
export declare type SellerProvideRefundInfoRequest = {
export type SellerProvideRefundInfoRequest = {
message: Text;
};
export declare type ShipmentInfoRequest = {
export type ShipmentInfoRequest = {
proofOfShipmentUploaded?: boolean;

@@ -771,3 +771,3 @@ sellerComments?: Text;

};
export declare type InquirySearchParams = {
export type InquirySearchParams = {
fieldgroups?: InquirySearchFieldGroup;

@@ -784,6 +784,6 @@ inquiry_creation_date_range_from?: string;

};
export declare type SendMessageRequest = {
export type SendMessageRequest = {
message: Text;
};
export declare type UpdateTrackingRequest = {
export type UpdateTrackingRequest = {
newCarrierEnum?: ShippingCarrier;

@@ -796,3 +796,3 @@ newCarrierName?: string;

};
export declare type ReturnRequestType = {
export type ReturnRequestType = {
carrier?: ShippingCarrier;

@@ -807,10 +807,10 @@ comments?: Text;

};
export declare type SetReturnCreationSessionRequest = {
export type SetReturnCreationSessionRequest = {
returnRequest: ReturnRequestType;
};
export declare type CreateReturnRequest = {
export type CreateReturnRequest = {
draftId?: string;
returnRequest: ReturnRequestType;
};
export declare type ProvideLabelRequest = {
export type ProvideLabelRequest = {
carrierEnum?: ShippingCarrier;

@@ -827,7 +827,7 @@ carrierName?: string;

};
export declare type CloseReturnRequest = {
export type CloseReturnRequest = {
buyerCloseReason?: Token;
comments?: Text;
};
export declare type CheckEligibilityRequest = {
export type CheckEligibilityRequest = {
checkTypes: Token[];

@@ -839,7 +839,7 @@ itemId: string;

};
export declare type EscalateRequest = {
export type EscalateRequest = {
comments: Text;
reason: EscalateReason;
};
export declare type GetEstimateRequest = {
export type GetEstimateRequest = {
itemId: string;

@@ -850,14 +850,14 @@ reason?: ReturnReason;

};
export declare type MarkAsReceivedRequest = {
export type MarkAsReceivedRequest = {
comments?: Text;
};
export declare type ItemizedRefundDetailType = {
export type ItemizedRefundDetailType = {
refundAmount: Amount;
refundFeeType: Token;
};
export declare type RefundDetailType = {
export type RefundDetailType = {
itemizedRefundDetail: ItemizedRefundDetailType;
totalAmount: Amount;
};
export declare type MarkRefundSentRequest = {
export type MarkRefundSentRequest = {
comments?: Text;

@@ -867,3 +867,3 @@ partialRefundAmount?: Amount;

};
export declare type MarkAsShippedRequest = {
export type MarkAsShippedRequest = {
carrierEnum?: ShippingCarrier;

@@ -876,3 +876,3 @@ carrierName?: string;

};
export declare type UploadFileRequest = {
export type UploadFileRequest = {
data: any;

@@ -882,7 +882,7 @@ fileName?: string;

};
export declare type VoidLabelRequest = {
export type VoidLabelRequest = {
comments?: Text;
labelId: string;
};
export declare type SearchReturnParams = {
export type SearchReturnParams = {
creation_date_range_from?: string;

@@ -901,3 +901,3 @@ creation_date_range_to?: string;

};
export declare type DecideReturnRequest = {
export type DecideReturnRequest = {
comments?: Text;

@@ -910,19 +910,19 @@ decision: Decision;

};
export declare type CategoryType = {
export type CategoryType = {
default?: boolean;
name: CategoryTypeEnum;
};
export declare type TimeDuration = {
export type TimeDuration = {
unit: TimeDurationUnit;
value: number;
};
export declare type Region = {
export type Region = {
regionName: string;
regionType?: RegionType;
};
export declare type RegionSet = {
export type RegionSet = {
regionExcluded?: Region[];
regionIncluded?: Region[];
};
export declare type ShippingService = {
export type ShippingService = {
additionalShippingCost?: Amount;

@@ -940,3 +940,3 @@ buyerResponsibleForPickup?: boolean;

};
export declare type ShippingOption = {
export type ShippingOption = {
costType: ShippingCostType;

@@ -950,3 +950,3 @@ insuranceFee?: Amount;

};
export declare type FulfillmentPolicyRequest = {
export type FulfillmentPolicyRequest = {
categoryTypes: CategoryType[];

@@ -964,7 +964,7 @@ description?: string;

};
export declare type RecipientAccountReference = {
export type RecipientAccountReference = {
referenceId: string;
referenceType: RecipientAccountReferenceType;
};
export declare type PaymentMethod = {
export type PaymentMethod = {
brands?: string[];

@@ -974,3 +974,3 @@ paymentMethodType?: PaymentMethodType;

};
export declare type Deposit = {
export type Deposit = {
amount?: Amount;

@@ -980,3 +980,3 @@ dueIn?: TimeDuration;

};
export declare type PaymentPolicyRequest = {
export type PaymentPolicyRequest = {
categoryTypes: CategoryType[];

@@ -992,3 +992,3 @@ deposit?: Deposit;

};
export declare type InternationalReturnOverrideType = {
export type InternationalReturnOverrideType = {
returnMethod?: ReturnMethod;

@@ -999,3 +999,3 @@ returnPeriod?: TimeDuration;

};
export declare type ReturnPolicyRequest = {
export type ReturnPolicyRequest = {
categoryTypes?: CategoryType[];

@@ -1015,11 +1015,11 @@ description?: string;

};
export declare type SalesTaxBase = {
export type SalesTaxBase = {
salesTaxPercentage: string;
shippingAndHandlingTaxed: boolean;
};
export declare type LineItemReference = {
export type LineItemReference = {
lineItemId: string;
quantity?: number;
};
export declare type ShippingFulfillmentDetails = {
export type ShippingFulfillmentDetails = {
lineItems: LineItemReference[];

@@ -1030,3 +1030,3 @@ shippedDate?: string;

};
export declare type SellInventoryItem = {
export type SellInventoryItem = {
availability: Availability;

@@ -1038,3 +1038,3 @@ condition: Condition;

};
export declare type ProductFamilyProperties = {
export type ProductFamilyProperties = {
make: string;

@@ -1046,3 +1046,3 @@ model: string;

};
export declare type ProductIdentifier = {
export type ProductIdentifier = {
epid?: string;

@@ -1052,7 +1052,7 @@ gtin?: string;

};
export declare type NameValueList = {
export type NameValueList = {
name: string;
value: string;
};
export declare type CompatibleProduct = {
export type CompatibleProduct = {
compatibilityProperties?: NameValueList[];

@@ -1063,14 +1063,14 @@ productFamilyProperties?: ProductFamilyProperties;

};
export declare type Compatibility = {
export type Compatibility = {
compatibleProducts: CompatibleProduct[];
};
export declare type Specification = {
export type Specification = {
name: string;
values: string[];
};
export declare type VariesBy = {
export type VariesBy = {
aspectsImageVariesBy: string[];
specifications: Specification[];
};
export declare type InventoryItemGroup = {
export type InventoryItemGroup = {
aspects: any;

@@ -1085,3 +1085,3 @@ description: string;

};
export declare type CampaignCriterion = {
export type CampaignCriterion = {
autoSelectFutureInventory: boolean;

@@ -1091,3 +1091,3 @@ criterionType: string;

};
export declare type CreateCampaignRequest = {
export type CreateCampaignRequest = {
campaignCriterion: CampaignCriterion;

@@ -1100,7 +1100,7 @@ campaignName: string;

};
export declare type InventoryReference = {
export type InventoryReference = {
inventoryReferenceId?: string;
inventoryReferenceType?: string;
};
export declare type CreateReportTask = {
export type CreateReportTask = {
campaignIds: string[];

@@ -1117,3 +1117,3 @@ dateFrom: string;

};
export declare type SellFeedParams = {
export type SellFeedParams = {
dateRange?: string;

@@ -1126,3 +1126,3 @@ feedType?: string;

};
export declare type MarketingInsightsSearchParams = {
export type MarketingInsightsSearchParams = {
aspectFilter?: string;

@@ -1139,7 +1139,7 @@ categoryIds?: string;

};
export declare type NotificationParams = {
export type NotificationParams = {
limit?: string;
continuationToken?: string;
};
export declare type SubscriptionPayloadDetail = {
export type SubscriptionPayloadDetail = {
format: string;

@@ -1149,3 +1149,3 @@ schemaVersion: string;

};
export declare type CreateSubscriptionRequest = {
export type CreateSubscriptionRequest = {
topicId: string;

@@ -1156,8 +1156,8 @@ status: string;

};
export declare type UpdateSubscriptionRequest = Omit<CreateSubscriptionRequest, 'topicId'>;
export declare type DeliveryConfig = {
export type UpdateSubscriptionRequest = Omit<CreateSubscriptionRequest, 'topicId'>;
export type DeliveryConfig = {
endpoint: string;
verificationToken: string;
};
export declare type DestinationRequest = {
export type DestinationRequest = {
name: string;

@@ -1167,12 +1167,12 @@ status: string;

};
export declare type NotificationConfig = {
export type NotificationConfig = {
alertEmail: string;
};
export declare type ItemsParams = {
export type ItemsParams = {
itemIds: string;
itemGroupIds: string;
};
export declare type SuppressViolationRequest = {
export type SuppressViolationRequest = {
complianceType: string;
listingId: string;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=restfulTypes.js.map

@@ -1,29 +0,29 @@

import ClientAlertsCalls from '../api/traditional/clientAlerts';
import { Fields } from '../api/traditional/fields';
import FindingCalls from '../api/traditional/finding';
import ShoppingCalls from '../api/traditional/shopping';
import TradingCalls from '../api/traditional/trading';
import MerchandisingCalls from '../api/traditional/merchandising';
import { TraditionalApiConfig } from '../api/traditional/XMLRequest';
export declare type XMLApiCall = (fields?: Fields, apiConfig?: TraditionalApiConfig) => Promise<any>;
export declare type Trading = {
import ClientAlertsCalls from '../api/traditional/clientAlerts/index.js';
import { Fields } from '../api/traditional/fields.js';
import FindingCalls from '../api/traditional/finding/index.js';
import MerchandisingCalls from '../api/traditional/merchandising/index.js';
import ShoppingCalls from '../api/traditional/shopping/index.js';
import TradingCalls from '../api/traditional/trading/index.js';
import { TraditionalApiConfig } from '../api/traditional/XMLRequest.js';
export type XMLApiCall = (fields?: Fields, apiConfig?: TraditionalApiConfig) => Promise<any>;
export type Trading = {
[key in typeof TradingCalls[number]]: XMLApiCall;
};
export declare type Shopping = {
export type Shopping = {
[key in typeof ShoppingCalls[number]]: XMLApiCall;
};
export declare type Finding = {
export type Finding = {
[key in typeof FindingCalls[number]]: XMLApiCall;
};
export declare type ClientAlerts = {
export type ClientAlerts = {
[key in typeof ClientAlertsCalls[number]]: (fields?: object, options?: TraditionalApiConfig) => Promise<any>;
};
export declare type Merchandising = {
export type Merchandising = {
[key in typeof MerchandisingCalls[number]]: (fields?: object, options?: TraditionalApiConfig) => Promise<any>;
};
declare type Endpoint = {
type Endpoint = {
production: string;
sandbox: string;
};
export declare type TraditionalApi = {
export type TraditionalApi = {
endpoint: Endpoint;

@@ -30,0 +30,0 @@ xmlns: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=traditonalTypes.js.map
{
"name": "ebay-api",
"author": "Daniil Tomilow",
"version": "7.1.3",
"description": "eBay TypeScript/JavaScript API for Node and Browser",
"version": "8.0.0-RC.0",
"description": "eBay API for Node and Browser",
"type": "module",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"module": "./dist/eBayApi.js",
"browser": "./lib/ebay-api.min.js",
"main": "./lib/index.js",
"types": "./lib/index.d.js",
"browser:esm": "./dist/ebay-api.min.mjs",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/eBayApi.d.ts",
"default": "./dist/eBayApi.js"
},
"require": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
}
},
"./lib/*": {
"import": {
"types": "./dist/*",
"default": "./dist/*"
},
"require": {
"types": "./lib/*",
"default": "./lib/*"
}
},
"./lib/enums": {
"import": {
"types": "./dist/enums/index.d.ts",
"default": "./dist/enums/index.js"
},
"require": {
"types": "./lib/enums/index.d.ts",
"default": "./lib/enums/index.js"
}
},
"./lib/errors": {
"import": {
"types": "./dist/errors/index.d.ts",
"default": "./dist/errors/index.js"
},
"require": {
"types": "./lib/errors/index.d.ts",
"default": "./lib/errors/index.js"
}
},
"./lib/types": {
"import": {
"types": "./dist/types/index.d.ts",
"default": "./dist/types/index.js"
},
"require": {
"types": "./lib/types/index.d.ts",
"default": "./lib/types/index.js"
}
},
"./*": {
"import": {
"types": "./dist/*",
"default": "./dist/*"
},
"require": {
"types": "./lib/*",
"default": "./lib/*"
}
}
},
"scripts": {
"build": "rimraf lib && tsc && rollup -c",
"cjs:fix": "node -e \"require('fs').writeFileSync('lib/package.json', JSON.stringify({type: 'commonjs'}, null, 2))\"",
"build": "rimraf lib dist && tsc && tsc --project tsconfig.cjs.json && rollup -c --bundleConfigAsCjs && npm run cjs:fix",
"prepare": "npm run build",
"coverage": "codecov",
"tslint": "tslint -c tslint.json '{src,test,examples}/**/*.ts'",
"test": "mocha -r ts-node/register 'test/**/*.spec.ts' --reporter=dot",
"report": "nyc npm run test",
"report:summary": "nyc --reporter=lcov --reporter=text-summary npm run test",
"test": "mocha --reporter=dot",
"report": "c8 npm run test",
"report:summary": "c8 --reporter=lcov --reporter=text-summary npm run test",
"prerelease": "npm run tslint && npm run test && npm run build",

@@ -22,33 +88,31 @@ "release": "standard-version",

"dependencies": {
"axios": "^0.21.4",
"debug": "^2.1.1",
"fast-xml-parser": "^3.21.1",
"nanoevents": "^2.0.0",
"qs": "^6.8.0"
"axios": "^1.2.1",
"debug": "^4.3.4",
"fast-xml-parser": "^4.0.12",
"qs": "^6.11.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-strip": "^2.0.0",
"@types/chai": "^4.2.3",
"@types/debug": "^4.1.5",
"@types/mocha": "^5.2.7",
"@types/nanoevents": "^1.0.0",
"@types/node": "^12.7.4",
"@types/qs": "^6.5.3",
"@types/sinon": "^7.0.13",
"chai": "^3.5.0",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^5.0.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.2.0",
"@types/chai": "^4.3.4",
"@types/debug": "^4.1.7",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.10",
"@types/qs": "^6.9.7",
"@types/sinon": "^10.0.13",
"c8": "^7.11.3",
"chai": "^4.3.7",
"form-data": "^4.0.0",
"mocha": "^10.1.0",
"nyc": "^15.1.0",
"readline": "^1.3.0",
"rimraf": "^3.0.2",
"rollup": "^2.28.2",
"rollup-plugin-terser": "^7.0.2",
"rollup": "^3.7.0",
"rollup-plugin-bundle-size": "^1.0.3",
"sinon": "^7.4.2",
"standard-version": "^9.0.0",
"ts-node": "^8.4.1",
"ts-node": "^10.8.0",
"tslint": "^6.1.0",
"typescript": "^4.0.3"
"typescript": "^4.9.3"
},

@@ -123,5 +187,6 @@ "repository": {

},
"files": [
"lib"
"includes": [
"lib",
"dist"
]
}

@@ -23,3 +23,3 @@ # eBay Node API in TypeScript with Browser support

* `v7.1.3` is the latest release.
* `v8.0.0-RC.0` is the latest release.
* See [here](https://github.com/hendt/ebay-api/blob/master/CHANGELOG.md) for the full changelog.

@@ -80,2 +80,3 @@

#### Detailed configuration example
```javascript

@@ -90,4 +91,4 @@ import eBayApi from 'ebay-api';

siteId: eBayApi.SiteId.EBAY_US, // required for traditional APIs, see https://developer.ebay.com/DevZone/merchandising/docs/Concepts/SiteIDToGlobalID.html
marketplaceId: eBayApi.MarketplaceId.EBAY_US, // defautl. required for RESTful APIs
marketplaceId: eBayApi.MarketplaceId.EBAY_US, // defautl. required for RESTful APIs
acceptLanguage: eBayApi.Locale.en_US, // defautl

@@ -99,3 +100,3 @@ contentLanguage: eBayApi.ContentLanguage.en_US, // defautl.

ruName: '-- eBay Redirect URL name --', // 'RuName' (eBay Redirect URL name) required for authorization code grant
authToken: '-- Auth\'n\'Auth for traditional API (used by trading) --', // can be set to use traditional API without code grant

@@ -113,24 +114,24 @@ });

```html
```html
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ebay-api@latest/lib/ebay-api.min.js"></script>
<script>
const eBay = new eBayApi({
appId: 'appId',
certId: 'certId',
sandbox: false
});
appId: 'appId',
certId: 'certId',
sandbox: false
});
// eBay.req.instance is AxiosInstance per default
eBay.req.instance.interceptors.request.use((request) => {
// Add Proxy
request.url = 'https://ebay.hendt.workers.dev/' + request.url;
return request;
});
// eBay.req.instance is AxiosInstance per default
eBay.req.instance.interceptors.request.use((request) => {
// Add Proxy
request.url = 'https://ebay.hendt.workers.dev/' + request.url;
return request;
});
eBay.buy.browse.getItem('v1|254188828753|0').then(item => {
console.log(JSON.stringify(item, null, 2));
}).catch(e => {
console.error(e);
});
eBay.buy.browse.getItem('v1|254188828753|0').then(item => {
console.log(JSON.stringify(item, null, 2));
}).catch(e => {
console.error(e);
});
</script>

@@ -245,3 +246,3 @@ ```

res.send(orders);
} catch(e) {
} catch (e) {
console.error(e)

@@ -267,3 +268,3 @@ res.sendStatus(400)

eBay.OAuth2.setCredentials(token);
// If token get's refreshed

@@ -273,3 +274,3 @@ eBay.OAuth2.on('refreshAuthToken', (token) => {

});
try {

@@ -279,3 +280,3 @@ // 5. Start using the API

res.send(order);
} catch(e) {
} catch (e) {
console.error(e)

@@ -354,10 +355,13 @@ res.sendStatus(400)

### RESTful API headers
```javascript
const eBay = new eBayApi();
eBay.buy.browse.api({headers: {
'X-EBAY-SOA-GLOBAL-ID': 'EBAY-DE'
}}).getItem('v1|382282567190|651094235351').then((item) => {
console.log(item)
})
eBay.buy.browse.api({
headers: {
'X-EBAY-SOA-GLOBAL-ID': 'EBAY-DE'
}
}).getItem('v1|382282567190|651094235351').then((item) => {
console.log(item)
})
```

@@ -383,11 +387,13 @@

### Low level: use the Axios interceptor to manipulate the request
```javascript
import eBayApi from 'ebay-api';
const eBay = new eBayApi(/* { your config here } */);
import eBayApi from 'ebay-api';
eBay.req.instance.interceptors.request.use((request) => {
// Add Header
request.headers['X-EBAY-SOA-GLOBAL-ID'] = 'EBAY-DE';
return request;
})
const eBay = new eBayApi(/* { your config here } */);
eBay.req.instance.interceptors.request.use((request) => {
// Add Header
request.headers['X-EBAY-SOA-GLOBAL-ID'] = 'EBAY-DE';
return request;
})
```

@@ -403,22 +409,22 @@

```javascript
import eBayApi from 'ebay-api';
import zlib from 'zlib';
import eBayApi from 'ebay-api';
import zlib from 'zlib';
const toString = (data) => new Promise((resolve) => {
zlib.gunzip(data, (err, output) => {
if (err) throw err;
resolve(output.toString());
});
const toString = (data) => new Promise((resolve) => {
zlib.gunzip(data, (err, output) => {
if (err) throw err;
resolve(output.toString());
});
});
const eBay = new eBayApi(/* { your config here } */);
const eBay = new eBayApi(/* { your config here } */);
try {
const data = await eBay.commerce.taxonomy.fetchItemAspects(/* categoryTreeId */);
const result = await toString(data);
console.log(result)
} catch (e) {
console.error(e);
}
try {
const data = await eBay.commerce.taxonomy.fetchItemAspects(/* categoryTreeId */);
const result = await toString(data);
console.log(result)
} catch (e) {
console.error(e);
}
```

@@ -425,0 +431,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc