ebay-api 9.1.1 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +3 -3
  2. package/dist/api/apiFactory.js +3 -2
  3. package/dist/api/restful/developer/analytics/index.d.ts +1 -1
  4. package/dist/api/restful/sell/account/{index.d.ts → v1.d.ts} +1 -1
  5. package/dist/api/restful/sell/account/{index.js → v1.js} +3 -3
  6. package/dist/api/restful/sell/account/v2.d.ts +11 -0
  7. package/dist/api/restful/sell/account/v2.js +22 -0
  8. package/dist/api/restful/sell/feed/index.js +8 -2
  9. package/dist/api/restful/sell/fulfillment/index.d.ts +1 -1
  10. package/dist/api/restful/sell/index.d.ts +5 -3
  11. package/dist/api/restful/sell/index.js +3 -2
  12. package/dist/api/restful/sell/inventory/index.d.ts +4 -1
  13. package/dist/api/restful/sell/inventory/index.js +17 -2
  14. package/dist/ebay-api.min.mjs +1 -1
  15. package/dist/errors/index.js +8 -0
  16. package/dist/types/restful/specs/sell_account_v2_oas3.d.ts +154 -0
  17. package/dist/types/restful/specs/sell_account_v2_oas3.js +1 -0
  18. package/dist/types/restful/specs/sell_inventory_v1_oas3.d.ts +133 -4
  19. package/dist/types/restfulTypes.d.ts +12 -8
  20. package/lib/api/apiFactory.js +2 -1
  21. package/lib/api/restful/developer/analytics/index.d.ts +1 -1
  22. package/lib/api/restful/sell/account/{index.d.ts → v1.d.ts} +1 -1
  23. package/lib/api/restful/sell/account/{index.js → v1.js} +3 -3
  24. package/lib/api/restful/sell/account/v2.d.ts +11 -0
  25. package/lib/api/restful/sell/account/v2.js +27 -0
  26. package/lib/api/restful/sell/feed/index.js +8 -2
  27. package/lib/api/restful/sell/fulfillment/index.d.ts +1 -1
  28. package/lib/api/restful/sell/index.d.ts +5 -3
  29. package/lib/api/restful/sell/index.js +29 -27
  30. package/lib/api/restful/sell/inventory/index.d.ts +4 -1
  31. package/lib/api/restful/sell/inventory/index.js +17 -2
  32. package/lib/ebay-api.min.js +1 -1
  33. package/lib/errors/index.js +8 -0
  34. package/lib/types/restful/specs/sell_account_v2_oas3.d.ts +154 -0
  35. package/lib/types/restful/specs/sell_account_v2_oas3.js +2 -0
  36. package/lib/types/restful/specs/sell_inventory_v1_oas3.d.ts +133 -4
  37. package/lib/types/restfulTypes.d.ts +12 -8
  38. package/package.json +1 -1
