ebay-api 1.13.7 → 6.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.
- package/LICENSE +18 -19
- package/README.md +512 -118
- package/lib/api/apiFactory.d.ts +27 -0
- package/lib/api/apiFactory.js +100 -0
- package/lib/api/apiFactory.js.map +1 -0
- package/lib/api/base.d.ts +13 -0
- package/lib/api/base.js +25 -0
- package/lib/api/base.js.map +1 -0
- package/lib/api/index.d.ts +11 -0
- package/lib/api/index.js +18 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/restful/buy/browse/index.d.ts +84 -0
- package/lib/api/restful/buy/browse/index.js +142 -0
- package/lib/api/restful/buy/browse/index.js.map +1 -0
- package/lib/api/restful/buy/deal/index.d.ts +55 -0
- package/lib/api/restful/buy/deal/index.js +80 -0
- package/lib/api/restful/buy/deal/index.js.map +1 -0
- package/lib/api/restful/buy/feed/index.d.ts +43 -0
- package/lib/api/restful/buy/feed/index.js +85 -0
- package/lib/api/restful/buy/feed/index.js.map +1 -0
- package/lib/api/restful/buy/index.d.ts +17 -0
- package/lib/api/restful/buy/index.js +21 -0
- package/lib/api/restful/buy/index.js.map +1 -0
- package/lib/api/restful/buy/marketing/index.d.ts +27 -0
- package/lib/api/restful/buy/marketing/index.js +51 -0
- package/lib/api/restful/buy/marketing/index.js.map +1 -0
- package/lib/api/restful/buy/marketplaceInsights/index.d.ts +28 -0
- package/lib/api/restful/buy/marketplaceInsights/index.js +51 -0
- package/lib/api/restful/buy/marketplaceInsights/index.js.map +1 -0
- package/lib/api/restful/buy/offer/index.d.ts +23 -0
- package/lib/api/restful/buy/offer/index.js +37 -0
- package/lib/api/restful/buy/offer/index.js.map +1 -0
- package/lib/api/restful/buy/order/index.d.ts +264 -0
- package/lib/api/restful/buy/order/index.js +369 -0
- package/lib/api/restful/buy/order/index.js.map +1 -0
- package/lib/api/restful/commerce/catalog/index.d.ts +73 -0
- package/lib/api/restful/commerce/catalog/index.js +108 -0
- package/lib/api/restful/commerce/catalog/index.js.map +1 -0
- package/lib/api/restful/commerce/charity/index.d.ts +34 -0
- package/lib/api/restful/commerce/charity/index.js +56 -0
- package/lib/api/restful/commerce/charity/index.js.map +1 -0
- package/lib/api/restful/commerce/identity/index.d.ts +14 -0
- package/lib/api/restful/commerce/identity/index.js +27 -0
- package/lib/api/restful/commerce/identity/index.js.map +1 -0
- package/lib/api/restful/commerce/index.d.ts +15 -0
- package/lib/api/restful/commerce/index.js +19 -0
- package/lib/api/restful/commerce/index.js.map +1 -0
- package/lib/api/restful/commerce/notification/index.d.ts +117 -0
- package/lib/api/restful/commerce/notification/index.js +187 -0
- package/lib/api/restful/commerce/notification/index.js.map +1 -0
- package/lib/api/restful/commerce/taxonomy/index.d.ts +78 -0
- package/lib/api/restful/commerce/taxonomy/index.js +135 -0
- package/lib/api/restful/commerce/taxonomy/index.js.map +1 -0
- package/lib/api/restful/commerce/translation/index.d.ts +15 -0
- package/lib/api/restful/commerce/translation/index.js +25 -0
- package/lib/api/restful/commerce/translation/index.js.map +1 -0
- package/lib/api/restful/developer/analytics/index.d.ts +22 -0
- package/lib/api/restful/developer/analytics/index.js +45 -0
- package/lib/api/restful/developer/analytics/index.js.map +1 -0
- package/lib/api/restful/developer/index.d.ts +5 -0
- package/lib/api/restful/developer/index.js +9 -0
- package/lib/api/restful/developer/index.js.map +1 -0
- package/lib/api/restful/index.d.ts +63 -0
- package/lib/api/restful/index.js +165 -0
- package/lib/api/restful/index.js.map +1 -0
- package/lib/api/restful/postOrder/cancellation/index.d.ts +57 -0
- package/lib/api/restful/postOrder/cancellation/index.js +95 -0
- package/lib/api/restful/postOrder/cancellation/index.js.map +1 -0
- package/lib/api/restful/postOrder/case/index.d.ts +63 -0
- package/lib/api/restful/postOrder/case/index.js +97 -0
- package/lib/api/restful/postOrder/case/index.js.map +1 -0
- package/lib/api/restful/postOrder/index.d.ts +11 -0
- package/lib/api/restful/postOrder/index.js +15 -0
- package/lib/api/restful/postOrder/index.js.map +1 -0
- package/lib/api/restful/postOrder/inquiry/index.d.ts +82 -0
- package/lib/api/restful/postOrder/inquiry/index.js +131 -0
- package/lib/api/restful/postOrder/inquiry/index.js.map +1 -0
- package/lib/api/restful/postOrder/return/index.d.ts +231 -0
- package/lib/api/restful/postOrder/return/index.js +361 -0
- package/lib/api/restful/postOrder/return/index.js.map +1 -0
- package/lib/api/restful/sell/account/index.d.ts +217 -0
- package/lib/api/restful/sell/account/index.js +337 -0
- package/lib/api/restful/sell/account/index.js.map +1 -0
- package/lib/api/restful/sell/analytics/index.d.ts +41 -0
- package/lib/api/restful/sell/analytics/index.js +61 -0
- package/lib/api/restful/sell/analytics/index.js.map +1 -0
- package/lib/api/restful/sell/compliance/index.d.ts +37 -0
- package/lib/api/restful/sell/compliance/index.js +57 -0
- package/lib/api/restful/sell/compliance/index.js.map +1 -0
- package/lib/api/restful/sell/feed/index.d.ts +151 -0
- package/lib/api/restful/sell/feed/index.js +255 -0
- package/lib/api/restful/sell/feed/index.js.map +1 -0
- package/lib/api/restful/sell/finances/index.d.ts +74 -0
- package/lib/api/restful/sell/finances/index.js +105 -0
- package/lib/api/restful/sell/finances/index.js.map +1 -0
- package/lib/api/restful/sell/fulfillment/index.d.ts +137 -0
- package/lib/api/restful/sell/fulfillment/index.js +199 -0
- package/lib/api/restful/sell/fulfillment/index.js.map +1 -0
- package/lib/api/restful/sell/index.d.ts +29 -0
- package/lib/api/restful/sell/index.js +33 -0
- package/lib/api/restful/sell/index.js.map +1 -0
- package/lib/api/restful/sell/inventory/index.d.ts +248 -0
- package/lib/api/restful/sell/inventory/index.js +346 -0
- package/lib/api/restful/sell/inventory/index.js.map +1 -0
- package/lib/api/restful/sell/listing/index.d.ts +14 -0
- package/lib/api/restful/sell/listing/index.js +25 -0
- package/lib/api/restful/sell/listing/index.js.map +1 -0
- package/lib/api/restful/sell/logistics/index.d.ts +44 -0
- package/lib/api/restful/sell/logistics/index.js +66 -0
- package/lib/api/restful/sell/logistics/index.js.map +1 -0
- package/lib/api/restful/sell/marketing/index.d.ts +443 -0
- package/lib/api/restful/sell/marketing/index.js +609 -0
- package/lib/api/restful/sell/marketing/index.js.map +1 -0
- package/lib/api/restful/sell/metadata/index.d.ts +77 -0
- package/lib/api/restful/sell/metadata/index.js +131 -0
- package/lib/api/restful/sell/metadata/index.js.map +1 -0
- package/lib/api/restful/sell/negotiation/index.d.ts +24 -0
- package/lib/api/restful/sell/negotiation/index.js +39 -0
- package/lib/api/restful/sell/negotiation/index.js.map +1 -0
- package/lib/api/restful/sell/recommendation/index.d.ts +26 -0
- package/lib/api/restful/sell/recommendation/index.js +39 -0
- package/lib/api/restful/sell/recommendation/index.js.map +1 -0
- package/lib/api/traditional/XMLRequest.d.ts +98 -0
- package/lib/api/traditional/XMLRequest.js +191 -0
- package/lib/api/traditional/XMLRequest.js.map +1 -0
- package/lib/api/traditional/clientAlerts/index.d.ts +9 -0
- package/lib/api/traditional/clientAlerts/index.js +15 -0
- package/lib/api/traditional/clientAlerts/index.js.map +1 -0
- package/lib/api/traditional/clientAlerts/types.d.ts +31 -0
- package/lib/api/traditional/clientAlerts/types.js +36 -0
- package/lib/api/traditional/clientAlerts/types.js.map +1 -0
- package/lib/api/traditional/fields.d.ts +1948 -0
- package/lib/api/traditional/fields.js +1949 -0
- package/lib/api/traditional/fields.js.map +1 -0
- package/lib/api/traditional/finding/index.d.ts +12 -0
- package/lib/api/traditional/finding/index.js +16 -0
- package/lib/api/traditional/finding/index.js.map +1 -0
- package/lib/api/traditional/index.d.ts +17 -0
- package/lib/api/traditional/index.js +207 -0
- package/lib/api/traditional/index.js.map +1 -0
- package/lib/api/traditional/merchandising/index.d.ts +7 -0
- package/lib/api/traditional/merchandising/index.js +11 -0
- package/lib/api/traditional/merchandising/index.js.map +1 -0
- package/lib/api/traditional/shopping/index.d.ts +11 -0
- package/lib/api/traditional/shopping/index.js +16 -0
- package/lib/api/traditional/shopping/index.js.map +1 -0
- package/lib/api/traditional/trading/index.d.ts +142 -0
- package/lib/api/traditional/trading/index.js +146 -0
- package/lib/api/traditional/trading/index.js.map +1 -0
- package/lib/auth/authNAuth.d.ts +49 -0
- package/lib/auth/authNAuth.js +122 -0
- package/lib/auth/authNAuth.js.map +1 -0
- package/lib/auth/index.d.ts +17 -0
- package/lib/auth/index.js +32 -0
- package/lib/auth/index.js.map +1 -0
- package/lib/auth/oAuth2.d.ts +90 -0
- package/lib/auth/oAuth2.js +258 -0
- package/lib/auth/oAuth2.js.map +1 -0
- package/lib/ebay-api.min.js +2 -0
- package/lib/ebay-api.min.js.map +1 -0
- package/lib/enums/apiEnums.d.ts +49 -0
- package/lib/enums/apiEnums.js +55 -0
- package/lib/enums/apiEnums.js.map +1 -0
- package/lib/enums/index.d.ts +2 -0
- package/lib/enums/index.js +15 -0
- package/lib/enums/index.js.map +1 -0
- package/lib/enums/restfulEnums.d.ts +966 -0
- package/lib/enums/restfulEnums.js +1012 -0
- package/lib/enums/restfulEnums.js.map +1 -0
- package/lib/errors/index.d.ts +66 -0
- package/lib/errors/index.js +208 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/index.d.ts +56 -0
- package/lib/index.js +99 -0
- package/lib/index.js.map +1 -0
- package/lib/request.d.ts +26 -0
- package/lib/request.js +51 -0
- package/lib/request.js.map +1 -0
- package/lib/types/apiTypes.d.ts +28 -0
- package/lib/types/apiTypes.js +3 -0
- package/lib/types/apiTypes.js.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +16 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/restfulTypes.d.ts +1082 -0
- package/lib/types/restfulTypes.js +3 -0
- package/lib/types/restfulTypes.js.map +1 -0
- package/lib/types/traditonalTypes.d.ts +34 -0
- package/lib/types/traditonalTypes.js +3 -0
- package/lib/types/traditonalTypes.js.map +1 -0
- package/package.json +115 -21
- package/.npmignore +0 -17
- package/.travis.yml +0 -7
- package/examples/Finding-FindItemsByKeywords.js +0 -46
- package/examples/Merchandising-GetMostWatchedItemsRequest.js +0 -16
- package/examples/Shopping-GetSingleItem.js +0 -18
- package/examples/Trading-GetOrders.js +0 -26
- package/index.js +0 -10
- package/lib/deep-to-array.js +0 -42
- package/lib/defaults.js +0 -69
- package/lib/errors.js +0 -44
- package/lib/json-parser.js +0 -336
- package/lib/key-lists.js +0 -64
- package/lib/urls.js +0 -64
- package/lib/versions.js +0 -35
- package/lib/xml-converter.js +0 -21
- package/lib/xml-request.js +0 -207
- package/scripts/parse-input-xml.js +0 -41
- package/test/deep-to-array.test.js +0 -100
- package/test/errors.test.js +0 -75
- package/test/helpers.js +0 -22
- package/test/mocha.opts +0 -1
- package/test/mocks/GetMultipleItems.xml +0 -115
- package/test/mocks/GetOrders-empty.xml +0 -17
- package/test/mocks/GetOrders.xml +0 -463
- package/test/pagination.test.js +0 -5
- package/test/parsing.test.js +0 -248
- package/test/xml-request.test.js +0 -447
|
@@ -0,0 +1,15 @@
|
|
|
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.Return = exports.Inquiry = exports.Case = exports.Cancellation = void 0;
|
|
7
|
+
const cancellation_1 = __importDefault(require("./cancellation"));
|
|
8
|
+
exports.Cancellation = cancellation_1.default;
|
|
9
|
+
const case_1 = __importDefault(require("./case"));
|
|
10
|
+
exports.Case = case_1.default;
|
|
11
|
+
const inquiry_1 = __importDefault(require("./inquiry"));
|
|
12
|
+
exports.Inquiry = inquiry_1.default;
|
|
13
|
+
const return_1 = __importDefault(require("./return"));
|
|
14
|
+
exports.Return = return_1.default;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/restful/postOrder/index.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA0C;AAaxC,uBAbK,sBAAY,CAaL;AAZd,kDAA0B;AAaxB,eAbK,cAAI,CAaL;AAZN,wDAAgC;AAa9B,kBAbK,iBAAO,CAaL;AAZT,sDAA8B;AAa5B,iBAbK,gBAAM,CAaL"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import Restful from '../../';
|
|
2
|
+
import { BuyerCloseInquiryRequest, CheckInquiryEligibilityRequest, CreateInquiryRequest, EscalateInquiryRequest, InquirySearchParams, InquiryVoluntaryRefundRequest, SellerProvideRefundInfoRequest, SendMessageRequest, ShipmentInfoRequest } from '../../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Post-Order Inquiry API
|
|
5
|
+
*/
|
|
6
|
+
export default class Inquiry extends Restful {
|
|
7
|
+
static id: string;
|
|
8
|
+
get basePath(): string;
|
|
9
|
+
get useIaf(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Check if a buyer is eligible to open an inquiry on an order.
|
|
12
|
+
*
|
|
13
|
+
* @param payload the CheckInquiryEligibilityRequest
|
|
14
|
+
*/
|
|
15
|
+
checkInquiryEligibility(payload: CheckInquiryEligibilityRequest): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Close an inquiry for the buyer
|
|
18
|
+
*
|
|
19
|
+
* @param inquiryId The unique ID of the inquiry to be closed.
|
|
20
|
+
* @param payload the BuyerCloseInquiryRequest
|
|
21
|
+
*/
|
|
22
|
+
closeInquiry(inquiryId: string, payload?: BuyerCloseInquiryRequest): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Buyer confirms the refund from an inquiry was received
|
|
25
|
+
*
|
|
26
|
+
* @param inquiryId The unique identifier of a case.
|
|
27
|
+
*/
|
|
28
|
+
confirmInquiryRefund(inquiryId: string): Promise<any>;
|
|
29
|
+
/**
|
|
30
|
+
* Create an inquiry for the buyer.
|
|
31
|
+
*
|
|
32
|
+
* @param payload the CreateInquiryRequest
|
|
33
|
+
*/
|
|
34
|
+
createInquiry(payload: CreateInquiryRequest): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Escalate an inquiry to an INR case.
|
|
37
|
+
*
|
|
38
|
+
* @param inquiryId the unique identifier of the inquiry to be escalated.
|
|
39
|
+
* @param payload the EscalateInquiryRequest
|
|
40
|
+
*/
|
|
41
|
+
escalateInquiry(inquiryId: string, payload: EscalateInquiryRequest): Promise<any>;
|
|
42
|
+
/**
|
|
43
|
+
* Retrieve the history and details related to a specific inquiry.
|
|
44
|
+
*
|
|
45
|
+
* @param inquiryId the unique ID of the inquiry for which details and history are to be retrieved.
|
|
46
|
+
*/
|
|
47
|
+
getInquiry(inquiryId: string): Promise<any>;
|
|
48
|
+
/**
|
|
49
|
+
* Issue a refund for an inquiry.
|
|
50
|
+
*
|
|
51
|
+
* @param inquiryId the unique ID of the inquiry for which a refund is to be issued.
|
|
52
|
+
* @param payload the InquiryVoluntaryRefundRequest
|
|
53
|
+
*/
|
|
54
|
+
issueInquiryRefund(inquiryId: string, payload?: InquiryVoluntaryRefundRequest): Promise<any>;
|
|
55
|
+
/**
|
|
56
|
+
* Provide refund information about an inquiry to the buyer.
|
|
57
|
+
*
|
|
58
|
+
* @param inquiryId The unique ID of the inquiry for which to provide refund information.
|
|
59
|
+
* @param payload the InquiryVoluntaryRefundRequest
|
|
60
|
+
*/
|
|
61
|
+
provideInquiryRefundInfo(inquiryId: string, payload: SellerProvideRefundInfoRequest): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* Provide shipment information for an inquiry.
|
|
64
|
+
*
|
|
65
|
+
* @param inquiryId The unique ID of the inquiry for which to provide shipment information.
|
|
66
|
+
* @param payload the ShipmentInfoRequest
|
|
67
|
+
*/
|
|
68
|
+
provideInquiryShipmentInfo(inquiryId: string, payload?: ShipmentInfoRequest): Promise<any>;
|
|
69
|
+
/**
|
|
70
|
+
* This call is used to search for inquiries using multiple filter types.
|
|
71
|
+
*
|
|
72
|
+
* @param params the InquirySearchParams
|
|
73
|
+
*/
|
|
74
|
+
search(params?: InquirySearchParams): Promise<any>;
|
|
75
|
+
/**
|
|
76
|
+
* Contact the buyer or seller about an inquiry.
|
|
77
|
+
*
|
|
78
|
+
* @param inquiryId The unique ID of the inquiry being discussed.
|
|
79
|
+
* @param payload the SendMessageRequest
|
|
80
|
+
*/
|
|
81
|
+
sendInquiryMessage(inquiryId: string, payload: SendMessageRequest): Promise<any>;
|
|
82
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
* Post-Order Inquiry API
|
|
9
|
+
*/
|
|
10
|
+
class Inquiry extends __1.default {
|
|
11
|
+
get basePath() {
|
|
12
|
+
return '/post-order/v2';
|
|
13
|
+
}
|
|
14
|
+
get useIaf() {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Check if a buyer is eligible to open an inquiry on an order.
|
|
19
|
+
*
|
|
20
|
+
* @param payload the CheckInquiryEligibilityRequest
|
|
21
|
+
*/
|
|
22
|
+
checkInquiryEligibility(payload) {
|
|
23
|
+
return this.post(`/inquiry/check_eligibility`, payload);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Close an inquiry for the buyer
|
|
27
|
+
*
|
|
28
|
+
* @param inquiryId The unique ID of the inquiry to be closed.
|
|
29
|
+
* @param payload the BuyerCloseInquiryRequest
|
|
30
|
+
*/
|
|
31
|
+
closeInquiry(inquiryId, payload) {
|
|
32
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
33
|
+
if (typeof payload?.closeReason === 'string') {
|
|
34
|
+
payload.closeReason = payload.closeReason.trim();
|
|
35
|
+
}
|
|
36
|
+
return this.post(`/inquiry/${inquiryId}/close`, payload);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Buyer confirms the refund from an inquiry was received
|
|
40
|
+
*
|
|
41
|
+
* @param inquiryId The unique identifier of a case.
|
|
42
|
+
*/
|
|
43
|
+
confirmInquiryRefund(inquiryId) {
|
|
44
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
45
|
+
return this.post(`/inquiry/${inquiryId}/confirm_refund`);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create an inquiry for the buyer.
|
|
49
|
+
*
|
|
50
|
+
* @param payload the CreateInquiryRequest
|
|
51
|
+
*/
|
|
52
|
+
createInquiry(payload) {
|
|
53
|
+
if (typeof payload.desiredOutcome === 'string') {
|
|
54
|
+
payload.desiredOutcome = payload.desiredOutcome.trim();
|
|
55
|
+
}
|
|
56
|
+
return this.post(`/inquiry`, payload);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Escalate an inquiry to an INR case.
|
|
60
|
+
*
|
|
61
|
+
* @param inquiryId the unique identifier of the inquiry to be escalated.
|
|
62
|
+
* @param payload the EscalateInquiryRequest
|
|
63
|
+
*/
|
|
64
|
+
escalateInquiry(inquiryId, payload) {
|
|
65
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
66
|
+
payload.escalateInquiryReason = payload.escalateInquiryReason.trim();
|
|
67
|
+
return this.post(`/inquiry/${inquiryId}/escalate`, payload);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Retrieve the history and details related to a specific inquiry.
|
|
71
|
+
*
|
|
72
|
+
* @param inquiryId the unique ID of the inquiry for which details and history are to be retrieved.
|
|
73
|
+
*/
|
|
74
|
+
getInquiry(inquiryId) {
|
|
75
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
76
|
+
return this.get(`/inquiry/${inquiryId}`);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Issue a refund for an inquiry.
|
|
80
|
+
*
|
|
81
|
+
* @param inquiryId the unique ID of the inquiry for which a refund is to be issued.
|
|
82
|
+
* @param payload the InquiryVoluntaryRefundRequest
|
|
83
|
+
*/
|
|
84
|
+
issueInquiryRefund(inquiryId, payload) {
|
|
85
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
86
|
+
return this.post(`/inquiry/${inquiryId}/issue_refund`, payload);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Provide refund information about an inquiry to the buyer.
|
|
90
|
+
*
|
|
91
|
+
* @param inquiryId The unique ID of the inquiry for which to provide refund information.
|
|
92
|
+
* @param payload the InquiryVoluntaryRefundRequest
|
|
93
|
+
*/
|
|
94
|
+
provideInquiryRefundInfo(inquiryId, payload) {
|
|
95
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
96
|
+
return this.post(`/inquiry/${inquiryId}/provide_refund_info`, payload);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Provide shipment information for an inquiry.
|
|
100
|
+
*
|
|
101
|
+
* @param inquiryId The unique ID of the inquiry for which to provide shipment information.
|
|
102
|
+
* @param payload the ShipmentInfoRequest
|
|
103
|
+
*/
|
|
104
|
+
provideInquiryShipmentInfo(inquiryId, payload) {
|
|
105
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
106
|
+
return this.post(`/inquiry/${inquiryId}/provide_shipment_info`, payload);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* This call is used to search for inquiries using multiple filter types.
|
|
110
|
+
*
|
|
111
|
+
* @param params the InquirySearchParams
|
|
112
|
+
*/
|
|
113
|
+
search(params) {
|
|
114
|
+
return this.get(`/inquiry/search`, {
|
|
115
|
+
params
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Contact the buyer or seller about an inquiry.
|
|
120
|
+
*
|
|
121
|
+
* @param inquiryId The unique ID of the inquiry being discussed.
|
|
122
|
+
* @param payload the SendMessageRequest
|
|
123
|
+
*/
|
|
124
|
+
sendInquiryMessage(inquiryId, payload) {
|
|
125
|
+
inquiryId = encodeURIComponent(inquiryId);
|
|
126
|
+
return this.post(`/inquiry/${inquiryId}/send_message`, payload);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
exports.default = Inquiry;
|
|
130
|
+
Inquiry.id = 'Inquiry';
|
|
131
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/postOrder/inquiry/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAa7B;;GAEG;AACH,MAAqB,OAAQ,SAAQ,WAAO;IAI1C,IAAI,QAAQ;QACV,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAAC,OAAuC;QACpE,OAAO,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;OAKG;IACI,YAAY,CAAC,SAAiB,EAAE,OAAkC;QACvE,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,IAAI,OAAO,OAAO,EAAE,WAAW,KAAK,QAAQ,EAAE;YAC5C,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;SAClD;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,SAAS,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACI,oBAAoB,CAAC,SAAiB;QAC3C,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,SAAS,iBAAiB,CAAC,CAAC;IAC3D,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,OAA6B;QAChD,IAAI,OAAO,OAAO,CAAC,cAAc,KAAK,QAAQ,EAAE;YAC9C,OAAO,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;SACxD;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,SAAiB,EAAE,OAA+B;QACvE,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;QACrE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,SAAS,WAAW,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAC,SAAiB;QACjC,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,SAAS,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,kBAAkB,CAAC,SAAiB,EAAE,OAAuC;QAClF,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,SAAS,eAAe,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACI,wBAAwB,CAAC,SAAiB,EAAE,OAAuC;QACxF,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,SAAS,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;OAKG;IACI,0BAA0B,CAAC,SAAiB,EAAE,OAA6B;QAChF,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,SAAS,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,MAA4B;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,kBAAkB,CAAC,SAAiB,EAAE,OAA2B;QACtE,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,SAAS,eAAe,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;;AApIH,0BAqIC;AAnIQ,UAAE,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import Restful from '../../';
|
|
2
|
+
import { FilePurpose, GetReturnFieldGroupEnum } from '../../../../enums';
|
|
3
|
+
import { CheckEligibilityRequest, CloseReturnRequest, CreateReturnRequest, DecideReturnRequest, EscalateRequest, GetEstimateRequest, MarkAsReceivedRequest, MarkAsShippedRequest, MarkRefundSentRequest, PostOrderIssueRefundRequest, ProvideLabelRequest, ReturnRequestType, SearchReturnParams, SendMessageRequest, SetReturnCreationSessionRequest, UpdateTrackingRequest, UploadFileRequest, VoidLabelRequest } from '../../../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Post-Order Return API
|
|
6
|
+
*/
|
|
7
|
+
export default class Return extends Restful {
|
|
8
|
+
static id: string;
|
|
9
|
+
get basePath(): string;
|
|
10
|
+
get useIaf(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Create or update a shipping label provided by the seller.
|
|
13
|
+
*
|
|
14
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
15
|
+
* @param payload the ProvideLabelRequest
|
|
16
|
+
*/
|
|
17
|
+
addShippingLabelInfo(returnId: string, payload: ProvideLabelRequest): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Cancel a return request.
|
|
20
|
+
*
|
|
21
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
22
|
+
* @param payload The CloseReturnRequest.
|
|
23
|
+
*/
|
|
24
|
+
cancelReturnRequest(returnId: string, payload?: CloseReturnRequest): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Check to see if an item is eligible for a return.
|
|
27
|
+
*
|
|
28
|
+
* @param payload the CheckEligibilityRequest
|
|
29
|
+
*/
|
|
30
|
+
checkReturnEligibility(payload: CheckEligibilityRequest): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Validate the eligibility of an existing shipping label.
|
|
33
|
+
*
|
|
34
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
35
|
+
*/
|
|
36
|
+
checkShippingLabelEligibility(returnId: string): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a return draft.
|
|
39
|
+
*
|
|
40
|
+
* @param payload the SetReturnCreationSessionRequest
|
|
41
|
+
*/
|
|
42
|
+
createReturnDraft(payload: SetReturnCreationSessionRequest): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Request a return for an item.
|
|
45
|
+
*
|
|
46
|
+
* @param payload the CreateReturnRequest
|
|
47
|
+
* @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
|
|
48
|
+
*/
|
|
49
|
+
createReturnRequest(payload: CreateReturnRequest, fieldGroups?: GetReturnFieldGroupEnum): Promise<any>;
|
|
50
|
+
/**
|
|
51
|
+
* Create an eBay shipping label for the buyer.
|
|
52
|
+
*
|
|
53
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
54
|
+
*/
|
|
55
|
+
createReturnShippingLabel(returnId: string): Promise<any>;
|
|
56
|
+
/**
|
|
57
|
+
* Delete a file associated with a return draft.
|
|
58
|
+
*
|
|
59
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
60
|
+
* @param fileId The unique eBay-assigned ID of the draft file.
|
|
61
|
+
*/
|
|
62
|
+
deleteReturnDraftFile(draftId: string, fileId: string): Promise<any>;
|
|
63
|
+
/**
|
|
64
|
+
* Escalate an existing return to eBay customer support.
|
|
65
|
+
*
|
|
66
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
67
|
+
* @param payload the EscalateRequest
|
|
68
|
+
*/
|
|
69
|
+
escalateReturn(returnId: string, payload?: EscalateRequest): Promise<any>;
|
|
70
|
+
/**
|
|
71
|
+
* Retrieve the details of a specific return.
|
|
72
|
+
*
|
|
73
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
74
|
+
* @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
|
|
75
|
+
*/
|
|
76
|
+
getReturn(returnId: string, fieldGroups?: GetReturnFieldGroupEnum): Promise<any>;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieve a return draft.
|
|
79
|
+
*
|
|
80
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
81
|
+
*/
|
|
82
|
+
getReturnDraft(returnId: string): Promise<any>;
|
|
83
|
+
/**
|
|
84
|
+
* Retrieve the files associated with a return draft.
|
|
85
|
+
*
|
|
86
|
+
* @param returnId The unique eBay-assigned ID of the return draft.
|
|
87
|
+
*/
|
|
88
|
+
getReturnDraftFiles(returnId: string): Promise<any>;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieve the cost estimate of a refund with its shipping cost.
|
|
91
|
+
*
|
|
92
|
+
* @param payload the GetEstimateRequest
|
|
93
|
+
*/
|
|
94
|
+
getReturnEstimate(payload: GetEstimateRequest): Promise<any>;
|
|
95
|
+
/**
|
|
96
|
+
* Retrieve the cost estimate of a refund with its shipping cost.
|
|
97
|
+
*
|
|
98
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
99
|
+
*/
|
|
100
|
+
getReturnFiles(returnId: string): Promise<any>;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieve seller's return preferences.
|
|
103
|
+
*/
|
|
104
|
+
getReturnPreferences(): Promise<any>;
|
|
105
|
+
/**
|
|
106
|
+
* Retrieve the data for an existing shipping label.
|
|
107
|
+
*
|
|
108
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
109
|
+
*/
|
|
110
|
+
getReturnShippingLabel(returnId: string): Promise<any>;
|
|
111
|
+
/**
|
|
112
|
+
* Retrieve shipment tracking activity for a return.
|
|
113
|
+
*
|
|
114
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
115
|
+
* @param carrierUsed The shipping carrier used to to ship the package.
|
|
116
|
+
* @param trackingNumber The tracking number of the package.
|
|
117
|
+
*/
|
|
118
|
+
getShipmentTrackingInfo(returnId: string, carrierUsed: string, trackingNumber: string): Promise<any>;
|
|
119
|
+
/**
|
|
120
|
+
* Issue a refund.
|
|
121
|
+
*
|
|
122
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
123
|
+
* @param payload The IssueRefundRequest.
|
|
124
|
+
*/
|
|
125
|
+
issueReturnRefund(returnId: string, payload: PostOrderIssueRefundRequest): Promise<any>;
|
|
126
|
+
/**
|
|
127
|
+
* Mark a returned item as received.
|
|
128
|
+
*
|
|
129
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
130
|
+
* @param payload the MarkAsReceivedRequest
|
|
131
|
+
*/
|
|
132
|
+
markReturnReceived(returnId: string, payload?: MarkAsReceivedRequest): Promise<any>;
|
|
133
|
+
/**
|
|
134
|
+
* Mark a refund as received.
|
|
135
|
+
*
|
|
136
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
137
|
+
*/
|
|
138
|
+
markReturnRefundReceived(returnId: string): Promise<any>;
|
|
139
|
+
/**
|
|
140
|
+
* Notify the buyer that a refund has been issued.
|
|
141
|
+
*
|
|
142
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
143
|
+
* @param payload the MarkRefundSentRequest
|
|
144
|
+
*/
|
|
145
|
+
markReturnRefundSent(returnId: string, payload: MarkRefundSentRequest): Promise<any>;
|
|
146
|
+
/**
|
|
147
|
+
* Mark a return as shipped.
|
|
148
|
+
*
|
|
149
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
150
|
+
* @param payload the MarkAsShippedRequest
|
|
151
|
+
*/
|
|
152
|
+
markReturnShipped(returnId: string, payload?: MarkAsShippedRequest): Promise<any>;
|
|
153
|
+
/**
|
|
154
|
+
* Perform an action on a return, such as APPROVE.
|
|
155
|
+
*
|
|
156
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
157
|
+
* @param payload the DecideReturnRequest
|
|
158
|
+
*/
|
|
159
|
+
processReturnRequest(returnId: string, payload: DecideReturnRequest): Promise<any>;
|
|
160
|
+
/**
|
|
161
|
+
* Retrieve details on items being returned.
|
|
162
|
+
*
|
|
163
|
+
* @param params the SearchReturnParams
|
|
164
|
+
*/
|
|
165
|
+
search(params: SearchReturnParams): Promise<any>;
|
|
166
|
+
/**
|
|
167
|
+
* Send a message to the buyer or seller regarding a return.
|
|
168
|
+
*
|
|
169
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
170
|
+
* @param payload the SendMessageRequest
|
|
171
|
+
*/
|
|
172
|
+
sendReturnMessage(returnId: string, payload?: SendMessageRequest): Promise<any>;
|
|
173
|
+
/**
|
|
174
|
+
* Send a shipping label to an email address.
|
|
175
|
+
*
|
|
176
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
177
|
+
* @param toEmailAddress The recipient's email address is specified in this field.
|
|
178
|
+
*/
|
|
179
|
+
sendReturnShippingLabel(returnId: string, toEmailAddress?: string): Promise<any>;
|
|
180
|
+
/**
|
|
181
|
+
* Send a shipping label to an email address.
|
|
182
|
+
*
|
|
183
|
+
* @param rmaRequired This field is included and set to true if the seller wishes to require that the buyer provide
|
|
184
|
+
* a Return Merchandise Authorization (RMA) when returning an item.
|
|
185
|
+
*/
|
|
186
|
+
setReturnPreferences(rmaRequired: boolean): Promise<any>;
|
|
187
|
+
/**
|
|
188
|
+
* Activate the files associated with a return.
|
|
189
|
+
*
|
|
190
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
191
|
+
* @param filePurpose This value is used to indicate if the file(s) are being used to provide more information
|
|
192
|
+
* about the condition of the item, or intended to provide more information about shipment tracking or about
|
|
193
|
+
* the shipping label.
|
|
194
|
+
*/
|
|
195
|
+
submitReturnFile(returnId: string, filePurpose?: FilePurpose): Promise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* Update an existing return draft.
|
|
198
|
+
*
|
|
199
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
200
|
+
* @param returnRequest the ReturnRequestType
|
|
201
|
+
*/
|
|
202
|
+
updateReturnDraft(draftId: string, returnRequest: ReturnRequestType): Promise<any>;
|
|
203
|
+
/**
|
|
204
|
+
* Update shipment tracking information.
|
|
205
|
+
*
|
|
206
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
207
|
+
* @param payload the UpdateTrackingRequest
|
|
208
|
+
*/
|
|
209
|
+
updateShipmentTrackingInfo(returnId: string, payload: UpdateTrackingRequest): Promise<any>;
|
|
210
|
+
/**
|
|
211
|
+
* Upload the files relating to a return draft.
|
|
212
|
+
*
|
|
213
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
214
|
+
* @param payload the UploadFileRequest
|
|
215
|
+
*/
|
|
216
|
+
uploadReturnDraftFile(draftId: string, payload: UploadFileRequest): Promise<any>;
|
|
217
|
+
/**
|
|
218
|
+
* Upload the files relating to a return.
|
|
219
|
+
*
|
|
220
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
221
|
+
* @param payload the UploadFileRequest
|
|
222
|
+
*/
|
|
223
|
+
uploadReturnFile(returnId: string, payload: UploadFileRequest): Promise<any>;
|
|
224
|
+
/**
|
|
225
|
+
* Void a shipping label.
|
|
226
|
+
*
|
|
227
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
228
|
+
* @param payload the VoidLabelRequest
|
|
229
|
+
*/
|
|
230
|
+
voidShippingLabel(returnId: string, payload: VoidLabelRequest): Promise<any>;
|
|
231
|
+
}
|