ebay-api 1.13.5 → 6.1.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 (218) hide show
  1. package/LICENSE +18 -19
  2. package/README.md +512 -118
  3. package/lib/api/apiFactory.d.ts +27 -0
  4. package/lib/api/apiFactory.js +100 -0
  5. package/lib/api/apiFactory.js.map +1 -0
  6. package/lib/api/base.d.ts +13 -0
  7. package/lib/api/base.js +25 -0
  8. package/lib/api/base.js.map +1 -0
  9. package/lib/api/index.d.ts +11 -0
  10. package/lib/api/index.js +18 -0
  11. package/lib/api/index.js.map +1 -0
  12. package/lib/api/restful/buy/browse/index.d.ts +84 -0
  13. package/lib/api/restful/buy/browse/index.js +142 -0
  14. package/lib/api/restful/buy/browse/index.js.map +1 -0
  15. package/lib/api/restful/buy/deal/index.d.ts +55 -0
  16. package/lib/api/restful/buy/deal/index.js +80 -0
  17. package/lib/api/restful/buy/deal/index.js.map +1 -0
  18. package/lib/api/restful/buy/feed/index.d.ts +43 -0
  19. package/lib/api/restful/buy/feed/index.js +85 -0
  20. package/lib/api/restful/buy/feed/index.js.map +1 -0
  21. package/lib/api/restful/buy/index.d.ts +17 -0
  22. package/lib/api/restful/buy/index.js +21 -0
  23. package/lib/api/restful/buy/index.js.map +1 -0
  24. package/lib/api/restful/buy/marketing/index.d.ts +27 -0
  25. package/lib/api/restful/buy/marketing/index.js +51 -0
  26. package/lib/api/restful/buy/marketing/index.js.map +1 -0
  27. package/lib/api/restful/buy/marketplaceInsights/index.d.ts +28 -0
  28. package/lib/api/restful/buy/marketplaceInsights/index.js +51 -0
  29. package/lib/api/restful/buy/marketplaceInsights/index.js.map +1 -0
  30. package/lib/api/restful/buy/offer/index.d.ts +23 -0
  31. package/lib/api/restful/buy/offer/index.js +37 -0
  32. package/lib/api/restful/buy/offer/index.js.map +1 -0
  33. package/lib/api/restful/buy/order/index.d.ts +264 -0
  34. package/lib/api/restful/buy/order/index.js +369 -0
  35. package/lib/api/restful/buy/order/index.js.map +1 -0
  36. package/lib/api/restful/commerce/catalog/index.d.ts +73 -0
  37. package/lib/api/restful/commerce/catalog/index.js +108 -0
  38. package/lib/api/restful/commerce/catalog/index.js.map +1 -0
  39. package/lib/api/restful/commerce/charity/index.d.ts +34 -0
  40. package/lib/api/restful/commerce/charity/index.js +56 -0
  41. package/lib/api/restful/commerce/charity/index.js.map +1 -0
  42. package/lib/api/restful/commerce/identity/index.d.ts +14 -0
  43. package/lib/api/restful/commerce/identity/index.js +27 -0
  44. package/lib/api/restful/commerce/identity/index.js.map +1 -0
  45. package/lib/api/restful/commerce/index.d.ts +15 -0
  46. package/lib/api/restful/commerce/index.js +19 -0
  47. package/lib/api/restful/commerce/index.js.map +1 -0
  48. package/lib/api/restful/commerce/notification/index.d.ts +117 -0
  49. package/lib/api/restful/commerce/notification/index.js +187 -0
  50. package/lib/api/restful/commerce/notification/index.js.map +1 -0
  51. package/lib/api/restful/commerce/taxonomy/index.d.ts +78 -0
  52. package/lib/api/restful/commerce/taxonomy/index.js +135 -0
  53. package/lib/api/restful/commerce/taxonomy/index.js.map +1 -0
  54. package/lib/api/restful/commerce/translation/index.d.ts +15 -0
  55. package/lib/api/restful/commerce/translation/index.js +25 -0
  56. package/lib/api/restful/commerce/translation/index.js.map +1 -0
  57. package/lib/api/restful/developer/analytics/index.d.ts +22 -0
  58. package/lib/api/restful/developer/analytics/index.js +45 -0
  59. package/lib/api/restful/developer/analytics/index.js.map +1 -0
  60. package/lib/api/restful/developer/index.d.ts +5 -0
  61. package/lib/api/restful/developer/index.js +9 -0
  62. package/lib/api/restful/developer/index.js.map +1 -0
  63. package/lib/api/restful/index.d.ts +63 -0
  64. package/lib/api/restful/index.js +165 -0
  65. package/lib/api/restful/index.js.map +1 -0
  66. package/lib/api/restful/postOrder/cancellation/index.d.ts +57 -0
  67. package/lib/api/restful/postOrder/cancellation/index.js +95 -0
  68. package/lib/api/restful/postOrder/cancellation/index.js.map +1 -0
  69. package/lib/api/restful/postOrder/case/index.d.ts +63 -0
  70. package/lib/api/restful/postOrder/case/index.js +97 -0
  71. package/lib/api/restful/postOrder/case/index.js.map +1 -0
  72. package/lib/api/restful/postOrder/index.d.ts +11 -0
  73. package/lib/api/restful/postOrder/index.js +15 -0
  74. package/lib/api/restful/postOrder/index.js.map +1 -0
  75. package/lib/api/restful/postOrder/inquiry/index.d.ts +82 -0
  76. package/lib/api/restful/postOrder/inquiry/index.js +131 -0
  77. package/lib/api/restful/postOrder/inquiry/index.js.map +1 -0
  78. package/lib/api/restful/postOrder/return/index.d.ts +231 -0
  79. package/lib/api/restful/postOrder/return/index.js +361 -0
  80. package/lib/api/restful/postOrder/return/index.js.map +1 -0
  81. package/lib/api/restful/sell/account/index.d.ts +217 -0
  82. package/lib/api/restful/sell/account/index.js +337 -0
  83. package/lib/api/restful/sell/account/index.js.map +1 -0
  84. package/lib/api/restful/sell/analytics/index.d.ts +41 -0
  85. package/lib/api/restful/sell/analytics/index.js +61 -0
  86. package/lib/api/restful/sell/analytics/index.js.map +1 -0
  87. package/lib/api/restful/sell/compliance/index.d.ts +37 -0
  88. package/lib/api/restful/sell/compliance/index.js +57 -0
  89. package/lib/api/restful/sell/compliance/index.js.map +1 -0
  90. package/lib/api/restful/sell/feed/index.d.ts +151 -0
  91. package/lib/api/restful/sell/feed/index.js +255 -0
  92. package/lib/api/restful/sell/feed/index.js.map +1 -0
  93. package/lib/api/restful/sell/finances/index.d.ts +74 -0
  94. package/lib/api/restful/sell/finances/index.js +105 -0
  95. package/lib/api/restful/sell/finances/index.js.map +1 -0
  96. package/lib/api/restful/sell/fulfillment/index.d.ts +137 -0
  97. package/lib/api/restful/sell/fulfillment/index.js +199 -0
  98. package/lib/api/restful/sell/fulfillment/index.js.map +1 -0
  99. package/lib/api/restful/sell/index.d.ts +29 -0
  100. package/lib/api/restful/sell/index.js +33 -0
  101. package/lib/api/restful/sell/index.js.map +1 -0
  102. package/lib/api/restful/sell/inventory/index.d.ts +248 -0
  103. package/lib/api/restful/sell/inventory/index.js +346 -0
  104. package/lib/api/restful/sell/inventory/index.js.map +1 -0
  105. package/lib/api/restful/sell/listing/index.d.ts +14 -0
  106. package/lib/api/restful/sell/listing/index.js +25 -0
  107. package/lib/api/restful/sell/listing/index.js.map +1 -0
  108. package/lib/api/restful/sell/logistics/index.d.ts +44 -0
  109. package/lib/api/restful/sell/logistics/index.js +66 -0
  110. package/lib/api/restful/sell/logistics/index.js.map +1 -0
  111. package/lib/api/restful/sell/marketing/index.d.ts +443 -0
  112. package/lib/api/restful/sell/marketing/index.js +609 -0
  113. package/lib/api/restful/sell/marketing/index.js.map +1 -0
  114. package/lib/api/restful/sell/metadata/index.d.ts +77 -0
  115. package/lib/api/restful/sell/metadata/index.js +131 -0
  116. package/lib/api/restful/sell/metadata/index.js.map +1 -0
  117. package/lib/api/restful/sell/negotiation/index.d.ts +24 -0
  118. package/lib/api/restful/sell/negotiation/index.js +39 -0
  119. package/lib/api/restful/sell/negotiation/index.js.map +1 -0
  120. package/lib/api/restful/sell/recommendation/index.d.ts +26 -0
  121. package/lib/api/restful/sell/recommendation/index.js +39 -0
  122. package/lib/api/restful/sell/recommendation/index.js.map +1 -0
  123. package/lib/api/traditional/XMLRequest.d.ts +98 -0
  124. package/lib/api/traditional/XMLRequest.js +191 -0
  125. package/lib/api/traditional/XMLRequest.js.map +1 -0
  126. package/lib/api/traditional/clientAlerts/index.d.ts +9 -0
  127. package/lib/api/traditional/clientAlerts/index.js +15 -0
  128. package/lib/api/traditional/clientAlerts/index.js.map +1 -0
  129. package/lib/api/traditional/clientAlerts/types.d.ts +31 -0
  130. package/lib/api/traditional/clientAlerts/types.js +36 -0
  131. package/lib/api/traditional/clientAlerts/types.js.map +1 -0
  132. package/lib/api/traditional/fields.d.ts +1948 -0
  133. package/lib/api/traditional/fields.js +1949 -0
  134. package/lib/api/traditional/fields.js.map +1 -0
  135. package/lib/api/traditional/finding/index.d.ts +12 -0
  136. package/lib/api/traditional/finding/index.js +16 -0
  137. package/lib/api/traditional/finding/index.js.map +1 -0
  138. package/lib/api/traditional/index.d.ts +17 -0
  139. package/lib/api/traditional/index.js +207 -0
  140. package/lib/api/traditional/index.js.map +1 -0
  141. package/lib/api/traditional/merchandising/index.d.ts +7 -0
  142. package/lib/api/traditional/merchandising/index.js +11 -0
  143. package/lib/api/traditional/merchandising/index.js.map +1 -0
  144. package/lib/api/traditional/shopping/index.d.ts +11 -0
  145. package/lib/api/traditional/shopping/index.js +16 -0
  146. package/lib/api/traditional/shopping/index.js.map +1 -0
  147. package/lib/api/traditional/trading/index.d.ts +142 -0
  148. package/lib/api/traditional/trading/index.js +146 -0
  149. package/lib/api/traditional/trading/index.js.map +1 -0
  150. package/lib/auth/authNAuth.d.ts +49 -0
  151. package/lib/auth/authNAuth.js +122 -0
  152. package/lib/auth/authNAuth.js.map +1 -0
  153. package/lib/auth/index.d.ts +17 -0
  154. package/lib/auth/index.js +32 -0
  155. package/lib/auth/index.js.map +1 -0
  156. package/lib/auth/oAuth2.d.ts +90 -0
  157. package/lib/auth/oAuth2.js +258 -0
  158. package/lib/auth/oAuth2.js.map +1 -0
  159. package/lib/ebay-api.min.js +2 -0
  160. package/lib/ebay-api.min.js.map +1 -0
  161. package/lib/enums/apiEnums.d.ts +49 -0
  162. package/lib/enums/apiEnums.js +55 -0
  163. package/lib/enums/apiEnums.js.map +1 -0
  164. package/lib/enums/index.d.ts +2 -0
  165. package/lib/enums/index.js +15 -0
  166. package/lib/enums/index.js.map +1 -0
  167. package/lib/enums/restfulEnums.d.ts +672 -0
  168. package/lib/enums/restfulEnums.js +714 -0
  169. package/lib/enums/restfulEnums.js.map +1 -0
  170. package/lib/errors/index.d.ts +66 -0
  171. package/lib/errors/index.js +208 -0
  172. package/lib/errors/index.js.map +1 -0
  173. package/lib/index.d.ts +55 -0
  174. package/lib/index.js +98 -0
  175. package/lib/index.js.map +1 -0
  176. package/lib/request.d.ts +26 -0
  177. package/lib/request.js +51 -0
  178. package/lib/request.js.map +1 -0
  179. package/lib/types/apiTypes.d.ts +28 -0
  180. package/lib/types/apiTypes.js +3 -0
  181. package/lib/types/apiTypes.js.map +1 -0
  182. package/lib/types/index.d.ts +3 -0
  183. package/lib/types/index.js +16 -0
  184. package/lib/types/index.js.map +1 -0
  185. package/lib/types/restfulTypes.d.ts +1067 -0
  186. package/lib/types/restfulTypes.js +3 -0
  187. package/lib/types/restfulTypes.js.map +1 -0
  188. package/lib/types/traditonalTypes.d.ts +34 -0
  189. package/lib/types/traditonalTypes.js +3 -0
  190. package/lib/types/traditonalTypes.js.map +1 -0
  191. package/package.json +115 -21
  192. package/.npmignore +0 -17
  193. package/.travis.yml +0 -7
  194. package/examples/Finding-FindItemsByKeywords.js +0 -46
  195. package/examples/Merchandising-GetMostWatchedItemsRequest.js +0 -16
  196. package/examples/Shopping-GetSingleItem.js +0 -18
  197. package/examples/Trading-GetOrders.js +0 -26
  198. package/index.js +0 -10
  199. package/lib/deep-to-array.js +0 -42
  200. package/lib/defaults.js +0 -69
  201. package/lib/errors.js +0 -44
  202. package/lib/json-parser.js +0 -336
  203. package/lib/key-lists.js +0 -64
  204. package/lib/urls.js +0 -64
  205. package/lib/versions.js +0 -35
  206. package/lib/xml-converter.js +0 -21
  207. package/lib/xml-request.js +0 -207
  208. package/scripts/parse-input-xml.js +0 -41
  209. package/test/deep-to-array.test.js +0 -100
  210. package/test/errors.test.js +0 -75
  211. package/test/helpers.js +0 -22
  212. package/test/mocha.opts +0 -1
  213. package/test/mocks/GetMultipleItems.xml +0 -115
  214. package/test/mocks/GetOrders-empty.xml +0 -17
  215. package/test/mocks/GetOrders.xml +0 -463
  216. package/test/pagination.test.js +0 -5
  217. package/test/parsing.test.js +0 -248
  218. package/test/xml-request.test.js +0 -447