@@ -3,30 +3,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- 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;
7
- const index_js_1 = __importDefault(require("./account/index.js"));
8
- exports.Account = index_js_1.default;
9
- const index_js_2 = __importDefault(require("./analytics/index.js"));
10
- exports.Analytics = index_js_2.default;
11
- const index_js_3 = __importDefault(require("./compliance/index.js"));
12
- exports.Compliance = index_js_3.default;
13
- const index_js_4 = __importDefault(require("./finances/index.js"));
14
- exports.Finances = index_js_4.default;
15
- const index_js_5 = __importDefault(require("./fulfillment/index.js"));
16
- exports.Fulfillment = index_js_5.default;
17
- const index_js_6 = __importDefault(require("./inventory/index.js"));
18
- exports.Inventory = index_js_6.default;
19
- const index_js_7 = __importDefault(require("./marketing/index.js"));
20
- exports.Marketing = index_js_7.default;
21
- const index_js_8 = __importDefault(require("./metadata/index.js"));
22
- exports.Metadata = index_js_8.default;
23
- const index_js_9 = __importDefault(require("./recommendation/index.js"));
24
- exports.Recommendation = index_js_9.default;
25
- const index_js_10 = __importDefault(require("./feed/index.js"));
26
- exports.Feed = index_js_10.default;
27
- const index_js_11 = __importDefault(require("./logistics/index.js"));
28
- exports.Logistics = index_js_11.default;
29
- const index_js_12 = __importDefault(require("./negotiation/index.js"));
30
- exports.Negotiation = index_js_12.default;
31
- const index_js_13 = __importDefault(require("./listing/index.js"));
32
- exports.Listing = index_js_13.default;
6
+ 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.AccountV2 = exports.AccountV1 = void 0;
7
+ const v1_js_1 = __importDefault(require("./account/v1.js"));
8
+ exports.AccountV1 = v1_js_1.default;
9
+ const v2_js_1 = __importDefault(require("./account/v2.js"));
10
+ exports.AccountV2 = v2_js_1.default;
11
+ const index_js_1 = __importDefault(require("./analytics/index.js"));
12
+ exports.Analytics = index_js_1.default;
13
+ const index_js_2 = __importDefault(require("./compliance/index.js"));
14
+ exports.Compliance = index_js_2.default;
15
+ const index_js_3 = __importDefault(require("./finances/index.js"));
16
+ exports.Finances = index_js_3.default;
17
+ const index_js_4 = __importDefault(require("./fulfillment/index.js"));
18
+ exports.Fulfillment = index_js_4.default;
19
+ const index_js_5 = __importDefault(require("./inventory/index.js"));
20
+ exports.Inventory = index_js_5.default;
21
+ const index_js_6 = __importDefault(require("./marketing/index.js"));
22
+ exports.Marketing = index_js_6.default;
23
+ const index_js_7 = __importDefault(require("./metadata/index.js"));
24
+ exports.Metadata = index_js_7.default;
25
+ const index_js_8 = __importDefault(require("./recommendation/index.js"));
26
+ exports.Recommendation = index_js_8.default;
27
+ const index_js_9 = __importDefault(require("./feed/index.js"));
28
+ exports.Feed = index_js_9.default;
29
+ const index_js_10 = __importDefault(require("./logistics/index.js"));
30
+ exports.Logistics = index_js_10.default;
31
+ const index_js_11 = __importDefault(require("./negotiation/index.js"));
32
+ exports.Negotiation = index_js_11.default;
33
+ const index_js_12 = __importDefault(require("./listing/index.js"));
34
+ exports.Listing = index_js_12.default;
@@ -1,4 +1,4 @@
1
- import { BulkEbayOfferDetailsWithKeys, BulkInventoryItem, BulkMigrateListing, BulkOffer, BulkPriceQuantity, Compatibility, EbayOfferDetailsWithId, EbayOfferDetailsWithKeys, InventoryItem, InventoryItemGroup, InventoryLocation, InventoryLocationFull, OfferKeysWithId, PublishByInventoryItemGroupRequest, WithdrawByInventoryItemGroupRequest } from '../../../../types/index.js';
1
+ import { BulkEbayOfferDetailsWithKeys, BulkInventoryItem, BulkMigrateListing, BulkOffer, BulkPriceQuantity, Compatibility, EbayOfferDetailsWithId, EbayOfferDetailsWithKeys, InventoryItem, InventoryItemGroup, InventoryLocation, InventoryLocationFull, LocationMapping, OfferKeysWithId, PublishByInventoryItemGroupRequest, WithdrawByInventoryItemGroupRequest } from '../../../../types/index.js';
2
2
  import { operations } from '../../../../types/restful/specs/sell_inventory_v1_oas3.js';
3
3
  import Restful, { OpenApi } from '../../index.js';
4
4
  export default class Inventory extends Restful implements OpenApi<operations> {
@@ -49,4 +49,7 @@ export default class Inventory extends Restful implements OpenApi<operations> {
49
49
  createOrReplaceInventoryItemGroup(inventoryItemGroupKey: string, body: InventoryItemGroup): Promise<any>;
50
50
  deleteInventoryItemGroup(inventoryItemGroupKey: string): Promise<any>;
51
51
  bulkMigrateListing(body: BulkMigrateListing): Promise<any>;
52
+ getSkuLocationMapping(listingId: string, sku: string): Promise<any>;
53
+ createOrReplaceSkuLocationMapping(listingId: string, sku: string, body: LocationMapping): Promise<any>;
54
+ deleteSkuLocationMapping(listingId: string, sku: string): Promise<any>;
52
55
  }
@@ -108,10 +108,10 @@ class Inventory extends index_js_1.default {
108
108
  }
109
109
  publishOffer(offerId) {
110
110
  const id = encodeURIComponent(offerId);
111
- return this.post(`/offer/${id}/publish/`);
111
+ return this.post(`/offer/${id}/publish`);
112
112
  }
113
113
  publishOfferByInventoryItemGroup(body) {
114
- return this.post(`/offer/publish_by_inventory_item_group/`, body);
114
+ return this.post(`/offer/publish_by_inventory_item_group`, body);
115
115
  }
116
116
  withdrawOfferByInventoryItemGroup(body) {
117
117
  return this.post(`/offer/withdraw_by_inventory_item_group`, body);
@@ -143,6 +143,21 @@ class Inventory extends index_js_1.default {
143
143
  bulkMigrateListing(body) {
144
144
  return this.post(`/bulk_migrate_listing`, body);
145
145
  }
146
+ getSkuLocationMapping(listingId, sku) {
147
+ sku = encodeURIComponent(sku);
148
+ listingId = encodeURIComponent(listingId);
149
+ return this.get(`/listing/${listingId}/sku/${sku}/locations`);
150
+ }
151
+ createOrReplaceSkuLocationMapping(listingId, sku, body) {
152
+ sku = encodeURIComponent(sku);
153
+ listingId = encodeURIComponent(listingId);
154
+ return this.put(`/listing/${listingId}/sku/${sku}/locations`, body);
155
+ }
156
+ deleteSkuLocationMapping(listingId, sku) {
157
+ sku = encodeURIComponent(sku);
158
+ listingId = encodeURIComponent(listingId);
159
+ return this.delete(`/listing/${listingId}/sku/${sku}/locations`);
160
+ }
146
161
  }
147
162
  Inventory.id = 'Inventory';
148
163
  exports.default = Inventory;