@@ -0,0 +1,14 @@
1
+ import Restful from '../../';
2
+ /**
3
+ * Retrieves the authenticated user's account profile information.
4
+ */
5
+ export default class Identity extends Restful {
6
+ static id: string;
7
+ get basePath(): string;
8
+ get subdomain(): string;
9
+ /**
10
+ * This method retrieves the account profile information for an authenticated user, which requires a User access
11
+ * token. What is returned is controlled by the scopes.
12
+ */
13
+ getUser(): Promise<any>;
14
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const __1 = __importDefault(require("../../"));
7
+ /**
8
+ * Retrieves the authenticated user's account profile information.
9
+ */
10
+ class Identity extends __1.default {
11
+ get basePath() {
12
+ return '/commerce/identity/v1';
13
+ }
14
+ get subdomain() {
15
+ return 'apiz';
16
+ }
17
+ /**
18
+ * This method retrieves the account profile information for an authenticated user, which requires a User access
19
+ * token. What is returned is controlled by the scopes.
20
+ */
21
+ getUser() {
22
+ return this.get(`/user/`);
23
+ }
24
+ }
25
+ exports.default = Identity;
26
+ Identity.id = 'Identity';
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/commerce/identity/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAE7B;;GAEG;AACH,MAAqB,QAAS,SAAQ,WAAO;IAI3C,IAAI,QAAQ;QACV,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED,IAAI,SAAS;QACX,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;OAGG;IACI,OAAO;QACZ,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;;AAlBH,2BAmBC;AAjBQ,WAAE,GAAG,UAAU,CAAC"}
@@ -0,0 +1,15 @@
1
+ import Catalog from './catalog';
2
+ import Charity from './charity';
3
+ import Identity from './identity';
4
+ import Notification from './notification';
5
+ import Taxonomy from './taxonomy';
6
+ import Translation from './translation';
7
+ export declare type Commerce = {
8
+ catalog: Catalog;
9
+ charity: Charity;
10
+ identity: Identity;
11
+ notification: Notification;
12
+ taxonomy: Taxonomy;
13
+ translation: Translation;
14
+ };
15
+ export { Catalog, Charity, Identity, Notification, Taxonomy, Translation };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Translation = exports.Taxonomy = exports.Notification = exports.Identity = exports.Charity = exports.Catalog = void 0;
7
+ const catalog_1 = __importDefault(require("./catalog"));
8
+ exports.Catalog = catalog_1.default;
9
+ const charity_1 = __importDefault(require("./charity"));
10
+ exports.Charity = charity_1.default;
11
+ const identity_1 = __importDefault(require("./identity"));
12
+ exports.Identity = identity_1.default;
13
+ const notification_1 = __importDefault(require("./notification"));
14
+ exports.Notification = notification_1.default;
15
+ const taxonomy_1 = __importDefault(require("./taxonomy"));
16
+ exports.Taxonomy = taxonomy_1.default;
17
+ const translation_1 = __importDefault(require("./translation"));
18
+ exports.Translation = translation_1.default;
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/restful/commerce/index.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAiB9B,kBAjBK,iBAAO,CAiBL;AAhBT,wDAAgC;AAiB9B,kBAjBK,iBAAO,CAiBL;AAhBT,0DAAkC;AAiBhC,mBAjBK,kBAAQ,CAiBL;AAhBV,kEAA0C;AAiBxC,uBAjBK,sBAAY,CAiBL;AAhBd,0DAAkC;AAiBhC,mBAjBK,kBAAQ,CAiBL;AAhBV,gEAAwC;AAiBtC,sBAjBK,qBAAW,CAiBL"}
@@ -0,0 +1,117 @@
1
+ import Restful from '../../';
2
+ import { CreateSubscriptionRequest, DestinationRequest, NotificationConfig, NotificationParams, UpdateSubscriptionRequest } from '../../../../types';
3
+ /**
4
+ * The eBay Notification API allows third-party developers and applications to process eBay notifications and verify the integrity of the notification message payload.
5
+ */
6
+ export default class Notification extends Restful {
7
+ static id: string;
8
+ get basePath(): string;
9
+ /**
10
+ * This method allows users to retrieve a public key using a specified key ID.
11
+ *
12
+ * @param publicKeyId The unique key ID that is used to retrieve the public key
13
+ */
14
+ getPublicKey(publicKeyId: string): Promise<any>;
15
+ /**
16
+ * This method allows applications to retrieve details for the specified topic.
17
+ *
18
+ * @param topicId The ID of the topic for which to retrieve the details.
19
+ */
20
+ getTopic(topicId: string): Promise<any>;
21
+ /**
22
+ * This method returns a paginated collection of all supported topics, along with the details for the topics.
23
+ *
24
+ * @param limit The maximum number of items to return per page from the result set.
25
+ * @param continuationToken The token used to access the next set of results.
26
+ */
27
+ getTopics({ limit, continuationToken: continuation_token }: NotificationParams): Promise<any>;
28
+ /**
29
+ * This method allows applications to retrieve a list of all subscriptions.
30
+ *
31
+ * @param limit The number of items, from the result set, returned in a single page.
32
+ * @param continuation_token The continuation token for the next set of results.
33
+ */
34
+ getSubscriptions({ limit, continuationToken: continuation_token }: NotificationParams): Promise<any>;
35
+ /**
36
+ * This method allows applications to retrieve a list of all subscriptions.
37
+ *
38
+ * @param body The create subscription request.
39
+ */
40
+ createSubscription(body: CreateSubscriptionRequest): Promise<any>;
41
+ /**
42
+ * This method allows applications to retrieve subscription details for the specified subscription.
43
+ *
44
+ * @param subscriptionId The unique identifier for the subscription.
45
+ */
46
+ getSubscription(subscriptionId: string): Promise<any>;
47
+ /**
48
+ * This method allows applications to retrieve subscription details for the specified subscription.
49
+ *
50
+ * @param subscriptionId The unique identifier for the subscription.
51
+ * @param body The update subscription request.
52
+ */
53
+ updateSubscription(subscriptionId: string, body: UpdateSubscriptionRequest): Promise<any>;
54
+ /**
55
+ * This method allows applications to delete a subscription.
56
+ *
57
+ * @param subscriptionId The unique identifier for the subscription.
58
+ */
59
+ deleteSubscription(subscriptionId: string): Promise<any>;
60
+ /**
61
+ * This method allows applications to enable a disabled subscription.
62
+ *
63
+ * @param subscriptionId The unique identifier for the subscription.
64
+ */
65
+ enableSubscription(subscriptionId: string): Promise<any>;
66
+ /**
67
+ * This method disables a subscription, which prevents the subscription from providing notifications.
68
+ * @param subscriptionId The unique identifier for the subscription.
69
+ */
70
+ disableSubscription(subscriptionId: string): Promise<any>;
71
+ /**
72
+ * This method triggers a mocked test payload that includes a notification ID, publish date, and so on.
73
+ *
74
+ * @param subscriptionId The unique identifier for the subscription.
75
+ */
76
+ test(subscriptionId: string): Promise<any>;
77
+ /**
78
+ * This method allows applications to retrieve a paginated collection of destination resources and related details.
79
+ * @param subscriptionId The unique identifier for the subscription.
80
+ */
81
+ getDestinations({ limit, continuationToken: continuation_token }: NotificationParams): Promise<any>;
82
+ /**
83
+ * This method allows applications to create a destination.
84
+ *
85
+ * @param body The create destination request.
86
+ */
87
+ createDestination(body: DestinationRequest): Promise<any>;
88
+ /**
89
+ * This method allows applications to fetch the details for a destination.
90
+ *
91
+ * @param destinationId The unique identifier for the destination.
92
+ */
93
+ getDestination(destinationId: string): Promise<any>;
94
+ /**
95
+ * This method allows applications to update a destination.
96
+ *
97
+ * @param destinationId The unique identifier for the destination.
98
+ * @param body The create subscription request.
99
+ */
100
+ updateDestination(destinationId: string, body: DestinationRequest): Promise<any>;
101
+ /**
102
+ * his method provides applications a way to delete a destination.
103
+ *
104
+ * @param destinationId The unique identifier for the destination.
105
+ */
106
+ deleteDestination(destinationId: string): Promise<any>;
107
+ /**
108
+ * This method allows applications to retrieve a previously created configuration.
109
+ */
110
+ getConfig(): Promise<any>;
111
+ /**
112
+ * This method allows applications to create a new configuration or update an existing configuration.
113
+ *
114
+ * @param body The configurations for this application.
115
+ */
116
+ updateConfig(body: NotificationConfig): Promise<any>;
117
+ }
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const __1 = __importDefault(require("../../"));
7
+ /**
8
+ * The eBay Notification API allows third-party developers and applications to process eBay notifications and verify the integrity of the notification message payload.
9
+ */
10
+ class Notification extends __1.default {
11
+ get basePath() {
12
+ return '/commerce/notification/v1';
13
+ }
14
+ /**
15
+ * This method allows users to retrieve a public key using a specified key ID.
16
+ *
17
+ * @param publicKeyId The unique key ID that is used to retrieve the public key
18
+ */
19
+ getPublicKey(publicKeyId) {
20
+ publicKeyId = encodeURIComponent(publicKeyId);
21
+ return this.get(`/public_key/${publicKeyId}`);
22
+ }
23
+ /**
24
+ * This method allows applications to retrieve details for the specified topic.
25
+ *
26
+ * @param topicId The ID of the topic for which to retrieve the details.
27
+ */
28
+ getTopic(topicId) {
29
+ topicId = encodeURIComponent(topicId);
30
+ return this.get(`/topic/${topicId}`);
31
+ }
32
+ /**
33
+ * This method returns a paginated collection of all supported topics, along with the details for the topics.
34
+ *
35
+ * @param limit The maximum number of items to return per page from the result set.
36
+ * @param continuationToken The token used to access the next set of results.
37
+ */
38
+ getTopics({ limit, continuationToken: continuation_token }) {
39
+ return this.get(`/topic`, {
40
+ params: {
41
+ limit,
42
+ continuation_token
43
+ }
44
+ });
45
+ }
46
+ /**
47
+ * This method allows applications to retrieve a list of all subscriptions.
48
+ *
49
+ * @param limit The number of items, from the result set, returned in a single page.
50
+ * @param continuation_token The continuation token for the next set of results.
51
+ */
52
+ getSubscriptions({ limit, continuationToken: continuation_token }) {
53
+ return this.get(`/subscription`, {
54
+ params: {
55
+ limit,
56
+ continuation_token
57
+ }
58
+ });
59
+ }
60
+ /**
61
+ * This method allows applications to retrieve a list of all subscriptions.
62
+ *
63
+ * @param body The create subscription request.
64
+ */
65
+ createSubscription(body) {
66
+ return this.post(`/subscription`, body);
67
+ }
68
+ /**
69
+ * This method allows applications to retrieve subscription details for the specified subscription.
70
+ *
71
+ * @param subscriptionId The unique identifier for the subscription.
72
+ */
73
+ getSubscription(subscriptionId) {
74
+ subscriptionId = encodeURIComponent(subscriptionId);
75
+ return this.get(`/subscription/${subscriptionId}`);
76
+ }
77
+ /**
78
+ * This method allows applications to retrieve subscription details for the specified subscription.
79
+ *
80
+ * @param subscriptionId The unique identifier for the subscription.
81
+ * @param body The update subscription request.
82
+ */
83
+ updateSubscription(subscriptionId, body) {
84
+ subscriptionId = encodeURIComponent(subscriptionId);
85
+ return this.put(`/subscription/${subscriptionId}`, body);
86
+ }
87
+ /**
88
+ * This method allows applications to delete a subscription.
89
+ *
90
+ * @param subscriptionId The unique identifier for the subscription.
91
+ */
92
+ deleteSubscription(subscriptionId) {
93
+ subscriptionId = encodeURIComponent(subscriptionId);
94
+ return this.delete(`/subscription/${subscriptionId}`);
95
+ }
96
+ /**
97
+ * This method allows applications to enable a disabled subscription.
98
+ *
99
+ * @param subscriptionId The unique identifier for the subscription.
100
+ */
101
+ enableSubscription(subscriptionId) {
102
+ subscriptionId = encodeURIComponent(subscriptionId);
103
+ return this.post(`/subscription/${subscriptionId}/enable`);
104
+ }
105
+ /**
106
+ * This method disables a subscription, which prevents the subscription from providing notifications.
107
+ * @param subscriptionId The unique identifier for the subscription.
108
+ */
109
+ disableSubscription(subscriptionId) {
110
+ subscriptionId = encodeURIComponent(subscriptionId);
111
+ return this.post(`/subscription/${subscriptionId}/disable`);
112
+ }
113
+ /**
114
+ * This method triggers a mocked test payload that includes a notification ID, publish date, and so on.
115
+ *
116
+ * @param subscriptionId The unique identifier for the subscription.
117
+ */
118
+ test(subscriptionId) {
119
+ subscriptionId = encodeURIComponent(subscriptionId);
120
+ return this.post(`/subscription/${subscriptionId}/test`);
121
+ }
122
+ /**
123
+ * This method allows applications to retrieve a paginated collection of destination resources and related details.
124
+ * @param subscriptionId The unique identifier for the subscription.
125
+ */
126
+ getDestinations({ limit, continuationToken: continuation_token }) {
127
+ return this.get(`/destination`, {
128
+ params: {
129
+ limit,
130
+ continuation_token
131
+ }
132
+ });
133
+ }
134
+ /**
135
+ * This method allows applications to create a destination.
136
+ *
137
+ * @param body The create destination request.
138
+ */
139
+ createDestination(body) {
140
+ return this.post(`/destination`, body);
141
+ }
142
+ /**
143
+ * This method allows applications to fetch the details for a destination.
144
+ *
145
+ * @param destinationId The unique identifier for the destination.
146
+ */
147
+ getDestination(destinationId) {
148
+ destinationId = encodeURIComponent(destinationId);
149
+ return this.get(`/destination/${destinationId}`);
150
+ }
151
+ /**
152
+ * This method allows applications to update a destination.
153
+ *
154
+ * @param destinationId The unique identifier for the destination.
155
+ * @param body The create subscription request.
156
+ */
157
+ updateDestination(destinationId, body) {
158
+ destinationId = encodeURIComponent(destinationId);
159
+ return this.put(`/destination/${destinationId}`, body);
160
+ }
161
+ /**
162
+ * his method provides applications a way to delete a destination.
163
+ *
164
+ * @param destinationId The unique identifier for the destination.
165
+ */
166
+ deleteDestination(destinationId) {
167
+ destinationId = encodeURIComponent(destinationId);
168
+ return this.delete(`/destination/${destinationId}`);
169
+ }
170
+ /**
171
+ * This method allows applications to retrieve a previously created configuration.
172
+ */
173
+ getConfig() {
174
+ return this.get(`/config`);
175
+ }
176
+ /**
177
+ * This method allows applications to create a new configuration or update an existing configuration.
178
+ *
179
+ * @param body The configurations for this application.
180
+ */
181
+ updateConfig(body) {
182
+ return this.put(`/config`, body);
183
+ }
184
+ }
185
+ exports.default = Notification;
186
+ Notification.id = 'Notification';
187
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/commerce/notification/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,78 @@
1
+ /// <reference types="node" />
2
+ import Restful from '../../';
3
+ /**
4
+ * Use the Taxonomy API to discover the most appropriate eBay categories under which sellers can offer inventory items
5
+ * for sale, and the most likely categories under which buyers can browse or search for items to purchase.
6
+ */
7
+ export default class Taxonomy extends Restful {
8
+ static id: string;
9
+ get basePath(): string;
10
+ /**
11
+ * A given eBay marketplace might use multiple category trees, but one of those trees is considered to be the
12
+ * default for that marketplace.
13
+ *
14
+ * @param marketplaceId The ID of the eBay marketplace for which the category tree ID is being requested.
15
+ */
16
+ getDefaultCategoryTreeId(marketplaceId: string): Promise<any>;
17
+ /**
18
+ * This call retrieves the complete category tree that is identified by the category_tree_id parameter.
19
+ *
20
+ * @param categoryTreeId
21
+ */
22
+ getCategoryTree(categoryTreeId: string): Promise<any>;
23
+ /**
24
+ * This call retrieves the details of all nodes of the category tree hierarchy (the subtree) below a specified
25
+ * category of a category tree.
26
+ *
27
+ * @param categoryTreeId The unique identifier of the eBay category tree from which a category subtree is being
28
+ * requested.
29
+ * @param categoryId The unique identifier of the category at the top of the subtree being requested.
30
+ */
31
+ getCategorySubtree(categoryTreeId: string, categoryId: string): Promise<any>;
32
+ /**
33
+ * This call returns an array of category tree leaf nodes in the specified category tree that are considered by eBay
34
+ * to most closely correspond to the query string q.
35
+ *
36
+ * @param categoryTreeId The unique identifier of the eBay category tree for which suggested nodes are being
37
+ * requested.
38
+ * @param q A quoted string that describes or characterizes the item being offered for sale.
39
+ */
40
+ getCategorySuggestions(categoryTreeId: string, q: string): Promise<any>;
41
+ /**
42
+ * This call returns a list of aspects that are appropriate or necessary for accurately describing items in the
43
+ * specified leaf category.
44
+ *
45
+ * @param categoryTreeId The unique identifier of the eBay category tree from which the specified category's
46
+ * aspects are being requested.
47
+ * @param categoryId The unique identifier of the leaf category for which aspects are being requested.
48
+ */
49
+ getItemAspectsForCategory(categoryTreeId: string, categoryId: string): Promise<any>;
50
+ /**
51
+ * This call retrieves the compatible vehicle aspects that are used to define a motor vehicle that is compatible
52
+ * with a motor vehicle part or accessory.
53
+ *
54
+ * @param categoryTreeId This is the unique identifier of category tree. The following is the list of
55
+ * category_tree_id values and the eBay marketplaces that they represent.
56
+ *
57
+ * @param categoryId The unique identifier of an eBay category.
58
+ */
59
+ getCompatibilityProperties(categoryTreeId: string, categoryId: string): Promise<any>;
60
+ /**
61
+ * This call retrieves applicable compatible vehicle property values based on the specified eBay marketplace,
62
+ * specified eBay category, and filters used in the request.
63
+ *
64
+ * @param categoryTreeId This is the unique identifier of the category tree.
65
+ * @param categoryId The unique identifier of an eBay category.
66
+ * @param compatibilityProperty One compatible vehicle property applicable to the specified eBay marketplace and
67
+ * eBay category is specified in this required filter.
68
+ */
69
+ getCompatibilityPropertyValues(categoryTreeId: string, categoryId: string, compatibilityProperty: string): Promise<any>;
70
+ /**
71
+ * This call returns a complete list of aspects for all of the leaf categories that belong to an eBay marketplace.
72
+ *
73
+ * @param categoryTreeId
74
+ *
75
+ * @return A JSON GZIP compressed file buffer
76
+ */
77
+ fetchItemAspects(categoryTreeId: string): Promise<Buffer>;
78
+ }
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const __1 = __importDefault(require("../../"));
7
+ /**
8
+ * Use the Taxonomy API to discover the most appropriate eBay categories under which sellers can offer inventory items
9
+ * for sale, and the most likely categories under which buyers can browse or search for items to purchase.
10
+ */
11
+ class Taxonomy extends __1.default {
12
+ get basePath() {
13
+ return '/commerce/taxonomy/v1';
14
+ }
15
+ /**
16
+ * A given eBay marketplace might use multiple category trees, but one of those trees is considered to be the
17
+ * default for that marketplace.
18
+ *
19
+ * @param marketplaceId The ID of the eBay marketplace for which the category tree ID is being requested.
20
+ */
21
+ getDefaultCategoryTreeId(marketplaceId) {
22
+ return this.get(`/get_default_category_tree_id`, {
23
+ params: {
24
+ marketplace_id: marketplaceId
25
+ }
26
+ });
27
+ }
28
+ /**
29
+ * This call retrieves the complete category tree that is identified by the category_tree_id parameter.
30
+ *
31
+ * @param categoryTreeId
32
+ */
33
+ getCategoryTree(categoryTreeId) {
34
+ const cId = encodeURIComponent(categoryTreeId);
35
+ return this.get(`/category_tree/${cId}`);
36
+ }
37
+ /**
38
+ * This call retrieves the details of all nodes of the category tree hierarchy (the subtree) below a specified
39
+ * category of a category tree.
40
+ *
41
+ * @param categoryTreeId The unique identifier of the eBay category tree from which a category subtree is being
42
+ * requested.
43
+ * @param categoryId The unique identifier of the category at the top of the subtree being requested.
44
+ */
45
+ getCategorySubtree(categoryTreeId, categoryId) {
46
+ categoryTreeId = encodeURIComponent(categoryTreeId);
47
+ return this.get(`/category_tree/${categoryTreeId}/get_category_subtree`, {
48
+ params: {
49
+ category_id: categoryId
50
+ }
51
+ });
52
+ }
53
+ /**
54
+ * This call returns an array of category tree leaf nodes in the specified category tree that are considered by eBay
55
+ * to most closely correspond to the query string q.
56
+ *
57
+ * @param categoryTreeId The unique identifier of the eBay category tree for which suggested nodes are being
58
+ * requested.
59
+ * @param q A quoted string that describes or characterizes the item being offered for sale.
60
+ */
61
+ getCategorySuggestions(categoryTreeId, q) {
62
+ return this.get(`/category_tree/${categoryTreeId}/get_category_suggestions`, {
63
+ params: {
64
+ q
65
+ }
66
+ });
67
+ }
68
+ /**
69
+ * This call returns a list of aspects that are appropriate or necessary for accurately describing items in the
70
+ * specified leaf category.
71
+ *
72
+ * @param categoryTreeId The unique identifier of the eBay category tree from which the specified category's
73
+ * aspects are being requested.
74
+ * @param categoryId The unique identifier of the leaf category for which aspects are being requested.
75
+ */
76
+ getItemAspectsForCategory(categoryTreeId, categoryId) {
77
+ categoryTreeId = encodeURIComponent(categoryTreeId);
78
+ return this.get(`/category_tree/${categoryTreeId}/get_item_aspects_for_category`, {
79
+ params: {
80
+ category_id: categoryId
81
+ }
82
+ });
83
+ }
84
+ /**
85
+ * This call retrieves the compatible vehicle aspects that are used to define a motor vehicle that is compatible
86
+ * with a motor vehicle part or accessory.
87
+ *
88
+ * @param categoryTreeId This is the unique identifier of category tree. The following is the list of
89
+ * category_tree_id values and the eBay marketplaces that they represent.
90
+ *
91
+ * @param categoryId The unique identifier of an eBay category.
92
+ */
93
+ getCompatibilityProperties(categoryTreeId, categoryId) {
94
+ categoryTreeId = encodeURIComponent(categoryTreeId);
95
+ return this.get(`/category_tree/${categoryTreeId}/get_compatibility_properties`, {
96
+ params: {
97
+ category_id: categoryId
98
+ }
99
+ });
100
+ }
101
+ /**
102
+ * This call retrieves applicable compatible vehicle property values based on the specified eBay marketplace,
103
+ * specified eBay category, and filters used in the request.
104
+ *
105
+ * @param categoryTreeId This is the unique identifier of the category tree.
106
+ * @param categoryId The unique identifier of an eBay category.
107
+ * @param compatibilityProperty One compatible vehicle property applicable to the specified eBay marketplace and
108
+ * eBay category is specified in this required filter.
109
+ */
110
+ getCompatibilityPropertyValues(categoryTreeId, categoryId, compatibilityProperty) {
111
+ categoryTreeId = encodeURIComponent(categoryTreeId);
112
+ return this.get(`/category_tree/${categoryTreeId}/get_compatibility_property_values`, {
113
+ params: {
114
+ category_id: categoryId,
115
+ compatibility_property: compatibilityProperty
116
+ }
117
+ });
118
+ }
119
+ /**
120
+ * This call returns a complete list of aspects for all of the leaf categories that belong to an eBay marketplace.
121
+ *
122
+ * @param categoryTreeId
123
+ *
124
+ * @return A JSON GZIP compressed file buffer
125
+ */
126
+ fetchItemAspects(categoryTreeId) {
127
+ categoryTreeId = encodeURIComponent(categoryTreeId);
128
+ return this.get(`/category_tree/${categoryTreeId}/fetch_item_aspects`, {
129
+ responseType: 'arraybuffer'
130
+ });
131
+ }
132
+ }
133
+ exports.default = Taxonomy;
134
+ Taxonomy.id = 'Taxonomy';
135
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/commerce/taxonomy/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAE7B;;;GAGG;AACH,MAAqB,QAAS,SAAQ,WAAO;IAI3C,IAAI,QAAQ;QACV,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,wBAAwB,CAAC,aAAqB;QACnD,OAAO,IAAI,CAAC,GAAG,CAAC,+BAA+B,EAAE;YAC/C,MAAM,EAAE;gBACN,cAAc,EAAE,aAAa;aAC9B;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACI,eAAe,CAAC,cAAsB;QAC3C,MAAM,GAAG,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;OAOG;IACI,kBAAkB,CAAC,cAAsB,EAAE,UAAkB;QAClE,cAAc,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,cAAc,uBAAuB,EAAE;YACvE,MAAM,EAAE;gBACN,WAAW,EAAE,UAAU;aACxB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,sBAAsB,CAAC,cAAsB,EAAE,CAAS;QAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,cAAc,2BAA2B,EAAE;YAC3E,MAAM,EAAE;gBACN,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,yBAAyB,CAAC,cAAsB,EAAE,UAAkB;QACzE,cAAc,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,cAAc,gCAAgC,EAAE;YAChF,MAAM,EAAE;gBACN,WAAW,EAAE,UAAU;aACxB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACI,0BAA0B,CAAC,cAAsB,EAAE,UAAkB;QAC1E,cAAc,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,cAAc,+BAA+B,EAAE;YAC/E,MAAM,EAAE;gBACN,WAAW,EAAE,UAAU;aACxB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACI,8BAA8B,CACnC,cAAsB,EACtB,UAAkB,EAClB,qBAA6B;QAE7B,cAAc,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,cAAc,oCAAoC,EAAE;YACpF,MAAM,EAAE;gBACN,WAAW,EAAE,UAAU;gBACvB,sBAAsB,EAAE,qBAAqB;aAC9C;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACI,gBAAgB,CAAC,cAAsB;QAC5C,cAAc,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,cAAc,qBAAqB,EAAE;YACrE,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;IACL,CAAC;;AAvIH,2BAwIC;AAtIQ,WAAE,GAAG,UAAU,CAAC"}
@@ -0,0 +1,15 @@
1
+ import Restful from '../../';
2
+ import { TranslateRequest } from '../../../../types';
3
+ /**
4
+ * This API allows 3rd party developers to translate item title, description, search query.
5
+ */
6
+ export default class Translation extends Restful {
7
+ static id: string;
8
+ get basePath(): string;
9
+ /**
10
+ * Translates input text inot a given language.
11
+ *
12
+ * @param body TranslateRequest
13
+ */
14
+ translate(body: TranslateRequest): Promise<any>;
15
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const __1 = __importDefault(require("../../"));
7
+ /**
8
+ * This API allows 3rd party developers to translate item title, description, search query.
9
+ */
10
+ class Translation extends __1.default {
11
+ get basePath() {
12
+ return '/commerce/translation/v1_beta';
13
+ }
14
+ /**
15
+ * Translates input text inot a given language.
16
+ *
17
+ * @param body TranslateRequest
18
+ */
19
+ translate(body) {
20
+ return this.post(`/translate`, body);
21
+ }
22
+ }
23
+ exports.default = Translation;
24
+ Translation.id = 'Translation';
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/commerce/translation/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAG7B;;GAEG;AACH,MAAqB,WAAY,SAAQ,WAAO;IAI9C,IAAI,QAAQ;QACV,OAAO,+BAA+B,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACI,SAAS,CAAC,IAAsB;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;;AAfH,8BAgBC;AAdQ,cAAE,GAAG,aAAa,CAAC"}